Show HN: OpenAPI DevTools – Chrome extension that generates an API spec (opens in a new tab)github.com
811 pointsEffortlessly discover API behaviour with a Chrome extension that automatically generates OpenAPI specifications in real time for any app or website.
Comments (102) 40 threads
Earlier commentsI'll second/third the feature request for auto-including auth headers/calls (as many of the sites I'm trying to understand/use APIs from use persistent keys, and scraping these separately is just unnecessary extra time).
On that same note, I'd greatly appreciate keeping the initial request as a "sample request" within the spec.
I'd also greatly appreciate an option to attempt to automatically scrape for required fields (e.g. try removing each query variable one at a time, look for errors, document them).
Thanks for this :)
Dreams never die and what is old will be new again.
1. Ability to filter response properties.
2. Ability to work with non-JSON (web scraping) by defining a mapping of CSS selectors to response properties.
3. Cross-reference host names of captured requests with publicly documented APIs.
4. If auth headers are found, prompt user for credentials that can then be stored locally.
5. "Repeater" similarly found in Burp Suite.
6. Generate clients on the fly based on the generated OpenAPI spec.
8. Optionally publish generated OpenAPI specs to a central site or open PR to a GH repo, "awesome-openapi-devtools"?
- Integration with some kind of web crawler to allow automatically walking a web site and extract a database of specifications
Edit: Hmm, it seems that genson-js[1] was used to merge schemas.
1 - https://www.npmjs.com/package/genson-js
The idea for a crawler is a good one. The core logic that handles spec generation is decoupled from everything else, so it can be extracted into its own library.
But there are approaches that exist for this already, such as har-to-openapi.
https://github.com/jonluca/har-to-openapi
All comments shown.
Couldn't load more comments. Check your connection and try again.