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

Support for non-existent $id URLs? #526

Closed
davidpricedev opened this issue Feb 28, 2022 · 3 comments · Fixed by #922
Closed

Support for non-existent $id URLs? #526

davidpricedev opened this issue Feb 28, 2022 · 3 comments · Fixed by #922

Comments

@davidpricedev
Copy link

My json-schema has $ids 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.

@stevehu
Copy link
Contributor

stevehu commented Feb 28, 2022

@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.

@davidpricedev
Copy link
Author

@stevehu thanks for taking a look. I have a PR out now with a reproduction of the issue.

@claussni
Copy link

claussni commented Sep 1, 2022

Any progress on this? I'm stuck with the issue. Can't seem to hack a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants