Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move draft-specific files to the dedicated dir for its draft #753

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading