A meta-validator for the JSON Schema specification.
Project description
Bowtie is a meta-validator of the JSON Schema specification, by which we mean it coordinates executing other validator implementations, collecting and reporting on their results.
To do so it defines a simple input/output protocol (specified in this JSON Schema which validator implementations can implement, and it provides a CLI which can execute supported implementations.
It’s called Bowtie because it fans in lots of JSON then fans out lots of results: >·<. Looks like a bowtie, no? Also because it’s elegant – we hope.
Execution
In general, executing bowtie consists of providing 2 pieces of input:
The names of one or more supported implementations to execute
One or more test cases to run against these implementations (schemas, instances and optionally, expected validation results)
Given these, bowtie will report on the result of executing each implementation against the input schema/instance pairs. If expected results are provided, it will compare the results produced against the expected ones, reporting on any implementations which differ from the expected output.
CLI
A sample invocation of the CLI is:
$ bowtie run -i some/jsonschema-implementation/docker-image <<EOF
{"description": "stuff", "schema": {}, "tests": [{"description": "a test", "instance": {"foo": "bar"}}] }
EOF
{"valid": true}
(TODO)
Uses
A key use of bowtie is in executing as input the official test suite and comparing the results produced by implementations to the expected ones from the suite.
Of course one isn’t limited to just the test cases in the test suite, as bowtie can be used to compare the validation results of any input across its supported implementations.
Adding an Implementation
Add a Dockerfile which runs as its entry point a bowtie-compatible process to the implementations/ directory in the root of this repository.
Name your directory <(ascii-compatible-name-of-)language-your-implementation-is-written-in>-<language-specific-package-identifier>, so if your implementation is written in B++ and called flooblekins, name the directory bpp-flooblekins.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file bowtie_json_schema-0.2.1.tar.gz
.
File metadata
- Download URL: bowtie_json_schema-0.2.1.tar.gz
- Upload date:
- Size: 28.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46fceef90a49e16a4ff4336874eb44bc9369c44378ba3b5d5d301645e3fad700 |
|
MD5 | 33bcdae933f911119c7da6d5d6025943 |
|
BLAKE2b-256 | 37648e9345bb02c9a95b097d48cd70c1fc78fdbae06d63ff97b6db6af5537d13 |
File details
Details for the file bowtie_json_schema-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: bowtie_json_schema-0.2.1-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aedfa4e270980a25ba45c4cab64ffc7c84cbc31344f3f0926ae895273da2208a |
|
MD5 | 052d1fd27a4bed8bc138d00899cd54e9 |
|
BLAKE2b-256 | acd9102ada5c5e3bf76cb1e39575ea1eb8fd46a02a43221c9e32efa7cdd195c5 |