Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
awesome-test-automation
A curated list of awesome test automation frameworks, tools, libraries, and software for different programming languages. Sponsored by https://zapple.tech
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
As a follow up, the algorithm that powers this makes use of the chrome.devtools.network API. Specifically it passes the Request object that is in the HAR 1.2 archive format.
So if you can pass the equivalent of that in Firefox/other browsers to the insert method and switch things up a bit, it should be relatively straightforward. I will think about pulling out the core logic into its own lib.
https://developer.chrome.com/docs/extensions/reference/devto...
https://developer.chrome.com/docs/extensions/reference/devto...
https://github.com/AndrewWalsh/openapi-devtools/blob/main/sr...
Do you mean the devtool protocol[1]? I didn't follow the space so have no knowledge on it. On the other hand there seem to be a polyfilled API on chrome.devtools.network.Request which OP's extension uses extensively https://github.com/DefinitelyTyped/DefinitelyTyped/blob/mast...
[1] https://chromedevtools.github.io/devtools-protocol/
Nice this made me go back and check up on the Gorilla LLM project [1] to see whats they are doing with API and if they have applied their fine tuning to any of the newer foundation models but looks like things have slowed down since they launched (?) or maybe development is happening elsewhere on some invisible discord channel but I hope the intersection of API calling and LLM as a logic processing function keep getting focus it's an important direction for interop across the web.
[1] https://github.com/ShishirPatil/gorilla
I open sourced this tool that takes OpenAPI spec and let you control API using natural language https://github.com/mquan/api2ai
Let me know if you have any questions or feature request
This reminds me a lot of:
https://github.com/alufers/mitmproxy swagger
However, having the capability delivered in a browser extension is extremely handy!
I saw your sibling comment about "keeping it simple," however that is a bit counter to "generates OpenAPI specifications" since those for sure are not limited to just application/json request/response bodies
I wanted to draw your attention to "normal" POST application/x-www-form-urlencoded <https://github.com/OAI/OpenAPI-Specification/blob/3.1.0/vers...> and its multipart/form-data friend <https://github.com/OAI/OpenAPI-Specification/blob/3.1.0/vers...>
The latter is likely problematic, but the former is in wide use still, including, strangely enough, the AWS API, although some of their newer services do have an application/json protocol
I know that's a lot of words, but the tl;dr would be that if you want your extension to be application/json only, then changing the description to say "OpenAPI specifications for application/json handshakes" would help the consumer be on the same page with your goals
It seems like you could combine this extension with some of the OpenAPI -> Python projects to get your desired result. (e.g. https://github.com/wy-z/requests-openapi )
You could take the OpenAPI json generated from this project and feed it to https://docs.scalar.com/swagger-editor which generates boilerplate in several formats, including Python
I made a fork of the Chrome DevTools that adds exactly this. You can tell Chrome to use a different version of the DevTools if you start it from the command line
https://github.com/curlconverter/curlconverter/issues/64#iss...
Genson-js is used to merge JSON Schema objects. Essentially there are 5 schemas that we care about in each request, for 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
You could potentially go one step further and make Python classes that wrap the whole API automatically from the OpenAPI file: https://github.com/mom1/apiclient-pydantic-generator
Firefox maintain a library for unified extension API https://github.com/mozilla/webextension-polyfill
Their type definition for HAR request isn't exported https://github.com/DefinitelyTyped/DefinitelyTyped/blob/mast...
https://github.com/atinfo/awesome-test-automation/blob/maste...
vcr.py, playback, and rr do [HTTP,] test recording and playback. httprunner can replay HAR. DevTools can save http requests and responses to HAR files.
awesome-web-archiving lists a number of tools that work with WARC; but only har2warc:
https://github.com/iipc/awesome-web-archiving/blob/main/READ...
Related posts
- Show HN: Build type-safe web APIs with JavaScript, instantly
- tRPC – Move Fast and Break Nothing. End-to-end typesafe APIs made easy
- GitHub - thoughtspile/awesome-tiny-js: A collection of tiny JS libraries (under 2 kB) to put your bundle on a diet
- awesome-tiny-js: A collection of JS libraries under 2 kB
- Template Literal Types: How To Type Strings