-
-
Notifications
You must be signed in to change notification settings - Fork 358
Closed
Labels
clarificationItems that need to be clarified in the specificationItems that need to be clarified in the specificationcore
Milestone
Description
How should a json-schema (draft7) implementation resolve $refs defined in unknown keywords?
JSON-Schema-Test-Suite defines schemas such as this, and I assume they are valid:
{
"tilda~field": {"type": "integer"},
"slash/field": {"type": "integer"},
"percent%field": {"type": "integer"},
"properties": {
"tilda": {"$ref": "#/tilda~0field"},
"slash": {"$ref": "#/slash~1field"},
"percent": {"$ref": "#/percent%25field"}
}
}Take this example below:
{
"$id": "http://example.com/root.json",
"definitions": {
"A": { "type": "integer" }
},
"properties": {
"$id": {
"type": "string"
},
"attributes": {
"$ref": "#/tilda~0field/slash~1field/$id"
}
},
"tilda~field": {
"$id": "t/inner.json",
"slash/field": {
"$id": {
"$id": "test/b",
"$ref": "document.json"
}
}
}
}Which of the following is the $ref at #/tilda~0field/slash~1field/$id/$ref resolved to?
- http://example.com/root.json/document.json
- http://example.com/t/document.json
- http://example.com/t/test/document.json
Which of the $ids in #/tilda~0field must be considered as baseURI for the $ref in question and why.
PS I'm not sure if this is the right place to post this. If I need to clarify further or post this elsewhere, please let me know.
Metadata
Metadata
Assignees
Labels
clarificationItems that need to be clarified in the specificationItems that need to be clarified in the specificationcore