-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
Avoiding downloads of URI $ids #244
Comments
This shoudl be fixed in the latest version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Forgive me if this is the same as all these issues, but I am new to JSON schemas and the tooling around it so would like clarification if I am misunderstanding something. I am using Schema 2020-12 with
.json
files on a filesystem with the json files nested in folders.example_1.json
example_2.json
I am setting the URI to a bogus URL but from what I read on json-schema.org, it does not mean anything is necessarily downloaded.
I am loading both schemas
However when running, the library tries to download the schemas defined in the
$id
which don't exist.To avoid the library from trying to download the JSON via HTTPS I disabled the
http
resolver (I am running via CLI) so that the file resolver is used insteadWhich instead results in an error in the library trying to read the root folder of my project instead of reading the files in
/path/to/my/project/root/schemas/json
I am using json-schema-to-typescript which uses this library as an underlyging library so I have the same error. Using AJV with the URIs seems to work fine.
If I change the
$ref
values to be relative, then json-schema-ref-parser compiles ok, but then AJV complains it cannot find the relative links.I don't want to use FQPN of
file///
for multiple reasons which are out of scope here.Can someone clarify if I am understanding the spec correctly, if what I want to do is possible and if the tooling currently supports it?
The text was updated successfully, but these errors were encountered: