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

dereference works different in node and browser environment #364

Open
sathish2017 opened this issue Jan 16, 2025 · 0 comments
Open

dereference works different in node and browser environment #364

sathish2017 opened this issue Jan 16, 2025 · 0 comments

Comments

@sathish2017
Copy link

sathish2017 commented Jan 16, 2025

  1. Resolve and dereference works as expected in node js env. But for browser environment $id is expected to be a url in my case it's custom path which will get resolved by configuring resolvers, for $ref cases even after resolving with custom resolvers, a separate call has been made again with path value in $id. Since value in $id is not a complete http url, it gets failed at that time.

Only way to make it work proper is to make $id as full complete path to json.

  1. Also for base schema passed to dereference method is also loaded in resolver with $id value, since I have passed complete base schema as obj why would it make http call again with $id attr of base schema.

  2. Also in browser env, some times it throws process not found error. When I bundle with webpack again it gets resolved, but same issue occurs later.

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

No branches or pull requests

1 participant