xref: /aosp_15_r20/external/json-schema-validator/src/test/suite/README.md (revision 78c4dd6aa35290980cdcd1623a7e337e8d021c7c)
1*78c4dd6aSAndroid Build Coastguard Worker# JSON Schema Test Suite
2*78c4dd6aSAndroid Build Coastguard Worker
3*78c4dd6aSAndroid Build Coastguard Worker[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](https://github.com/json-schema-org/.github/blob/main/CODE_OF_CONDUCT.md)
4*78c4dd6aSAndroid Build Coastguard Worker[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
5*78c4dd6aSAndroid Build Coastguard Worker[![Financial Contributors on Open Collective](https://opencollective.com/json-schema/all/badge.svg?label=financial+contributors)](https://opencollective.com/json-schema)
6*78c4dd6aSAndroid Build Coastguard Worker
7*78c4dd6aSAndroid Build Coastguard Worker[![DOI](https://zenodo.org/badge/5952934.svg)](https://zenodo.org/badge/latestdoi/5952934)
8*78c4dd6aSAndroid Build Coastguard Worker[![Build Status](https://github.com/json-schema-org/JSON-Schema-Test-Suite/workflows/Test%20Suite%20Sanity%20Checking/badge.svg)](https://github.com/json-schema-org/JSON-Schema-Test-Suite/actions?query=workflow%3A%22Test+Suite+Sanity+Checking%22)
9*78c4dd6aSAndroid Build Coastguard Worker
10*78c4dd6aSAndroid Build Coastguard WorkerThis repository contains a set of JSON objects that implementers of JSON Schema validation libraries can use to test their validators.
11*78c4dd6aSAndroid Build Coastguard Worker
12*78c4dd6aSAndroid Build Coastguard WorkerIt is meant to be language agnostic and should require only a JSON parser.
13*78c4dd6aSAndroid Build Coastguard WorkerThe 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.
14*78c4dd6aSAndroid Build Coastguard Worker
15*78c4dd6aSAndroid Build Coastguard Worker## Coverage
16*78c4dd6aSAndroid Build Coastguard Worker
17*78c4dd6aSAndroid Build Coastguard WorkerAll JSON Schema specification releases should be well covered by this suite, including drafts 2020-12, 2019-09, 07, 06, 04 and 03.
18*78c4dd6aSAndroid Build Coastguard WorkerDrafts 04 and 03 are considered "frozen" in that less effort is put in to backport new tests to these versions.
19*78c4dd6aSAndroid Build Coastguard Worker
20*78c4dd6aSAndroid Build Coastguard WorkerAdditional coverage is always welcome, particularly for bugs encountered in real-world implementations.
21*78c4dd6aSAndroid Build Coastguard WorkerIf you see anything missing or incorrect, please feel free to [file an issue](https://github.com/json-schema-org/JSON-Schema-Test-Suite/issues) or [submit a PR](https://github.com/json-schema-org/JSON-Schema-Test-Suite).
22*78c4dd6aSAndroid Build Coastguard Worker
23*78c4dd6aSAndroid Build Coastguard Worker@gregsdennis has also started a separate [test suite](https://github.com/gregsdennis/json-schema-vocab-test-suites) that is modelled after this suite to cover third-party vocabularies.
24*78c4dd6aSAndroid Build Coastguard Worker
25*78c4dd6aSAndroid Build Coastguard Worker## Introduction to the Test Suite Structure
26*78c4dd6aSAndroid Build Coastguard Worker
27*78c4dd6aSAndroid Build Coastguard WorkerThe tests in this suite are contained in the `tests` directory at the root of this repository.
28*78c4dd6aSAndroid Build Coastguard WorkerInside that directory is a subdirectory for each released version of the specification.
29*78c4dd6aSAndroid Build Coastguard Worker
30*78c4dd6aSAndroid Build Coastguard WorkerThe structure and contents of each file in these directories is described below.
31*78c4dd6aSAndroid Build Coastguard Worker
32*78c4dd6aSAndroid Build Coastguard WorkerIn addition to the version-specific subdirectories, two additional directories are present:
33*78c4dd6aSAndroid Build Coastguard Worker
34*78c4dd6aSAndroid Build Coastguard Worker1. `draft-next/`: containing tests for the next version of the specification whilst it is in development
35*78c4dd6aSAndroid Build Coastguard Worker2. `latest/`: a symbolic link which points to the directory which is the most recent release (which may be useful for implementations providing specific entry points for validating against the latest version of the specification)
36*78c4dd6aSAndroid Build Coastguard Worker
37*78c4dd6aSAndroid Build Coastguard WorkerInside each version directory there are a number of `.json` files each containing a collection of related tests.
38*78c4dd6aSAndroid Build Coastguard WorkerOften the grouping is by property under test, but not always.
39*78c4dd6aSAndroid Build Coastguard WorkerIn addition to the `.json` files, each version directory contains one or more special subdirectories whose purpose is [described below](#subdirectories-within-each-draft), and which contain additional `.json` files.
40*78c4dd6aSAndroid Build Coastguard Worker
41*78c4dd6aSAndroid Build Coastguard WorkerEach `.json` file consists of a single JSON array of test cases.
42*78c4dd6aSAndroid Build Coastguard Worker
43*78c4dd6aSAndroid Build Coastguard Worker### Terminology
44*78c4dd6aSAndroid Build Coastguard Worker
45*78c4dd6aSAndroid Build Coastguard WorkerFor clarity, we first define this document's usage of some testing terminology:
46*78c4dd6aSAndroid Build Coastguard Worker
47*78c4dd6aSAndroid Build Coastguard Worker| term            | definition                                                                                                                                                        |
48*78c4dd6aSAndroid Build Coastguard Worker|-----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
49*78c4dd6aSAndroid Build Coastguard Worker| **test suite**  | the entirety of the contents of this repository, containing tests for multiple different releases of the JSON Schema specification                                |
50*78c4dd6aSAndroid Build Coastguard Worker| **test case**   | a single schema, along with a description and an array of *test*s                                                                                                 |
51*78c4dd6aSAndroid Build Coastguard Worker| **test**        | within a *test case*, a single test example, containing a description, instance and a boolean indicating whether the instance is valid under the test case schema |
52*78c4dd6aSAndroid Build Coastguard Worker| **test runner** | a program, external to this repository and authored by a user of this suite, which is executing each of the tests in the suite                                    |
53*78c4dd6aSAndroid Build Coastguard Worker
54*78c4dd6aSAndroid Build Coastguard WorkerAn example illustrating this structure is immediately below, and a JSON Schema containing a formal definition of the contents of test cases can be found [alongside this README](./test-schema.json).
55*78c4dd6aSAndroid Build Coastguard Worker
56*78c4dd6aSAndroid Build Coastguard Worker### Sample Test Case
57*78c4dd6aSAndroid Build Coastguard Worker
58*78c4dd6aSAndroid Build Coastguard WorkerHere is a single *test case*, containing one or more tests:
59*78c4dd6aSAndroid Build Coastguard Worker
60*78c4dd6aSAndroid Build Coastguard Worker```json
61*78c4dd6aSAndroid Build Coastguard Worker{
62*78c4dd6aSAndroid Build Coastguard Worker    "description": "The test case description",
63*78c4dd6aSAndroid Build Coastguard Worker    "schema": { "type": "string" },
64*78c4dd6aSAndroid Build Coastguard Worker    "tests": [
65*78c4dd6aSAndroid Build Coastguard Worker        {
66*78c4dd6aSAndroid Build Coastguard Worker            "description": "a test with a valid instance",
67*78c4dd6aSAndroid Build Coastguard Worker            "data": "a string",
68*78c4dd6aSAndroid Build Coastguard Worker            "valid": true
69*78c4dd6aSAndroid Build Coastguard Worker        },
70*78c4dd6aSAndroid Build Coastguard Worker        {
71*78c4dd6aSAndroid Build Coastguard Worker            "description": "a test with an invalid instance",
72*78c4dd6aSAndroid Build Coastguard Worker            "data": 15,
73*78c4dd6aSAndroid Build Coastguard Worker            "valid": false
74*78c4dd6aSAndroid Build Coastguard Worker        }
75*78c4dd6aSAndroid Build Coastguard Worker    ]
76*78c4dd6aSAndroid Build Coastguard Worker}
77*78c4dd6aSAndroid Build Coastguard Worker```
78*78c4dd6aSAndroid Build Coastguard Worker
79*78c4dd6aSAndroid Build Coastguard Worker### Subdirectories Within Each Draft
80*78c4dd6aSAndroid Build Coastguard Worker
81*78c4dd6aSAndroid Build Coastguard WorkerThere is currently only one additional subdirectory that may exist within each draft test directory.
82*78c4dd6aSAndroid Build Coastguard Worker
83*78c4dd6aSAndroid Build Coastguard WorkerThis is:
84*78c4dd6aSAndroid Build Coastguard Worker
85*78c4dd6aSAndroid Build Coastguard Worker1. `optional/`: Contains tests that are considered optional.
86*78c4dd6aSAndroid Build Coastguard Worker
87*78c4dd6aSAndroid Build Coastguard WorkerNote, 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
88*78c4dd6aSAndroid Build Coastguard Workerwhich case they are not truly optional in such a language).
89*78c4dd6aSAndroid Build Coastguard WorkerIn the future this directory structure will be made richer to reflect these differences more clearly.
90*78c4dd6aSAndroid Build Coastguard Worker
91*78c4dd6aSAndroid Build Coastguard Worker## Using the Suite to Test a Validator Implementation
92*78c4dd6aSAndroid Build Coastguard Worker
93*78c4dd6aSAndroid Build Coastguard WorkerThe test suite structure was described [above](#introduction-to-the-test-suite-structure).
94*78c4dd6aSAndroid Build Coastguard Worker
95*78c4dd6aSAndroid Build Coastguard WorkerIf you are authoring a new validator implementation, or adding support for an additional version of the specification, this section describes:
96*78c4dd6aSAndroid Build Coastguard Worker
97*78c4dd6aSAndroid Build Coastguard Worker1. How to implement a test runner which passes tests to your validator
98*78c4dd6aSAndroid Build Coastguard Worker2. Assumptions the suite makes about how the test runner will configure your validator
99*78c4dd6aSAndroid Build Coastguard Worker3. Invariants the test suite claims to hold for its tests
100*78c4dd6aSAndroid Build Coastguard Worker
101*78c4dd6aSAndroid Build Coastguard Worker### How to Implement a Test Runner
102*78c4dd6aSAndroid Build Coastguard Worker
103*78c4dd6aSAndroid Build Coastguard WorkerPresented here is a possible implementation of a test runner.
104*78c4dd6aSAndroid Build Coastguard WorkerThe precise steps described do not need to be followed exactly, but the results of your own procedure should produce the same effects.
105*78c4dd6aSAndroid Build Coastguard Worker
106*78c4dd6aSAndroid Build Coastguard WorkerTo test a specific version:
107*78c4dd6aSAndroid Build Coastguard Worker
108*78c4dd6aSAndroid Build Coastguard Worker* 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
109*78c4dd6aSAndroid Build Coastguard Worker* 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
110*78c4dd6aSAndroid Build Coastguard Worker* Load any remote references [described below](additional-assumptions) and configure your implementation to retrieve them via their URIs
111*78c4dd6aSAndroid Build Coastguard Worker* Walk the filesystem tree for that version's subdirectory and for each `.json` file found:
112*78c4dd6aSAndroid Build Coastguard Worker
113*78c4dd6aSAndroid Build Coastguard Worker    * if the file is located in the root of the version directory:
114*78c4dd6aSAndroid Build Coastguard Worker
115*78c4dd6aSAndroid Build Coastguard Worker        * for each test case present in the file:
116*78c4dd6aSAndroid Build Coastguard Worker
117*78c4dd6aSAndroid Build Coastguard Worker            * load the schema from the `"schema"` property
118*78c4dd6aSAndroid Build Coastguard Worker            * load (or log) the test case description from the `"description"` property for debugging or outputting
119*78c4dd6aSAndroid Build Coastguard Worker            * for each test in the `"tests"` property:
120*78c4dd6aSAndroid Build Coastguard Worker
121*78c4dd6aSAndroid Build Coastguard Worker                * load the instance to be tested from the `"data"` property
122*78c4dd6aSAndroid Build Coastguard Worker                * load (or log) the individual test description from the `"description"` property for debugging or outputting
123*78c4dd6aSAndroid Build Coastguard Worker
124*78c4dd6aSAndroid Build Coastguard Worker                * use the schema loaded above to validate whether the instance is considered valid under your implementation
125*78c4dd6aSAndroid Build Coastguard Worker
126*78c4dd6aSAndroid Build Coastguard Worker                * if the result from your implementation matches the value found in the `"valid"` property, your implementation correctly implements the specific example
127*78c4dd6aSAndroid Build Coastguard Worker                * if the result does not match, or your implementation errors or crashes, your implementation does not correctly implement the specific example
128*78c4dd6aSAndroid Build Coastguard Worker
129*78c4dd6aSAndroid Build Coastguard Worker    * otherwise it is located in a special subdirectory as described above.
130*78c4dd6aSAndroid Build Coastguard Worker      Follow the additional assumptions and restrictions for the containing subdirectory, then run the test case as above.
131*78c4dd6aSAndroid Build Coastguard Worker
132*78c4dd6aSAndroid Build Coastguard WorkerIf your implementation supports multiple versions, run the above procedure for each version supported, configuring your implementation as appropriate to call each version individually.
133*78c4dd6aSAndroid Build Coastguard Worker
134*78c4dd6aSAndroid Build Coastguard Worker### Additional Assumptions
135*78c4dd6aSAndroid Build Coastguard Worker
136*78c4dd6aSAndroid Build Coastguard Worker1. The suite, notably in its `refRemote.json` file in each draft, expects a number of remote references to be configured.
137*78c4dd6aSAndroid Build Coastguard Worker   These are JSON documents, identified by URI, which are used by the suite to test the behavior of the `$ref` keyword (and related keywords).
138*78c4dd6aSAndroid Build Coastguard Worker   Depending on your implementation, you may configure how to "register" these *either*:
139*78c4dd6aSAndroid Build Coastguard Worker
140*78c4dd6aSAndroid Build Coastguard Worker    * by directly retrieving them off the filesystem from the `remotes/` directory, in which case you should load each schema with a retrieval URI of `http://localhost:1234` followed by the relative path from the remotes directory -- e.g. a `$ref` to `http://localhost:1234/foo/bar/baz.json` is expected to resolve to the contents of the file at `remotes/foo/bar/baz.json`
141*78c4dd6aSAndroid Build Coastguard Worker
142*78c4dd6aSAndroid Build Coastguard Worker    * or alternatively, by executing `bin/jsonschema_suite remotes` using the executable in the `bin/` directory, which will output a JSON object containing all of the remotes combined, e.g.:
143*78c4dd6aSAndroid Build Coastguard Worker
144*78c4dd6aSAndroid Build Coastguard Worker    ```
145*78c4dd6aSAndroid Build Coastguard Worker
146*78c4dd6aSAndroid Build Coastguard Worker    $  bin/jsonschema_suite remotes
147*78c4dd6aSAndroid Build Coastguard Worker    ```
148*78c4dd6aSAndroid Build Coastguard Worker    ```json
149*78c4dd6aSAndroid Build Coastguard Worker    {
150*78c4dd6aSAndroid Build Coastguard Worker        "http://localhost:1234/baseUriChange/folderInteger.json": {
151*78c4dd6aSAndroid Build Coastguard Worker            "type": "integer"
152*78c4dd6aSAndroid Build Coastguard Worker        },
153*78c4dd6aSAndroid Build Coastguard Worker        "http://localhost:1234/baseUriChangeFolder/folderInteger.json": {
154*78c4dd6aSAndroid Build Coastguard Worker            "type": "integer"
155*78c4dd6aSAndroid Build Coastguard Worker        }
156*78c4dd6aSAndroid Build Coastguard Worker    }
157*78c4dd6aSAndroid Build Coastguard Worker    ```
158*78c4dd6aSAndroid Build Coastguard Worker
159*78c4dd6aSAndroid Build Coastguard Worker2. Test cases found within [special subdirectories](#subdirectories-within-each-draft) may require additional configuration to run.
160*78c4dd6aSAndroid Build Coastguard Worker   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).
161*78c4dd6aSAndroid Build Coastguard Worker
162*78c4dd6aSAndroid Build Coastguard Worker### Invariants & Guarantees
163*78c4dd6aSAndroid Build Coastguard Worker
164*78c4dd6aSAndroid Build Coastguard WorkerThe test suite guarantees a number of things about tests it defines.
165*78c4dd6aSAndroid Build Coastguard WorkerAny deviation from the below is generally considered a bug.
166*78c4dd6aSAndroid Build Coastguard WorkerIf you suspect one, please [file an issue](https://github.com/json-schema-org/JSON-Schema-Test-Suite/issues/new):
167*78c4dd6aSAndroid Build Coastguard Worker
168*78c4dd6aSAndroid Build Coastguard Worker1. All files containing test cases are valid JSON.
169*78c4dd6aSAndroid Build Coastguard Worker2. The contents of the `"schema"` property in a test case are always valid
170*78c4dd6aSAndroid Build Coastguard Worker   JSON Schemas under the corresponding specification.
171*78c4dd6aSAndroid Build Coastguard Worker
172*78c4dd6aSAndroid Build Coastguard Worker   The rationale behind this is that we are testing instances in a test's `"data"` element, and not the schema itself.
173*78c4dd6aSAndroid Build Coastguard Worker   A number of tests *do* test the validity of a schema itself, but do so by representing the schema as an instance inside a test, with the associated meta-schema in the `"schema"` property (via the `"$ref"` keyword):
174*78c4dd6aSAndroid Build Coastguard Worker
175*78c4dd6aSAndroid Build Coastguard Worker   ```json
176*78c4dd6aSAndroid Build Coastguard Worker   {
177*78c4dd6aSAndroid Build Coastguard Worker       "description": "Test the \"type\" schema keyword",
178*78c4dd6aSAndroid Build Coastguard Worker       "schema": {
179*78c4dd6aSAndroid Build Coastguard Worker           "$ref": "https://json-schema.org/draft/2019-09/schema"
180*78c4dd6aSAndroid Build Coastguard Worker        },
181*78c4dd6aSAndroid Build Coastguard Worker       "tests": [
182*78c4dd6aSAndroid Build Coastguard Worker           {
183*78c4dd6aSAndroid Build Coastguard Worker               "description": "Valid: string",
184*78c4dd6aSAndroid Build Coastguard Worker               "data": {
185*78c4dd6aSAndroid Build Coastguard Worker                   "type": "string"
186*78c4dd6aSAndroid Build Coastguard Worker               },
187*78c4dd6aSAndroid Build Coastguard Worker               "valid": true
188*78c4dd6aSAndroid Build Coastguard Worker           },
189*78c4dd6aSAndroid Build Coastguard Worker           {
190*78c4dd6aSAndroid Build Coastguard Worker               "description": "Invalid: null",
191*78c4dd6aSAndroid Build Coastguard Worker               "data": {
192*78c4dd6aSAndroid Build Coastguard Worker                   "type": null
193*78c4dd6aSAndroid Build Coastguard Worker               },
194*78c4dd6aSAndroid Build Coastguard Worker               "valid": false
195*78c4dd6aSAndroid Build Coastguard Worker           }
196*78c4dd6aSAndroid Build Coastguard Worker       ]
197*78c4dd6aSAndroid Build Coastguard Worker   }
198*78c4dd6aSAndroid Build Coastguard Worker   ```
199*78c4dd6aSAndroid Build Coastguard Worker   See below for some [known limitations](#known-limitations).
200*78c4dd6aSAndroid Build Coastguard Worker
201*78c4dd6aSAndroid Build Coastguard Worker## Known Limitations
202*78c4dd6aSAndroid Build Coastguard Worker
203*78c4dd6aSAndroid Build Coastguard WorkerThis suite expresses its assertions about the behavior of an implementation *within* JSON Schema itself.
204*78c4dd6aSAndroid Build Coastguard WorkerEach test is the application of a schema to a particular instance.
205*78c4dd6aSAndroid Build Coastguard WorkerThis means that the suite of tests can test against any behavior a schema can describe, and conversely cannot test against any behavior which a schema is incapable of representing, even if the behavior is mandated by the specification.
206*78c4dd6aSAndroid Build Coastguard Worker
207*78c4dd6aSAndroid Build Coastguard WorkerFor example, a schema can require that a string is a _URI-reference_ and even that it matches a certain pattern, but even though the specification contains [recommendations about URIs being normalized](https://json-schema.org/draft/2020-12/json-schema-core.html#name-the-id-keyword), a JSON schema cannot today represent this assertion within the core vocabularies of the specifications, so no test covers this behavior.
208*78c4dd6aSAndroid Build Coastguard Worker
209*78c4dd6aSAndroid Build Coastguard Worker## Who Uses the Test Suite
210*78c4dd6aSAndroid Build Coastguard Worker
211*78c4dd6aSAndroid Build Coastguard WorkerThis suite is being used by:
212*78c4dd6aSAndroid Build Coastguard Worker
213*78c4dd6aSAndroid Build Coastguard Worker### Clojure
214*78c4dd6aSAndroid Build Coastguard Worker
215*78c4dd6aSAndroid Build Coastguard Worker* [jinx](https://github.com/juxt/jinx)
216*78c4dd6aSAndroid Build Coastguard Worker* [json-schema](https://github.com/tatut/json-schema)
217*78c4dd6aSAndroid Build Coastguard Worker
218*78c4dd6aSAndroid Build Coastguard Worker### Coffeescript
219*78c4dd6aSAndroid Build Coastguard Worker
220*78c4dd6aSAndroid Build Coastguard Worker* [jsck](https://github.com/pandastrike/jsck)
221*78c4dd6aSAndroid Build Coastguard Worker
222*78c4dd6aSAndroid Build Coastguard Worker### Common Lisp
223*78c4dd6aSAndroid Build Coastguard Worker
224*78c4dd6aSAndroid Build Coastguard Worker* [json-schema](https://github.com/fisxoj/json-schema)
225*78c4dd6aSAndroid Build Coastguard Worker
226*78c4dd6aSAndroid Build Coastguard Worker### C++
227*78c4dd6aSAndroid Build Coastguard Worker
228*78c4dd6aSAndroid Build Coastguard Worker* [Modern C++ JSON schema validator](https://github.com/pboettch/json-schema-validator)
229*78c4dd6aSAndroid Build Coastguard Worker* [Valijson](https://github.com/tristanpenman/valijson)
230*78c4dd6aSAndroid Build Coastguard Worker
231*78c4dd6aSAndroid Build Coastguard Worker### Dart
232*78c4dd6aSAndroid Build Coastguard Worker
233*78c4dd6aSAndroid Build Coastguard Worker* [json\_schema](https://github.com/patefacio/json_schema)
234*78c4dd6aSAndroid Build Coastguard Worker
235*78c4dd6aSAndroid Build Coastguard Worker### Elixir
236*78c4dd6aSAndroid Build Coastguard Worker
237*78c4dd6aSAndroid Build Coastguard Worker* [ex\_json\_schema](https://github.com/jonasschmidt/ex_json_schema)
238*78c4dd6aSAndroid Build Coastguard Worker
239*78c4dd6aSAndroid Build Coastguard Worker### Erlang
240*78c4dd6aSAndroid Build Coastguard Worker
241*78c4dd6aSAndroid Build Coastguard Worker* [jesse](https://github.com/for-GET/jesse)
242*78c4dd6aSAndroid Build Coastguard Worker
243*78c4dd6aSAndroid Build Coastguard Worker### Go
244*78c4dd6aSAndroid Build Coastguard Worker
245*78c4dd6aSAndroid Build Coastguard Worker* [gojsonschema](https://github.com/sigu-399/gojsonschema)
246*78c4dd6aSAndroid Build Coastguard Worker* [validate-json](https://github.com/cesanta/validate-json)
247*78c4dd6aSAndroid Build Coastguard Worker
248*78c4dd6aSAndroid Build Coastguard Worker### Haskell
249*78c4dd6aSAndroid Build Coastguard Worker
250*78c4dd6aSAndroid Build Coastguard Worker* [aeson-schema](https://github.com/timjb/aeson-schema)
251*78c4dd6aSAndroid Build Coastguard Worker* [hjsonschema](https://github.com/seagreen/hjsonschema)
252*78c4dd6aSAndroid Build Coastguard Worker
253*78c4dd6aSAndroid Build Coastguard Worker### Java
254*78c4dd6aSAndroid Build Coastguard Worker
255*78c4dd6aSAndroid Build Coastguard Worker* [json-schema-validator](https://github.com/daveclayton/json-schema-validator)
256*78c4dd6aSAndroid Build Coastguard Worker* [everit-org/json-schema](https://github.com/everit-org/json-schema)
257*78c4dd6aSAndroid Build Coastguard Worker* [networknt/json-schema-validator](https://github.com/networknt/json-schema-validator)
258*78c4dd6aSAndroid Build Coastguard Worker* [Justify](https://github.com/leadpony/justify)
259*78c4dd6aSAndroid Build Coastguard Worker* [Snow](https://github.com/ssilverman/snowy-json)
260*78c4dd6aSAndroid Build Coastguard Worker* [jsonschemafriend](https://github.com/jimblackler/jsonschemafriend)
261*78c4dd6aSAndroid Build Coastguard Worker
262*78c4dd6aSAndroid Build Coastguard Worker### JavaScript
263*78c4dd6aSAndroid Build Coastguard Worker
264*78c4dd6aSAndroid Build Coastguard Worker* [json-schema-benchmark](https://github.com/Muscula/json-schema-benchmark)
265*78c4dd6aSAndroid Build Coastguard Worker* [direct-schema](https://github.com/IreneKnapp/direct-schema)
266*78c4dd6aSAndroid Build Coastguard Worker* [is-my-json-valid](https://github.com/mafintosh/is-my-json-valid)
267*78c4dd6aSAndroid Build Coastguard Worker* [jassi](https://github.com/iclanzan/jassi)
268*78c4dd6aSAndroid Build Coastguard Worker* [JaySchema](https://github.com/natesilva/jayschema)
269*78c4dd6aSAndroid Build Coastguard Worker* [json-schema-valid](https://github.com/ericgj/json-schema-valid)
270*78c4dd6aSAndroid Build Coastguard Worker* [Jsonary](https://github.com/jsonary-js/jsonary)
271*78c4dd6aSAndroid Build Coastguard Worker* [jsonschema](https://github.com/tdegrunt/jsonschema)
272*78c4dd6aSAndroid Build Coastguard Worker* [request-validator](https://github.com/bugventure/request-validator)
273*78c4dd6aSAndroid Build Coastguard Worker* [skeemas](https://github.com/Prestaul/skeemas)
274*78c4dd6aSAndroid Build Coastguard Worker* [tv4](https://github.com/geraintluff/tv4)
275*78c4dd6aSAndroid Build Coastguard Worker* [z-schema](https://github.com/zaggino/z-schema)
276*78c4dd6aSAndroid Build Coastguard Worker* [jsen](https://github.com/bugventure/jsen)
277*78c4dd6aSAndroid Build Coastguard Worker* [ajv](https://github.com/epoberezkin/ajv)
278*78c4dd6aSAndroid Build Coastguard Worker* [djv](https://github.com/korzio/djv)
279*78c4dd6aSAndroid Build Coastguard Worker
280*78c4dd6aSAndroid Build Coastguard Worker### Node.js
281*78c4dd6aSAndroid Build Coastguard Worker
282*78c4dd6aSAndroid Build Coastguard WorkerFor node.js developers, the suite is also available as an [npm](https://www.npmjs.com/package/@json-schema-org/tests) package.
283*78c4dd6aSAndroid Build Coastguard Worker
284*78c4dd6aSAndroid Build Coastguard WorkerNode-specific support is maintained in a [separate repository](https://github.com/json-schema-org/json-schema-test-suite-npm) which also welcomes your contributions!
285*78c4dd6aSAndroid Build Coastguard Worker
286*78c4dd6aSAndroid Build Coastguard Worker### .NET
287*78c4dd6aSAndroid Build Coastguard Worker
288*78c4dd6aSAndroid Build Coastguard Worker* [JsonSchema.Net](https://github.com/gregsdennis/json-everything)
289*78c4dd6aSAndroid Build Coastguard Worker* [Newtonsoft.Json.Schema](https://github.com/JamesNK/Newtonsoft.Json.Schema)
290*78c4dd6aSAndroid Build Coastguard Worker
291*78c4dd6aSAndroid Build Coastguard Worker### Perl
292*78c4dd6aSAndroid Build Coastguard Worker
293*78c4dd6aSAndroid Build Coastguard Worker* [Test::JSON::Schema::Acceptance](https://github.com/karenetheridge/Test-JSON-Schema-Acceptance) (a wrapper of this test suite)
294*78c4dd6aSAndroid Build Coastguard Worker* [JSON::Schema::Modern](https://github.com/karenetheridge/JSON-Schema-Modern)
295*78c4dd6aSAndroid Build Coastguard Worker* [JSON::Schema::Tiny](https://github.com/karenetheridge/JSON-Schema-Tiny)
296*78c4dd6aSAndroid Build Coastguard Worker
297*78c4dd6aSAndroid Build Coastguard Worker### PHP
298*78c4dd6aSAndroid Build Coastguard Worker
299*78c4dd6aSAndroid Build Coastguard Worker* [opis/json-schema](https://github.com/opis/json-schema)
300*78c4dd6aSAndroid Build Coastguard Worker* [json-schema](https://github.com/justinrainbow/json-schema)
301*78c4dd6aSAndroid Build Coastguard Worker* [json-guard](https://github.com/thephpleague/json-guard)
302*78c4dd6aSAndroid Build Coastguard Worker
303*78c4dd6aSAndroid Build Coastguard Worker### PostgreSQL
304*78c4dd6aSAndroid Build Coastguard Worker
305*78c4dd6aSAndroid Build Coastguard Worker* [postgres-json-schema](https://github.com/gavinwahl/postgres-json-schema)
306*78c4dd6aSAndroid Build Coastguard Worker* [is\_jsonb\_valid](https://github.com/furstenheim/is_jsonb_valid)
307*78c4dd6aSAndroid Build Coastguard Worker
308*78c4dd6aSAndroid Build Coastguard Worker### Python
309*78c4dd6aSAndroid Build Coastguard Worker
310*78c4dd6aSAndroid Build Coastguard Worker* [jsonschema](https://github.com/Julian/jsonschema)
311*78c4dd6aSAndroid Build Coastguard Worker* [fastjsonschema](https://github.com/seznam/python-fastjsonschema)
312*78c4dd6aSAndroid Build Coastguard Worker* [hypothesis-jsonschema](https://github.com/Zac-HD/hypothesis-jsonschema)
313*78c4dd6aSAndroid Build Coastguard Worker* [jschon](https://github.com/marksparkza/jschon)
314*78c4dd6aSAndroid Build Coastguard Worker* [python-experimental, OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/python-experimental.md)
315*78c4dd6aSAndroid Build Coastguard Worker
316*78c4dd6aSAndroid Build Coastguard Worker### Ruby
317*78c4dd6aSAndroid Build Coastguard Worker
318*78c4dd6aSAndroid Build Coastguard Worker* [json-schema](https://github.com/hoxworth/json-schema)
319*78c4dd6aSAndroid Build Coastguard Worker* [json\_schemer](https://github.com/davishmcclurg/json_schemer)
320*78c4dd6aSAndroid Build Coastguard Worker
321*78c4dd6aSAndroid Build Coastguard Worker### Rust
322*78c4dd6aSAndroid Build Coastguard Worker
323*78c4dd6aSAndroid Build Coastguard Worker* [jsonschema](https://github.com/Stranger6667/jsonschema-rs)
324*78c4dd6aSAndroid Build Coastguard Worker* [valico](https://github.com/rustless/valico)
325*78c4dd6aSAndroid Build Coastguard Worker
326*78c4dd6aSAndroid Build Coastguard Worker### Scala
327*78c4dd6aSAndroid Build Coastguard Worker
328*78c4dd6aSAndroid Build Coastguard Worker* [typed-json](https://github.com/frawa/typed-json)
329*78c4dd6aSAndroid Build Coastguard Worker
330*78c4dd6aSAndroid Build Coastguard Worker### Swift
331*78c4dd6aSAndroid Build Coastguard Worker
332*78c4dd6aSAndroid Build Coastguard Worker* [JSONSchema](https://github.com/kylef/JSONSchema.swift)
333*78c4dd6aSAndroid Build Coastguard Worker
334*78c4dd6aSAndroid Build Coastguard WorkerIf you use it as well, please fork and send a pull request adding yourself to
335*78c4dd6aSAndroid Build Coastguard Workerthe list :).
336*78c4dd6aSAndroid Build Coastguard Worker
337*78c4dd6aSAndroid Build Coastguard Worker## Contributing
338*78c4dd6aSAndroid Build Coastguard Worker
339*78c4dd6aSAndroid Build Coastguard WorkerIf you see something missing or incorrect, a pull request is most welcome!
340*78c4dd6aSAndroid Build Coastguard Worker
341*78c4dd6aSAndroid Build Coastguard WorkerThere are some sanity checks in place for testing the test suite. You can run
342*78c4dd6aSAndroid Build Coastguard Workerthem with `bin/jsonschema_suite check` or `tox`. They will be run automatically
343*78c4dd6aSAndroid Build Coastguard Workerby [GitHub Actions](https://github.com/json-schema-org/JSON-Schema-Test-Suite/actions?query=workflow%3A%22Test+Suite+Sanity+Checking%22)
344*78c4dd6aSAndroid Build Coastguard Workeras well.
345*78c4dd6aSAndroid Build Coastguard Worker
346*78c4dd6aSAndroid Build Coastguard WorkerThis repository is maintained by the JSON Schema organization, and will be governed by the JSON Schema steering committee (once it exists).
347