summaryrefslogtreecommitdiff
path: root/json
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2013-04-27 21:21:14 -0400
committerJulian Berman <Julian@GrayVines.com>2013-04-27 21:21:14 -0400
commit6fde6a23d45f76aa62321ab126a1be923bc0cf93 (patch)
treef0f3aebe27bb82fdb41476d9e7771c4a953efe3f /json
parent3b8d75a87c5f82032b9ef8f21beaa096570cca33 (diff)
parent8c1729a55baef2c79b2784f87b48e41d8aa4669e (diff)
downloadjsonschema-6fde6a23d45f76aa62321ab126a1be923bc0cf93.tar.gz
Merge commit '8c1729a55baef2c79b2784f87b48e41d8aa4669e'
Diffstat (limited to 'json')
-rw-r--r--json/tests/draft3/ref.json23
-rw-r--r--json/tests/draft4/ref.json23
2 files changed, 44 insertions, 2 deletions
diff --git a/json/tests/draft3/ref.json b/json/tests/draft3/ref.json
index bd19cac..c984019 100644
--- a/json/tests/draft3/ref.json
+++ b/json/tests/draft3/ref.json
@@ -31,7 +31,7 @@
]
},
{
- "description": "relative pointer ref",
+ "description": "relative pointer ref to object",
"schema": {
"properties": {
"foo": {"type": "integer"},
@@ -52,6 +52,27 @@
]
},
{
+ "description": "relative pointer ref to array",
+ "schema": {
+ "items": [
+ {"type": "integer"},
+ {"$ref": "#/items/0"}
+ ]
+ },
+ "tests": [
+ {
+ "description": "match array",
+ "data": [1, 2],
+ "valid": true
+ },
+ {
+ "description": "mismatch array",
+ "data": [1, "foo"],
+ "valid": false
+ }
+ ]
+ },
+ {
"description": "escaped pointer ref",
"schema": {
"tilda~field": {"type": "integer"},
diff --git a/json/tests/draft4/ref.json b/json/tests/draft4/ref.json
index 168f207..b38ff03 100644
--- a/json/tests/draft4/ref.json
+++ b/json/tests/draft4/ref.json
@@ -31,7 +31,7 @@
]
},
{
- "description": "relative pointer ref",
+ "description": "relative pointer ref to object",
"schema": {
"properties": {
"foo": {"type": "integer"},
@@ -52,6 +52,27 @@
]
},
{
+ "description": "relative pointer ref to array",
+ "schema": {
+ "items": [
+ {"type": "integer"},
+ {"$ref": "#/items/0"}
+ ]
+ },
+ "tests": [
+ {
+ "description": "match array",
+ "data": [1, 2],
+ "valid": true
+ },
+ {
+ "description": "mismatch array",
+ "data": [1, "foo"],
+ "valid": false
+ }
+ ]
+ },
+ {
"description": "escaped pointer ref",
"schema": {
"tilda~field": {"type": "integer"},