Skip to content

Commit

Permalink
Merge pull request #243 from harrel56/chore/update-test-suite-2024101…
Browse files Browse the repository at this point in the history
…5-151422

chore(test-suite): incremental test suite update from upstream
  • Loading branch information
harrel56 authored Oct 19, 2024
2 parents 03d7fe0 + 7e79215 commit 11fc2dc
Show file tree
Hide file tree
Showing 18 changed files with 63 additions and 12 deletions.
5 changes: 5 additions & 0 deletions src/test/resources/suite-yaml/remotes/draft4/subSchemas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
definitions:
integer:
type: integer
refToInteger:
$ref: '#/definitions/integer'
6 changes: 6 additions & 0 deletions src/test/resources/suite-yaml/remotes/draft7/name.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
definitions:
orNull:
anyOf:
- type: "null"
- $ref: '#'
type: string
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$id: http://localhost:1234/ref-and-definitions.json
$id: http://localhost:1234/draft7/ref-and-definitions.json
definitions:
inner:
properties:
Expand Down
5 changes: 5 additions & 0 deletions src/test/resources/suite-yaml/remotes/draft7/subSchemas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
definitions:
integer:
type: integer
refToInteger:
$ref: '#/definitions/integer'
10 changes: 5 additions & 5 deletions src/test/resources/suite-yaml/tests/draft7/refRemote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
valid: false
- description: fragment within remote ref
schema:
$ref: http://localhost:1234/subSchemas.json#/definitions/integer
$ref: http://localhost:1234/draft7/subSchemas.json#/definitions/integer
tests:
- description: remote fragment valid
data: 1
Expand All @@ -20,7 +20,7 @@
valid: false
- description: ref within remote ref
schema:
$ref: http://localhost:1234/subSchemas.json#/definitions/refToInteger
$ref: http://localhost:1234/draft7/subSchemas.json#/definitions/refToInteger
tests:
- description: ref within ref valid
data: 1
Expand Down Expand Up @@ -100,7 +100,7 @@
type: object
properties:
name:
$ref: name.json#/definitions/orNull
$ref: draft7/name.json#/definitions/orNull
tests:
- description: string is valid
data:
Expand All @@ -119,7 +119,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:
- description: invalid
data:
Expand All @@ -131,7 +131,7 @@
valid: true
- 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:
- description: integer is valid
data: 1
Expand Down
File renamed without changes.
10 changes: 10 additions & 0 deletions src/test/resources/suite/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 src/test/resources/suite/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"
}
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/draft7/ref-and-definitions.json",
"definitions": {
"inner": {
"properties": {
Expand Down
10 changes: 10 additions & 0 deletions src/test/resources/suite/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"
}
}
}
10 changes: 5 additions & 5 deletions src/test/resources/suite/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 11fc2dc

Please sign in to comment.