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
Show all comments
Showing thread 23 of 40
I assume it monitors all XHR requests as you browse a website, and if the request/response matches [some criteria (e.g. is JSON?)] it will assume it's an API request and log it?
Is that correct?
If so, it will only work on websites where the frontend is implemented like a PWA, with lots of AJAX calls to fetch data, etc. For sites whose pages are all generated server-side, the extension won't generate any API schema, right?
Edit: Also how does it differentiate "API requests" with regular AJAX content fetching? If a website fetches some arbitrary content via an AJAX request (e.g. some lazy-loaded HTML), that's not an API request. That's just part of a website's layout.
except when there's a new message for the logged in user, then it's the fourth one"
> Instantly generate an OpenAPI 3.1 specification for any website or application just by using it
I want to know what this extension does that's different than me looking at the browser's Dev Tools > Network tab.
https://github.com/AndrewWalsh/openapi-devtools/blob/main/sr...
"Using" could mean navigating between pages, submitting data via forms, etc.
https://kit.svelte.dev/docs/load