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
ricberw#
This is awesome!

I'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 :)

autonomousErwin1 reply#
This is a first step into turning the entire web into an API albeit before we hit the login/signup roadblocks (but then that's where agents come in)
toyg#
That's used to be called "the semantic web".

Dreams never die and what is old will be new again.

digitalsanctum3 replies#
Great project! These features come to mind that would be great additions:

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.

digitalsanctum#
7. Train a machine learning model to recognize and extract tabular and repeated data based on training data.

8. Optionally publish generated OpenAPI specs to a central site or open PR to a GH repo, "awesome-openapi-devtools"?

worldsayshi1 reply#
- Allow using it as a library instead of just a browser extension which would in turn allow:

- 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

mrmagoo21 reply#
Genson-js is used to merge JSON Schema objects. Essentially there are 5 schemas that we care about in each request - request bodies, request headers, response bodies, response headers, and query parameters. Each endpoint (which may or may not be parameterised) has only one schema for each of these values.

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

worldsayshi#
Interesting! Thanks! Awesome project :)
mrmagoo2#
Some great ideas here, thank you. I do want to keep it small and focused so I'll forego complex functionality like the Repeater, but you've raised some common pain points I'll tackle.
ch_sm1 reply#
Very nice! Auto generating type information from looking at permutations of values is hard though. Q: Does this handle optional values? Also, being able to mark string field as "enums" and then collecting the possible values instead of just typing it as "string" would be mega handy.
mrmagoo2#
It doesn't have any way of determining which values are optional, so it doesn't make that distinction. Hear you on the enums, I'll take another look at what's possible without adding overhead.

Load more comments