Lurker News
Effortlessly 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 comments
albertgoeswoof#
Cool! Can you add autocomplete of paths to URLs based on the spec now?

so I can be typing in the URL bar for any website I have landed on in the past and tab through all the available routes?
e.g.
- news.ycombinator.com_
- news.ycombinator.com/new
- news.ycombinator.com/submit
- news.ycombinator.com/show
etc.

sdmike1#
A Firefox version of this would be super handy! Does that already exist?
wackget4 replies#
The description doesn't explain exactly what this extension does.

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.

iforgotpassword#
How would it, there isn't any API in the first place with classic websites. Your could maybe consider the urlencoded post requests an API, but then the reply is another html website so how do you formally specify the reply format? "The queried data is somewhere right below the third

except when there's a new message for the logged in user, then it's the fourth one"

a_c1 reply#
It does generate schema.

> Instantly generate an OpenAPI 3.1 specification for any website or application just by using it

wackget1 reply#
Yeah but my question remains: by what criteria is a request classed as an "API request"? Websites make tons of XHR requests and not all of them are API requests.

I want to know what this extension does that's different than me looking at the browser's Dev Tools > Network tab.

jameshart1 reply#
Obviously - a browser extension can only monitor API calls from the browser.
wackget#
Not obviously; all it says is it generates a schema "while using" a website.

"Using" could mean navigating between pages, submitting data via forms, etc.

yencabulator#
Worse, for something like SvelteKit load functions, this will think there's a "real API" where what's actually there is an internal detail and will change often.

https://kit.svelte.dev/docs/load

ushakov#
We at Step CI have a similar tool, that acts as a proxy and can generate OpenAPI spec for the request/response pairs.

(You can also use it to generate automated tests)
If you're interested: mish@stepci.com

Load more comments