Skip to content

Commit 452b5f8

Browse files
committed
Test property named $ref, containing an actual $ref
1 parent 817b724 commit 452b5f8

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tests/draft2019-09/ref.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,31 @@
211211
}
212212
]
213213
},
214+
{
215+
"description": "property named $ref, containing an actual $ref",
216+
"schema": {
217+
"properties": {
218+
"$ref": {"$ref": "#/$defs/is-string"}
219+
},
220+
"$defs": {
221+
"is-string": {
222+
"type": "string"
223+
}
224+
}
225+
},
226+
"tests": [
227+
{
228+
"description": "property named $ref valid",
229+
"data": {"$ref": "a"},
230+
"valid": true
231+
},
232+
{
233+
"description": "property named $ref invalid",
234+
"data": {"$ref": 2},
235+
"valid": false
236+
}
237+
]
238+
},
214239
{
215240
"description": "$ref to boolean schema true",
216241
"schema": {

0 commit comments

Comments
 (0)