ajv-cli
ajv-cli copied to clipboard
Support remote schemas specified by URIs
This would be super useful! Also, would it support local schemas, for example referring one schema to another in the same folder?
That would be another feature - relative file based references. At the moment you have to load them explicitly with -s option
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).
Any update on this? Would love to use "$schema": "http://json-schema.org/draft/2019-09/schema#" from the JSON Schema docs.
I've created a pull request ( #108 ) to address this. It will use the asynchronous compilation by default when using the cli.