Skip to content

Commit 329ea09

Browse files
committed
Clarify $comment usage in vocabularies.
This ensures that comments can be used in structures such as Hyper-Schema's LDOs without every specification needing to define it separately.
1 parent 865db54 commit 329ea09

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

hyper-schema.json

+3
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@
4949
"submissionSchema": {
5050
"description": "Schema describing the data to submit along with the request",
5151
"allOf": [ { "$ref": "#" } ]
52+
},
53+
"$comment": {
54+
"type": "string"
5255
}
5356
}
5457
}

jsonschema-core.xml

+6
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,12 @@
583583
editing this keyword. The value of this keyword MAY be used in debug or error
584584
output which is intended for developers making use of schemas.
585585

586+
Schema vocabularies SHOULD allow "$comment" within any object containing
587+
vocabulary keywords. Implementations MAY assume "$comment" is allowed
588+
unless the vocabulary specifically forbids it. Vocabularies MUST NOT
589+
specify any effect of "$comment" beyond what is described in this
590+
specification.
591+
586592
Tools that translate other media types or programming languages
587593
to and from application/schema+json MAY choose convert that media type or
588594
programming language's native comments to or from "$comment" values.

0 commit comments

Comments
 (0)