Skip to content

Commit

Permalink
Merge pull request #583 from santhosh-tekuri/defs
Browse files Browse the repository at this point in the history
Replace '$defs' with 'definitions' in drafts 6,7
  • Loading branch information
Julian authored Aug 6, 2022
2 parents c4341bd + e14c68b commit 0015d52
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions tests/draft6/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
{
"description": "non-schema object containing a plain-name $id property",
"schema": {
"$defs": {
"definitions": {
"const_not_anchor": {
"const": {
"$id": "#not_a_real_anchor"
Expand All @@ -71,7 +71,7 @@
}
},
{
"$ref": "#/$defs/const_not_anchor"
"$ref": "#/definitions/const_not_anchor"
}
]
}
Expand All @@ -93,7 +93,7 @@
{
"description": "non-schema object containing an $id property",
"schema": {
"$defs": {
"definitions": {
"const_not_id": {
"const": {
"$id": "not_a_real_id"
Expand All @@ -112,7 +112,7 @@
}
},
{
"$ref": "#/$defs/const_not_id"
"$ref": "#/definitions/const_not_id"
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions tests/draft6/ref.json
Original file line number Diff line number Diff line change
Expand Up @@ -737,9 +737,9 @@
"schema": {
"$id": "urn:uuid:deadbeef-1234-0000-0000-4321feebdaed",
"properties": {
"foo": {"$ref": "urn:uuid:deadbeef-1234-0000-0000-4321feebdaed#/$defs/bar"}
"foo": {"$ref": "urn:uuid:deadbeef-1234-0000-0000-4321feebdaed#/definitions/bar"}
},
"$defs": {
"definitions": {
"bar": {"type": "string"}
}
},
Expand Down
8 changes: 4 additions & 4 deletions tests/draft7/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
{
"description": "non-schema object containing a plain-name $id property",
"schema": {
"$defs": {
"definitions": {
"const_not_anchor": {
"const": {
"$id": "#not_a_real_anchor"
Expand All @@ -64,7 +64,7 @@
},
"then": true,
"else" : {
"$ref": "#/$defs/const_not_anchor"
"$ref": "#/definitions/const_not_anchor"
}
},
"tests": [
Expand All @@ -83,7 +83,7 @@
{
"description": "non-schema object containing an $id property",
"schema": {
"$defs": {
"definitions": {
"const_not_id": {
"const": {
"$id": "not_a_real_id"
Expand All @@ -95,7 +95,7 @@
},
"then": true,
"else" : {
"$ref": "#/$defs/const_not_id"
"$ref": "#/definitions/const_not_id"
}
},
"tests": [
Expand Down
4 changes: 2 additions & 2 deletions tests/draft7/ref.json
Original file line number Diff line number Diff line change
Expand Up @@ -773,9 +773,9 @@
"schema": {
"$id": "urn:uuid:deadbeef-1234-0000-0000-4321feebdaed",
"properties": {
"foo": {"$ref": "urn:uuid:deadbeef-1234-0000-0000-4321feebdaed#/$defs/bar"}
"foo": {"$ref": "urn:uuid:deadbeef-1234-0000-0000-4321feebdaed#/definitions/bar"}
},
"$defs": {
"definitions": {
"bar": {"type": "string"}
}
},
Expand Down

0 comments on commit 0015d52

Please sign in to comment.