Skip to content

Commit

Permalink
move draft-specific files to the dedicated dir for its draft
Browse files Browse the repository at this point in the history
..otherwise, draft-specific test suites won't know to skip adding the file
  • Loading branch information
karenetheridge committed Oct 8, 2024
1 parent 8ef1550 commit a66d23d
Show file tree
Hide file tree
Showing 16 changed files with 99 additions and 17 deletions.
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions remotes/draft4/subSchemas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"definitions": {
"integer": {
"type": "integer"
},
"refToInteger": {
"$ref": "#/definitions/integer"
}
}
}
15 changes: 15 additions & 0 deletions remotes/draft6/name.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"definitions": {
"orNull": {
"anyOf": [
{
"type": "null"
},
{
"$ref": "#"
}
]
}
},
"type": "string"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "http://localhost:1234/ref-and-definitions.json",
"$id": "http://localhost:1234/draft6/ref-and-definitions.json",
"definitions": {
"inner": {
"properties": {
Expand Down
10 changes: 10 additions & 0 deletions remotes/draft6/subSchemas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"definitions": {
"integer": {
"type": "integer"
},
"refToInteger": {
"$ref": "#/definitions/integer"
}
}
}
11 changes: 11 additions & 0 deletions remotes/draft7/locationIndependentIdentifier.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"definitions": {
"refToInteger": {
"$ref": "#foo"
},
"A": {
"$id": "#foo",
"type": "integer"
}
}
}
15 changes: 15 additions & 0 deletions remotes/draft7/name.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"definitions": {
"orNull": {
"anyOf": [
{
"type": "null"
},
{
"$ref": "#"
}
]
}
},
"type": "string"
}
11 changes: 11 additions & 0 deletions remotes/draft7/ref-and-definitions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$id": "http://localhost:1234/draft7/ref-and-definitions.json",
"definitions": {
"inner": {
"properties": {
"bar": { "type": "string" }
}
}
},
"allOf": [ { "$ref": "#/definitions/inner" } ]
}
10 changes: 10 additions & 0 deletions remotes/draft7/subSchemas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"definitions": {
"integer": {
"type": "integer"
},
"refToInteger": {
"$ref": "#/definitions/integer"
}
}
}
4 changes: 2 additions & 2 deletions tests/draft3/refRemote.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
{
"description": "fragment within remote ref",
"schema": {"$ref": "http://localhost:1234/subSchemas.json#/definitions/integer"},
"schema": {"$ref": "http://localhost:1234/draft3/subSchemas.json#/definitions/integer"},
"tests": [
{
"description": "remote fragment valid",
Expand All @@ -34,7 +34,7 @@
{
"description": "ref within remote ref",
"schema": {
"$ref": "http://localhost:1234/subSchemas.json#/definitions/refToInteger"
"$ref": "http://localhost:1234/draft3/subSchemas.json#/definitions/refToInteger"
},
"tests": [
{
Expand Down
8 changes: 4 additions & 4 deletions tests/draft4/refRemote.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
{
"description": "fragment within remote ref",
"schema": {"$ref": "http://localhost:1234/subSchemas.json#/definitions/integer"},
"schema": {"$ref": "http://localhost:1234/draft4/subSchemas.json#/definitions/integer"},
"tests": [
{
"description": "remote fragment valid",
Expand All @@ -34,7 +34,7 @@
{
"description": "ref within remote ref",
"schema": {
"$ref": "http://localhost:1234/subSchemas.json#/definitions/refToInteger"
"$ref": "http://localhost:1234/draft4/subSchemas.json#/definitions/refToInteger"
},
"tests": [
{
Expand Down Expand Up @@ -139,7 +139,7 @@
"id": "http://localhost:1234/object",
"type": "object",
"properties": {
"name": {"$ref": "name.json#/definitions/orNull"}
"name": {"$ref": "draft4/name.json#/definitions/orNull"}
}
},
"tests": [
Expand Down Expand Up @@ -171,7 +171,7 @@
{
"description": "Location-independent identifier in remote ref",
"schema": {
"$ref": "http://localhost:1234/locationIndependentIdentifierDraft4.json#/definitions/refToInteger"
"$ref": "http://localhost:1234/draft4/locationIndependentIdentifier.json#/definitions/refToInteger"
},
"tests": [
{
Expand Down
10 changes: 5 additions & 5 deletions tests/draft6/refRemote.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
{
"description": "fragment within remote ref",
"schema": {"$ref": "http://localhost:1234/subSchemas.json#/definitions/integer"},
"schema": {"$ref": "http://localhost:1234/draft6/subSchemas.json#/definitions/integer"},
"tests": [
{
"description": "remote fragment valid",
Expand All @@ -34,7 +34,7 @@
{
"description": "ref within remote ref",
"schema": {
"$ref": "http://localhost:1234/subSchemas.json#/definitions/refToInteger"
"$ref": "http://localhost:1234/draft6/subSchemas.json#/definitions/refToInteger"
},
"tests": [
{
Expand Down Expand Up @@ -139,7 +139,7 @@
"$id": "http://localhost:1234/object",
"type": "object",
"properties": {
"name": {"$ref": "name.json#/definitions/orNull"}
"name": {"$ref": "draft6/name.json#/definitions/orNull"}
}
},
"tests": [
Expand Down Expand Up @@ -173,7 +173,7 @@
"schema": {
"$id": "http://localhost:1234/schema-remote-ref-ref-defs1.json",
"allOf": [
{ "$ref": "ref-and-definitions.json" }
{ "$ref": "draft6/ref-and-definitions.json" }
]
},
"tests": [
Expand All @@ -196,7 +196,7 @@
{
"description": "Location-independent identifier in remote ref",
"schema": {
"$ref": "http://localhost:1234/locationIndependentIdentifierPre2019.json#/definitions/refToInteger"
"$ref": "http://localhost:1234/draft6/locationIndependentIdentifier.json#/definitions/refToInteger"
},
"tests": [
{
Expand Down
10 changes: 5 additions & 5 deletions tests/draft7/refRemote.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
{
"description": "fragment within remote ref",
"schema": {"$ref": "http://localhost:1234/subSchemas.json#/definitions/integer"},
"schema": {"$ref": "http://localhost:1234/draft7/subSchemas.json#/definitions/integer"},
"tests": [
{
"description": "remote fragment valid",
Expand All @@ -34,7 +34,7 @@
{
"description": "ref within remote ref",
"schema": {
"$ref": "http://localhost:1234/subSchemas.json#/definitions/refToInteger"
"$ref": "http://localhost:1234/draft7/subSchemas.json#/definitions/refToInteger"
},
"tests": [
{
Expand Down Expand Up @@ -139,7 +139,7 @@
"$id": "http://localhost:1234/object",
"type": "object",
"properties": {
"name": {"$ref": "name.json#/definitions/orNull"}
"name": {"$ref": "draft7/name.json#/definitions/orNull"}
}
},
"tests": [
Expand Down Expand Up @@ -173,7 +173,7 @@
"schema": {
"$id": "http://localhost:1234/schema-remote-ref-ref-defs1.json",
"allOf": [
{ "$ref": "ref-and-definitions.json" }
{ "$ref": "draft7/ref-and-definitions.json" }
]
},
"tests": [
Expand All @@ -196,7 +196,7 @@
{
"description": "Location-independent identifier in remote ref",
"schema": {
"$ref": "http://localhost:1234/locationIndependentIdentifierPre2019.json#/definitions/refToInteger"
"$ref": "http://localhost:1234/draft7/locationIndependentIdentifier.json#/definitions/refToInteger"
},
"tests": [
{
Expand Down

0 comments on commit a66d23d

Please sign in to comment.