Skip to content

Commit 9103f3b

Browse files
santhosh-tekurijdesrosiers
authored andcommitted
$ref wit id does not test what it is indented to do
whether the implementation resolves $ref to /definitions/foo or /definitions/base_foo current tests will always pass
1 parent f300dd1 commit 9103f3b

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

tests/draft3/ref.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,17 +207,17 @@
207207
"definitions": {
208208
"foo": {
209209
"id": "http://localhost:1234/sibling_id/foo.json",
210-
"minimum": 2
210+
"type": "string"
211211
},
212212
"base_foo": {
213213
"$comment": "this canonical uri is http://localhost:1234/sibling_id/base/foo.json",
214214
"id": "foo.json",
215-
"minimum": 5
215+
"type": "number"
216216
}
217217
},
218218
"allOf": [
219219
{
220-
"$comment": "$ref resolves to http://localhost:1234/sibling_id/base/foo.json, not ttp://localhost:1234/sibling_id/foo.json",
220+
"$comment": "$ref resolves to http://localhost:1234/sibling_id/base/foo.json, not http://localhost:1234/sibling_id/foo.json",
221221
"id": "http://localhost:1234/sibling_id/",
222222
"$ref": "foo.json"
223223
}
@@ -226,7 +226,7 @@
226226
"tests": [
227227
{
228228
"description": "$ref resolves to /definitions/foo, data validates",
229-
"data": 10,
229+
"data": "a",
230230
"valid": true
231231
},
232232
{

tests/draft4/ref.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,17 +182,17 @@
182182
"definitions": {
183183
"foo": {
184184
"id": "http://localhost:1234/sibling_id/foo.json",
185-
"minimum": 2
185+
"type": "string"
186186
},
187187
"base_foo": {
188188
"$comment": "this canonical uri is http://localhost:1234/sibling_id/base/foo.json",
189189
"id": "foo.json",
190-
"minimum": 5
190+
"type": "number"
191191
}
192192
},
193193
"allOf": [
194194
{
195-
"$comment": "$ref resolves to http://localhost:1234/sibling_id/base/foo.json, not ttp://localhost:1234/sibling_id/foo.json",
195+
"$comment": "$ref resolves to http://localhost:1234/sibling_id/base/foo.json, not http://localhost:1234/sibling_id/foo.json",
196196
"id": "http://localhost:1234/sibling_id/",
197197
"$ref": "foo.json"
198198
}
@@ -201,7 +201,7 @@
201201
"tests": [
202202
{
203203
"description": "$ref resolves to /definitions/foo, data validates",
204-
"data": 10,
204+
"data": "a",
205205
"valid": true
206206
},
207207
{

tests/draft6/ref.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,17 +182,17 @@
182182
"definitions": {
183183
"foo": {
184184
"$id": "http://localhost:1234/sibling_id/foo.json",
185-
"minimum": 2
185+
"type": "string"
186186
},
187187
"base_foo": {
188188
"$comment": "this canonical uri is http://localhost:1234/sibling_id/base/foo.json",
189189
"$id": "foo.json",
190-
"minimum": 5
190+
"type": "number"
191191
}
192192
},
193193
"allOf": [
194194
{
195-
"$comment": "$ref resolves to http://localhost:1234/sibling_id/base/foo.json, not ttp://localhost:1234/sibling_id/foo.json",
195+
"$comment": "$ref resolves to http://localhost:1234/sibling_id/base/foo.json, not http://localhost:1234/sibling_id/foo.json",
196196
"$id": "http://localhost:1234/sibling_id/",
197197
"$ref": "foo.json"
198198
}
@@ -201,7 +201,7 @@
201201
"tests": [
202202
{
203203
"description": "$ref resolves to /definitions/foo, data validates",
204-
"data": 10,
204+
"data": "a",
205205
"valid": true
206206
},
207207
{

tests/draft7/ref.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,17 +182,17 @@
182182
"definitions": {
183183
"foo": {
184184
"$id": "http://localhost:1234/sibling_id/foo.json",
185-
"minimum": 2
185+
"type": "string"
186186
},
187187
"base_foo": {
188188
"$comment": "this canonical uri is http://localhost:1234/sibling_id/base/foo.json",
189189
"$id": "foo.json",
190-
"minimum": 5
190+
"type": "number"
191191
}
192192
},
193193
"allOf": [
194194
{
195-
"$comment": "$ref resolves to http://localhost:1234/sibling_id/base/foo.json, not ttp://localhost:1234/sibling_id/foo.json",
195+
"$comment": "$ref resolves to http://localhost:1234/sibling_id/base/foo.json, not http://localhost:1234/sibling_id/foo.json",
196196
"$id": "http://localhost:1234/sibling_id/",
197197
"$ref": "foo.json"
198198
}
@@ -201,7 +201,7 @@
201201
"tests": [
202202
{
203203
"description": "$ref resolves to /definitions/foo, data validates",
204-
"data": 10,
204+
"data": "a",
205205
"valid": true
206206
},
207207
{

0 commit comments

Comments
 (0)