json-schema-validator
json-schema-validator copied to clipboard
Support for non-existent $id URLs?
My json-schema has $id
s that aren't "real" urls that can be requested. I also use json-schema bundling.
It seems this library doesn't support bundled schemas - at least it doesn't follow the $ref
to the $defs
- it still tries to make requests out to the web to fetch the $ids
of the items that are in the $defs
section.
I've been able to work around this sort of limitation in other libraries by one of these tactics:
- pre-loading all the individual json-schema documents into an internal storage provided by the library
- changing out the document fetching with a custom component that can do a file-system lookup
Does this library support either of those options? I've had a look through the docs and looked around a bit in the code too, but nothing is jumping out at me.
@davidpricedev I am wondering if you could submit a PR with a test case to reproduce the issue? I need to see what is your schema and what is your json. We are using the bundler all the time and there is no issue at all. We have an openapi-bundler in the networknt organization.
@stevehu thanks for taking a look. I have a PR out now with a reproduction of the issue.
Any progress on this? I'm stuck with the issue. Can't seem to hack a workaround.