Skip to content

Commit dc001c2

Browse files
author
Matt Allan
committed
Add test for properties named $ref
1 parent 9355965 commit dc001c2

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/draft4/ref.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,5 +155,25 @@
155155
"valid": false
156156
}
157157
]
158+
},
159+
{
160+
"description": "property named $ref that is not a reference",
161+
"schema": {
162+
"properties": {
163+
"$ref": {"type": "string"}
164+
}
165+
},
166+
"tests": [
167+
{
168+
"description": "property named $ref valid",
169+
"data": {"$ref": "a"},
170+
"valid": true
171+
},
172+
{
173+
"description": "property named $ref invalid",
174+
"data": {"$ref": 2},
175+
"valid": false
176+
}
177+
]
158178
}
159179
]

0 commit comments

Comments
 (0)