Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
yajsv - Yet Another Json Schema Validator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
SmartDataLab
public
CI-CD tools
yajsv - Yet Another Json Schema Validator
Commits
50710192
Unverified
Commit
50710192
authored
5 years ago
by
Neil Pankey
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
readme: Minor cleanup
parent
bb09bb6f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+11
-13
11 additions, 13 deletions
README.md
with
11 additions
and
13 deletions
README.md
+
11
−
13
View file @
50710192
...
...
@@ -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
y
ajsv validates JSON and YAML documents against a
s
chema, providing a status per document:
Y
ajsv validates JSON
(
and
/or
YAML
)
documents against a
JSON-S
chema, 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 doc
ument:
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 document
s.
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
file
s.
See
`yajsv -h`
for more details
## Licence
[
MIT
](
/LICENSE
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment