summaryrefslogtreecommitdiff
path: root/json/tests/draft3/ref.json
diff options
context:
space:
mode:
Diffstat (limited to 'json/tests/draft3/ref.json')
-rw-r--r--json/tests/draft3/ref.json25
1 files changed, 25 insertions, 0 deletions
diff --git a/json/tests/draft3/ref.json b/json/tests/draft3/ref.json
index bd6b777..74e963c 100644
--- a/json/tests/draft3/ref.json
+++ b/json/tests/draft3/ref.json
@@ -174,6 +174,31 @@
]
},
{
+ "description": "property named $ref, containing an actual $ref",
+ "schema": {
+ "properties": {
+ "$ref": {"$ref": "#/definitions/is-string"}
+ },
+ "definitions": {
+ "is-string": {
+ "type": "string"
+ }
+ }
+ },
+ "tests": [
+ {
+ "description": "property named $ref valid",
+ "data": {"$ref": "a"},
+ "valid": true
+ },
+ {
+ "description": "property named $ref invalid",
+ "data": {"$ref": 2},
+ "valid": false
+ }
+ ]
+ },
+ {
"description": "remote ref, containing refs itself",
"schema": {"$ref": "http://json-schema.org/draft-03/schema#"},
"tests": [