ajv-cli icon indicating copy to clipboard operation
ajv-cli copied to clipboard

Support remote schemas specified by URIs

Open epoberezkin opened this issue 8 years ago • 5 comments

epoberezkin avatar Apr 28 '17 12:04 epoberezkin

This would be super useful! Also, would it support local schemas, for example referring one schema to another in the same folder?

GiovanniFrigo avatar Apr 28 '17 14:04 GiovanniFrigo

That would be another feature - relative file based references. At the moment you have to load them explicitly with -s option

epoberezkin avatar Apr 28 '17 14:04 epoberezkin

You've probably already thought of this :-) but ideally we can still override referenced schemas by supplying with -r, as often I'll want to test local changes without having to go change the $ids to not point to the remote hosted ones. Or there may not even been a remote hosted file yet.

Local schemas by filesystem reference should work by setting a file:// base URI, I'd expect (not necessarily the same feature as supporting http[s]:// retrieval depending on how it's implemented, I suppose).

handrews avatar May 01 '17 04:05 handrews

Any update on this? Would love to use "$schema": "http://json-schema.org/draft/2019-09/schema#" from the JSON Schema docs.

gabemeola avatar Aug 26 '20 21:08 gabemeola

I've created a pull request ( #108 ) to address this. It will use the asynchronous compilation by default when using the cli.

rayvincent2 avatar Jan 27 '21 20:01 rayvincent2