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
Don't strip href #6
Comments
Glad to hear someone else is giving this a go and thanks for reporting the issue. The reason I decided to remove the href attributes inside the resources_container was that swagger-ui added hash-bang urls (as can be seen in the screenshot below). Clicking to expand/collapse the docs caused the url to update to an unknown ember route (#!/pets in the example). I don't know if this only happens when using locationType: 'hash' in environment.js but I could certainly explore that some more. It may also be possible to remove specific href attributes leaving your external links intact. An example of a swagger.json file that demonstrates the issue would be super. If you could supply one I would be more than happy to take a look. |
My use case is similar to the http://swagger.io and mailto links in your screenshot. Those I see your use case now. I'm using an extension of the |
@john-kurkowski: Thanks for the example spec file. I'm oddly enough unable to reproduce the issue in my project after removing the code in question. I think it best not to remove the href attributes as the component could be extended to remove problematic hrefs if needed. I don't think this component should make assumptions and remove them by default. Thanks again for reporting this. |
That works too! Thanks! |
First off, I'm really happy to discover this addon. swagger-ui leaves something to be desired in SPA-land. This is a handy integration I didn't want to bootstrap myself. Thank you!
I'm having trouble with swagger-ui.js#L69-L73:
This makes external links unclickable. Can't have the whole world in my Ember app :). I'm missing its original intent. I've deleted it in my fork, but I don't think that's the answer. Could you explain your code comment more?
Can you restore links? Or warn if they'll route you outside the app? Or make it configurable? (Not that swagger-ui needs yet another input param.)
The text was updated successfully, but these errors were encountered: