diff --git a/README.md b/README.md index 58a1e77a59caf293cf68e1658fa879d016e6c63c..cf5de8ca4d85f559f2369aab3d5b594ea83a8b48 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [](https://github.com/neilpa/yajsv/actions/) -Yet Another [JSON-Schema](https://json-schema.org) Validator. Command line tool for validating JSON and YAML documents against provided schemas. +Yet Another [JSON-Schema](https://json-schema.org) Validator. Command line tool for validating JSON and/or YAML documents against provided schemas. The real credit goes to [xeipuuv/gojsonschema](https://github.com/xeipuuv/gojsonschema) which does the heavy lifting behind this CLI. @@ -11,14 +11,14 @@ The real credit goes to [xeipuuv/gojsonschema](https://github.com/xeipuuv/gojson Simply use `go get` to install ``` -go get github.com/neilpa/yajsv +go get neilpa.me/yajsv ``` There are also pre-built static binaries for Windows, Mac and Linux on the [releases tab](https://github.com/neilpa/yajsv/releases/latest). ## Usage -yajsv validates JSON and YAML documents against a schema, providing a status per document: +Yajsv validates JSON (and/or YAML) documents against a JSON-Schema, providing a status per document: * pass: Document is valid relative to the schema * fail: Document is invalid relative to the schema @@ -26,11 +26,6 @@ yajsv validates JSON and YAML documents against a schema, providing a status per The 'fail' status may be reported multiple times per-document, once for each schema validation failure. -Basic usage - -Any combination can be used for schema and document. For example you can use a JSON schema to validate a YAML document. - - Basic usage example ``` @@ -38,18 +33,17 @@ $ yajsv -s schema.json document.json document.json: pass ``` -Basic usage example with YAML schema and document: +Or with both schema and doc in YAML. ``` $ yajsv -s schema.yml document.yml document.yml: pass ``` - With multiple schema files and docs ``` -$ yajsv -s schema.json -r foo.json -r bar.json doc1.json doc2.json +$ yajsv -s schema.json -r foo.json -r bar.yaml doc1.json doc2.yaml doc1.json: pass doc2.json: pass ``` @@ -63,7 +57,11 @@ docs/b.json: fail: Validation failure message ... ``` -Note that each of the referenced schema is assumed to be a path on the local filesystem. These are not -URI references to either local or external schemas and documents. +Note that each referenced schema is assumed to be a path on the local filesystem. These are not +URI references to either local or external files. See `yajsv -h` for more details + +## Licence + +[MIT](/LICENSE)