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

LoadSwaggerFromURIFunc is not called for eternal reference loading via loadSingleElementFromURI() #231

Closed
ghost opened this issue Jun 30, 2020 · 2 comments

Comments

@ghost
Copy link

ghost commented Jun 30, 2020

I'm attempting to use the LoadSwaggerFromURIFunc() to allow us to stub out the URI access and I've found that when references are required for a single element (apparently when there is no # in the path) the helper func is not called and the URI is accessed directly.

@fenollp
Copy link
Collaborator

fenollp commented Jul 15, 2020

Indeed, the call should be attempted instead of going straight for readURL.

I am not sure how you'd prefer this to work? SwaggerLoader.LoadSwaggerFromURIFunc func(loader *SwaggerLoader, url *url.URL) (*Swagger, error) is probably too weak a prototype to handle "single element URIs".

@fenollp
Copy link
Collaborator

fenollp commented Mar 3, 2021

Thanks to #316 you can now achieve what you want with (*SwaggerLoader).ReadFromURIFunc :)

@fenollp fenollp closed this as completed Mar 3, 2021
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