Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation outcome? #108

Open
pkaramol opened this issue Mar 28, 2018 · 1 comment
Open

Validation outcome? #108

pkaramol opened this issue Mar 28, 2018 · 1 comment

Comments

@pkaramol
Copy link

I am trying to validate a json file against a schema as follows:

jsonlint test.json --validate logstash/files/squid_schema.json

However, I only get the file test.json in my stdout.

How am I informed if the validation against the schema failed or not?

Using

$ jsonlint -v
1.6.3

on Ubuntu 16.04.04

@mainrs
Copy link

mainrs commented Apr 27, 2018

If the schema failed, it should print out the errors:

❯ jsonlint schemas/firebase.schema.json -V __tests__/failed.schema.json 
Validation Errors:

Instance is not a required type
uri: https://angular.io/schemas/cli-1/schema#/required
schemaUri: http://json-schema.org/draft-03/hyper-schema#/properties/required
attribute: type
details: ["boolean"]

The exit code is non null too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants