Skip to main content

A meta-validator for the JSON Schema specification.

Project description

PyPI version Supported Python versions Build status

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

This version

0.3.3

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bowtie_json_schema-0.3.3.tar.gz (26.7 kB view details)

Uploaded Source

Built Distribution

bowtie_json_schema-0.3.3-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file bowtie_json_schema-0.3.3.tar.gz.

File metadata

  • Download URL: bowtie_json_schema-0.3.3.tar.gz
  • Upload date:
  • Size: 26.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for bowtie_json_schema-0.3.3.tar.gz
Algorithm Hash digest
SHA256 bcf16301d3c9017f2261c9608e2cf3cbb87325ab22fc0b8687f01300ba3a90c8
MD5 fdf3dcd83cae2f43ae05ee0fb72b341a
BLAKE2b-256 b95c996c2aab903c97f19578955feccbc202b78db64654cdca6a6ff99a6a50cf

See more details on using hashes here.

File details

Details for the file bowtie_json_schema-0.3.3-py3-none-any.whl.

File metadata

File hashes

Hashes for bowtie_json_schema-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ea6cafd4447c1e56b00b04f87cd5b4adac108b6264b4514aab0fbad9ad8a0fdd
MD5 8073676e2c719e227931ab916c25f629
BLAKE2b-256 6445706e6bb8a9079c8af1dd436f5957d0e663c7b28ffedd0bc8384c4f20b332

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page