Skip to content

Commit 8e278be

Browse files
authored
Merge pull request #615 from handrews/rel
Allow multiple values for "rel"
2 parents d605d04 + e6944d3 commit 8e278be

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

jsonschema-hyperschema.xml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -456,8 +456,15 @@
456456
</t>
457457
<section title="rel" anchor="rel">
458458
<t>
459-
The value of this property MUST be a string, and MUST be a single
460-
Link Relation Type as defined in RFC 8288, Section 2.1.
459+
The value of this property MUST be either a string or
460+
an array of strings. If the value is an array,
461+
it MUST contain at least one string.
462+
</t>
463+
<t>
464+
Each string MUST be a single Link Relation Type as defined
465+
in RFC 8288, Section 2.1, including the restriction that
466+
additional semantics SHOULD NOT be inferred based upon the
467+
presence or absence of another link relation type.
461468
</t>
462469
<t>
463470
This property is required.
@@ -921,7 +928,10 @@
921928
fragment of the "contextUri" field.
922929
</t>
923930
<t hangText="rel">
924-
The link relation type, as it appears in the LDO.
931+
The link relation type. When multiple link relation types appear
932+
in the LDO, for the purpose of producing output, they are to be
933+
treated as multiple LDOs, each with a single link relation type
934+
but otherwise identical.
925935
</t>
926936
<t hangText="targetUri">
927937
The fully resolved URI (with a scheme) of the target resource. If the

links.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@
2222
]
2323
},
2424
"rel": {
25-
"type": "string"
25+
"anyOf": [
26+
{ "type": "string" },
27+
{
28+
"type": "array",
29+
"items": { "type": "string" },
30+
"minItems": 1
31+
}
32+
]
2633
},
2734
"href": {
2835
"type": "string",

0 commit comments

Comments
 (0)