You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BODY="### test-id-bot added ${TOTAL_IDS} missing test ID(s)\n\n${SUMMARY}\n\nView the full diff of added IDs: ${COMMIT_URL}\n\n> IDs are deterministic hashes based on the schema, test data, and expected result."
This repository contains a set of JSON objects that implementers of JSON Schema validation libraries can use to test their validators.
11
+
The test suite repository exists to verify specified behavior defined by the JSON Schema specification and should not be confused with a style guide. It is not intended to demonstrate how schemas ought to be written. Tests may appear unusual or unintuitive, but they exist solely to exercise behavior prescribed by the specification.
11
12
12
13
It is meant to be language agnostic and should require only a JSON parser.
13
14
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.
@@ -79,15 +80,13 @@ Here is a single *test case*, containing one or more tests:
79
80
80
81
### Subdirectories Within Each Version directory
81
82
82
-
There is currently only one additional subdirectory that may exist within each specification version test directory.
83
+
A specification version test directory may contain one or more subdirectories.
83
84
84
-
This is:
85
+
These are:
85
86
86
-
1.`optional/`: Contains tests that are considered optional.
87
+
1.`optional/`: Contains tests that are considered optional. Note that this subdirectory currently conflates many reasons why a test may be optional -- it may be because tests within a particular file are indeed not required by the specification but still potentially useful to an implementer, or it may be because tests within it only apply to programming languages with particular functionality (in which case they are not truly optional in such a language). In the future this directory structure will be made richer to reflect these differences more clearly.
87
88
88
-
Note, the `optional/` subdirectory today conflates many reasons why a test may be optional -- it may be because tests within a particular file are indeed not required by the specification but still potentially useful to an implementer, or it may be because tests within it only apply to programming languages with particular functionality (in
89
-
which case they are not truly optional in such a language).
90
-
In the future this directory structure will be made richer to reflect these differences more clearly.
89
+
2.`proposals/`: Contains a subfolder for each active proposal to the specification. If the proposal is a keyword (generally the case), then the subfolder will bear the name of that keyword. Inside the proposal subfolder is a series of test files that would contain amendments to the required test suite should the proposal be incorporated into the specification. These test should be considered volitile while the proposal is in development, however implementations claiming to support the proposal are expected to pass its tests.
91
90
92
91
## Using the Suite to Test a Validator Implementation
*[M3](https://github.com/JulesGosnell/m3) (all drafts, pure Clojure — also usable from Kotlin, Scala, and JavaScript)
265
266
266
267
### JavaScript
267
268
@@ -280,10 +281,17 @@ This suite is being used by:
280
281
*[jsen](https://github.com/bugventure/jsen)
281
282
*[ajv](https://github.com/epoberezkin/ajv)
282
283
*[djv](https://github.com/korzio/djv)
284
+
*[M3](https://github.com/JulesGosnell/m3) (all drafts, pure Clojure — also usable from Java, Kotlin, and Scala)
283
285
284
286
### Kotlin
285
287
286
288
*[json-schema-validation-comparison](https://www.creekservice.org/json-schema-validation-comparison/functional) (Comparison site for JVM-based validator implementations)
@@ -334,13 +342,17 @@ Node-specific support is maintained in a [separate repository](https://github.co
334
342
### Scala
335
343
336
344
*[json-schema-validation-comparison](https://www.creekservice.org/json-schema-validation-comparison/functional) (Comparison site for JVM-based validator implementations)
0 commit comments