Skip to content

Commit

Permalink
Squashed 'json/' changes from 6afa9b38d..b069ac352
Browse files Browse the repository at this point in the history
b069ac352 Add tests for non-relative URI anchor referencing
7950d9e05 Merge pull request #674 from jmigual/feature/alah
e6a089ae9 Changed description about `main` branch
b3c074773 Add comment about live at head philosophy
ab4bd012f Merge pull request #671 from marksparkza/schemaloc-fragment
e7aba0972 Include fragment in schemaLocation

git-subtree-dir: json
git-subtree-split: b069ac352c3dc1fae71f6f177dafe97001c97920
  • Loading branch information
Julian committed May 30, 2023
1 parent b695cd7 commit acf7a6b
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ This repository contains a set of JSON objects that implementers of JSON Schema
It is meant to be language agnostic and should require only a JSON parser.
The conversion of the JSON objects into tests within a specific language and test framework of choice is left to be done by the validator implementer.

The recommended workflow of this test suite is to clone the `main` branch of this repository as a `git submodule` or `git subtree`. The `main` branch is always stable.

## Coverage

All JSON Schema specification releases should be well covered by this suite, including drafts 2020-12, 2019-09, 07, 06, 04 and 03.
Expand Down
2 changes: 1 addition & 1 deletion output-tests/draft-next/content/general.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"contains": {
"properties": {
"evaluationPath": {"const": ""},
"schemaLocation": {"const": "https://json-schema.org/tests/content/draft-next/general/0"},
"schemaLocation": {"const": "https://json-schema.org/tests/content/draft-next/general/0#"},
"instanceLocation": {"const": ""},
"annotations": false,
"droppedAnnotations": {
Expand Down
2 changes: 1 addition & 1 deletion output-tests/draft-next/content/readOnly.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"contains": {
"properties": {
"evaluationPath": {"const": ""},
"schemaLocation": {"const": "https://json-schema.org/tests/content/draft-next/readOnly/0"},
"schemaLocation": {"const": "https://json-schema.org/tests/content/draft-next/readOnly/0#"},
"instanceLocation": {"const": ""},
"annotations": {
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion output-tests/draft-next/content/type.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"contains": {
"properties": {
"evaluationPath": {"const": ""},
"schemaLocation": {"const": "https://json-schema.org/tests/content/draft-next/type/0"},
"schemaLocation": {"const": "https://json-schema.org/tests/content/draft-next/type/0#"},
"instanceLocation": {"const": ""},
"annotations": false,
"errors": {
Expand Down
27 changes: 27 additions & 0 deletions tests/draft6/ref.json
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,33 @@
}
]
},
{
"description": "Reference an anchor with a non-relative URI",
"schema": {
"$id": "https://example.com/schema-with-anchor",
"allOf": [{
"$ref": "https://example.com/schema-with-anchor#foo"
}],
"definitions": {
"A": {
"$id": "#foo",
"type": "integer"
}
}
},
"tests": [
{
"data": 1,
"description": "match",
"valid": true
},
{
"data": "a",
"description": "mismatch",
"valid": false
}
]
},
{
"description": "Location-independent identifier with base URI change in subschema",
"schema": {
Expand Down
27 changes: 27 additions & 0 deletions tests/draft7/ref.json
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,33 @@
}
]
},
{
"description": "Reference an anchor with a non-relative URI",
"schema": {
"$id": "https://example.com/schema-with-anchor",
"allOf": [{
"$ref": "https://example.com/schema-with-anchor#foo"
}],
"definitions": {
"A": {
"$id": "#foo",
"type": "integer"
}
}
},
"tests": [
{
"data": 1,
"description": "match",
"valid": true
},
{
"data": "a",
"description": "mismatch",
"valid": false
}
]
},
{
"description": "Location-independent identifier with base URI change in subschema",
"schema": {
Expand Down

0 comments on commit acf7a6b

Please sign in to comment.