Skip to content

Commit

Permalink
Replace '$defs' with 'definitions' in drafts 6,7
Browse files Browse the repository at this point in the history
  • Loading branch information
santhosh-tekuri committed Aug 6, 2022
1 parent c4341bd commit e14c68b
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 e14c68b

Please sign in to comment.