3 ms·
What I never understood about Swagger/OpenAPI and RAML was: Why would you ever need more than one documentation viewer/playground app for it? Why isn't there a
by lobster_johnson 10y ago
What I never understood about Swagger/OpenAPI and RAML was:
Why would you ever need more than one documentation viewer/playground app for it? Why isn't there a single app, hosted somewhere for everyone to use, that I could point to any API spec and see the docs for it and execute calls against from the browser? If it exists, why isn't it the first thing on swagger.io, for example?
It seems like a huge missed opportunity. The next logical step would be to let a web site document its API URL with a meta header, so you could point the docs browser at, say, google.com and it would just work, similar to RSS/Atom. Then someone could write a web crawler which collected all of them and let you look up any API from the documentation browser. It doesn't take much imagination to figure out the possibilities here. (Why isn't there a nice native Electron app? Or maybe a Dash integration?)
In principle this does seem to be possible, since if you go to the official Swagger demo [1], it seems you can type in the URL to any Swagger file. So why is this a "pet store demo" and not the official Swagger browser?
[1] http://petstore.swagger.io/ http://petstore.swagger.io/
- oceanswave 10y agoYeah - combine with a SaaS for hosting your swagger file, automated monitoring/testing of your endpoint and a directory of apis for use or just cloning the interface
- agentgt 10y agoWhile it certainly could be done it would probably be a subset of the API because of security. With swagger you can interactively play with the API. To do this on some other host would require some cross origin policy setup as well probably a couple of other things if OAuth is used.