Skip to content

Commit 9d39762

Browse files
committed
Make "rel" required.
RFC 5988bis lists the link relation type as one of the three required aspects of a link. Since we do not need to support the deprecated "rev" mechanisms for specifying relation types, we can make "rel" required. This will encourage hyper-schema authors to think more about choosing relation types.
1 parent a426f3a commit 9d39762

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

hyper-schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"linkDescription": {
1515
"title": "Link Description Object",
1616
"type": "object",
17-
"required": [ "href" ],
17+
"required": [ "href", "rel" ],
1818
"properties": {
1919
"href": {
2020
"description": "a URI template, as defined by RFC 6570",

jsonschema-hyperschema.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,7 @@
758758
resource. The value MUST be a registered link relation from the
759759
<xref target="RFC5988">IANA Link Relation Type Registry established in RFC 5988</xref>,
760760
or a normalized URI following the <xref target="RFC3986">URI production of RFC 3986</xref>.
761+
This property is required.
761762
</t>
762763

763764
<t>

0 commit comments

Comments
 (0)