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

Allow passing multiple instances of -s on the command line #35

Closed
katef opened this issue May 15, 2017 · 2 comments
Closed

Allow passing multiple instances of -s on the command line #35

katef opened this issue May 15, 2017 · 2 comments

Comments

@katef
Copy link

katef commented May 15, 2017

Hi,

I'd like to specify multiple schema:

; ajv -s a.json -s b.json -d x.json

such that both get loaded by addSchema(), and I'd be able to "$ref" one from the other.

This is similar to #29, but I hope simpler to implement.

Thank you,

@epoberezkin
Copy link
Member

There is -r option that allows to add multiple schemas that are referenced, -s is the schema that the data is validated against.

So you just have to:

ajv -s a -r b -d x

provided you want to validate "x" against "a"

@katef
Copy link
Author

katef commented May 15, 2017

Oh wonderful! Thank you.

@katef katef closed this as completed May 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants