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

Extend backend by proxying API to swagger2openapi #18

Closed
MikeRalphson opened this issue Oct 14, 2017 · 1 comment
Closed

Extend backend by proxying API to swagger2openapi #18

MikeRalphson opened this issue Oct 14, 2017 · 1 comment

Comments

@MikeRalphson
Copy link
Contributor

MikeRalphson commented Oct 14, 2017

Now that we have an npm module (thanks @yogendra) and potentially a docker container, maybe it makes sense to add swagger2openapi to the node_modules so conversions and validations can be done by the in-built webserver/backend without having to call out to and depend on apps deployed to heroku or appspot , which might not always be available.

Questions:

  • How to avoid code duplication with openapi-webconverter?
  • How to identify we have been served by the intelligent back-end and not by file:// or a simple server like github pages?
@MikeRalphson
Copy link
Contributor Author

MikeRalphson commented Oct 14, 2017

  • file:// is easy to detect with window.location.protocol or similar.
  • xhr.getAllResponseHeaders() on an AJAX call could detect a custom header.

Note: loading index.html from a file:// url is broken, at least on my Windows environment, so the README.md has been updated.

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

No branches or pull requests

1 participant