Skip to content

Fix calculation of evaluated properties #1351

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
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
12 changes: 0 additions & 12 deletions json/.github/workflows/pr-dependencies.yml

This file was deleted.

21 changes: 0 additions & 21 deletions json/.github/workflows/show_specification_annotations.yml

This file was deleted.

16 changes: 4 additions & 12 deletions json/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ To test a specific version:

* For 2019-09 and later published drafts, implementations that are able to detect the draft of each schema via `$schema` SHOULD be configured to do so
* For draft-07 and earlier, draft-next, and implementations unable to detect via `$schema`, implementations MUST be configured to expect the draft matching the test directory name
* Load any remote references [described below](#additional-assumptions) and configure your implementation to retrieve them via their URIs
* Load any remote references [described below](additional-assumptions) and configure your implementation to retrieve them via their URIs
* Walk the filesystem tree for that version's subdirectory and for each `.json` file found:

* if the file is located in the root of the version directory:
Expand Down Expand Up @@ -159,7 +159,7 @@ If your implementation supports multiple versions, run the above procedure for e
```

2. Test cases found within [special subdirectories](#subdirectories-within-each-draft) may require additional configuration to run.
In particular, when running tests within the `optional/format` subdirectory, test runners should configure implementations to enable format validation, where the implementation supports it.
In particular, tests within the `optional/format` subdirectory may require implementations to change the way they treat the `"format"`keyword (particularly on older drafts which did not have a notion of vocabularies).

### Invariants & Guarantees

Expand Down Expand Up @@ -254,14 +254,12 @@ This suite is being used by:

### Java

* [json-schema-validation-comparison](https://www.creekservice.org/json-schema-validation-comparison/functional) (Comparison site for JVM-based validator implementations)
* [json-schema-validator](https://github.com/daveclayton/json-schema-validator)
* [everit-org/json-schema](https://github.com/everit-org/json-schema)
* [networknt/json-schema-validator](https://github.com/networknt/json-schema-validator)
* [Justify](https://github.com/leadpony/justify)
* [Snow](https://github.com/ssilverman/snowy-json)
* [jsonschemafriend](https://github.com/jimblackler/jsonschemafriend)
* [OpenAPI JSON Schema Generator](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator)

### JavaScript

Expand All @@ -281,10 +279,6 @@ This suite is being used by:
* [ajv](https://github.com/epoberezkin/ajv)
* [djv](https://github.com/korzio/djv)

### Kotlin

* [json-schema-validation-comparison](https://www.creekservice.org/json-schema-validation-comparison/functional) (Comparison site for JVM-based validator implementations)

### Node.js

For node.js developers, the suite is also available as an [npm](https://www.npmjs.com/package/@json-schema-org/tests) package.
Expand All @@ -293,7 +287,7 @@ Node-specific support is maintained in a [separate repository](https://github.co

### .NET

* [JsonSchema.Net](https://github.com/json-everything/json-everything)
* [JsonSchema.Net](https://github.com/gregsdennis/json-everything)
* [Newtonsoft.Json.Schema](https://github.com/JamesNK/Newtonsoft.Json.Schema)

### Perl
Expand All @@ -319,7 +313,7 @@ Node-specific support is maintained in a [separate repository](https://github.co
* [fastjsonschema](https://github.com/seznam/python-fastjsonschema)
* [hypothesis-jsonschema](https://github.com/Zac-HD/hypothesis-jsonschema)
* [jschon](https://github.com/marksparkza/jschon)
* [OpenAPI JSON Schema Generator](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator)
* [python-experimental, OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/python-experimental.md)

### Ruby

Expand All @@ -333,13 +327,11 @@ Node-specific support is maintained in a [separate repository](https://github.co

### Scala

* [json-schema-validation-comparison](https://www.creekservice.org/json-schema-validation-comparison/functional) (Comparison site for JVM-based validator implementations)
* [typed-json](https://github.com/frawa/typed-json)

### Swift

* [JSONSchema](https://github.com/kylef/JSONSchema.swift)
* [swift-json-schema](https://github.com/ajevans99/swift-json-schema)

If you use it as well, please fork and send a pull request adding yourself to
the list :).
Expand Down
140 changes: 0 additions & 140 deletions json/bin/annotate-specification-links

This file was deleted.

34 changes: 0 additions & 34 deletions json/bin/specification_urls.json

This file was deleted.

26 changes: 26 additions & 0 deletions json/output-tests/draft2019-09/content/type.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,32 @@
"required": ["errors"]
}
}
},
{
"description": "correct type yields an output unit",
"data": "a string",
"output": {
"basic": {
"$id": "https://json-schema.org/tests/content/draft2019-09/type/0/tests/1/basic",
"$ref": "/draft/2019-09/output/schema",
"properties": {
"annotations": {
"contains": {
"properties": {
"valid": {"const": true},
"keywordLocation": {"const": "/type"},
"absoluteKeywordLocation": {"const": "https://json-schema.org/tests/content/draft2019-09/type/0#/type"},
"instanceLocation": {"const": ""},
"annotation": false,
"error": false
},
"required": ["keywordLocation", "instanceLocation"]
}
}
},
"required": ["annotations"]
}
}
}
]
}
Expand Down
26 changes: 26 additions & 0 deletions json/output-tests/draft2020-12/content/type.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,32 @@
"required": ["errors"]
}
}
},
{
"description": "correct type yields an output unit",
"data": "a string",
"output": {
"basic": {
"$id": "https://json-schema.org/tests/content/draft2020-12/type/0/tests/1/basic",
"$ref": "/draft/2020-12/output/schema",
"properties": {
"annotations": {
"contains": {
"properties": {
"valid": {"const": true},
"keywordLocation": {"const": "/type"},
"absoluteKeywordLocation": {"const": "https://json-schema.org/tests/content/draft2020-12/type/0#/type"},
"instanceLocation": {"const": ""},
"annotation": false,
"error": false
},
"required": ["keywordLocation", "instanceLocation"]
}
}
},
"required": ["annotations"]
}
}
}
]
}
Expand Down
1 change: 0 additions & 1 deletion json/remotes/draft-next/format-assertion-false.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"https://json-schema.org/draft/next/vocab/core": true,
"https://json-schema.org/draft/next/vocab/format-assertion": false
},
"$dynamicAnchor": "meta",
"allOf": [
{ "$ref": "https://json-schema.org/draft/next/meta/core" },
{ "$ref": "https://json-schema.org/draft/next/meta/format-assertion" }
Expand Down
1 change: 0 additions & 1 deletion json/remotes/draft-next/format-assertion-true.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"https://json-schema.org/draft/next/vocab/core": true,
"https://json-schema.org/draft/next/vocab/format-assertion": true
},
"$dynamicAnchor": "meta",
"allOf": [
{ "$ref": "https://json-schema.org/draft/next/meta/core" },
{ "$ref": "https://json-schema.org/draft/next/meta/format-assertion" }
Expand Down
1 change: 0 additions & 1 deletion json/remotes/draft-next/metaschema-no-validation.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"https://json-schema.org/draft/next/vocab/applicator": true,
"https://json-schema.org/draft/next/vocab/core": true
},
"$dynamicAnchor": "meta",
"allOf": [
{ "$ref": "https://json-schema.org/draft/next/meta/applicator" },
{ "$ref": "https://json-schema.org/draft/next/meta/core" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"https://json-schema.org/draft/next/vocab/core": true,
"http://localhost:1234/draft/next/vocab/custom": false
},
"$dynamicAnchor": "meta",
"allOf": [
{ "$ref": "https://json-schema.org/draft/next/meta/validation" },
{ "$ref": "https://json-schema.org/draft/next/meta/core" }
Expand Down
11 changes: 11 additions & 0 deletions json/remotes/draft-next/subSchemas-defs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://json-schema.org/draft/next/schema",
"$defs": {
"integer": {
"type": "integer"
},
"refToInteger": {
"$ref": "#/$defs/integer"
}
}
}
Loading