Question about name resolution when $id is used

Skip to first unread message

Simon Sprott

Feb 2, 2020, 7:21:26 AM2/2/20
to JSON Schema
Im trying to figure out how to resolve references within a JSON Schema, when $id properties are involved.

I'm looking at the example in whats described in there makes sense, but does not provide a complete explaination, so I've added definitions "Z", to the example to help explain.

"$schema": "",
"$id": "",
"definitions": {
"A": {
"$id": "#foo"
"B": {
"$id": "other.json",
"definitions": {
"X": {
"$id": "#bar",
"definitions": {
"Z": {
"type": "integer"
"Y": {
"$id": "t/inner.json"
"C": {
"$id": "urn:uuid:ee564b8a-7a87-4125-8c96-e9f123d6766f"

According to the spec the following are valid references to "X"


What I'm stuggling to figure out is what valid references to "Z" would look like

                          - not at all sure about this
               - this seesms like a logical progression
  - Happy with this one

Thanks for your help
Reply all
Reply to author
Message has been deleted
0 new messages