Show HN: OpenAPI DevTools – Chrome ext. that generates an API spec as you browse

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • openapi-devtools

    Browser extension that generates API specs for any app or website

  • 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...

  • DefinitelyTyped

    The repository for high quality TypeScript type definitions.

  • 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/

  • 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.

    SurveyJS logo
  • gorilla

    Gorilla: An API store for LLMs

  • 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

  • api2ai

    Create API agents from OpenAPI Specs

  • 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

  • mitmproxy

  • This reminds me a lot of:

    https://github.com/alufers/mitmproxy swagger

    However, having the capability delivered in a browser extension is extremely handy!

  • OpenAPI-Specification

    The OpenAPI Specification Repository

  • 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

  • requests-openapi

    A lightweight but powerful and easy-to-use Python client library for OpenAPI v3.

  • 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 )

  • 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.

    WorkOS logo
  • scalar

    Beautiful API references from OpenAPI/Swagger files ✨

  • 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

  • curlconverter

    Transpile curl commands into Python, JavaScript and 27 other languages

  • 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...

  • har-to-openapi

    HAR to OpenAPI spec generator

  • 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

  • apiclient-pydantic-generator

    This code generator creates APIClient app from an openapi file.

  • 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

  • webextension-polyfill

    A lightweight polyfill library for Promise-based WebExtension APIs in Chrome

  • 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...

  • awesome-test-automation

    A curated list of awesome test automation frameworks, tools, libraries, and software for different programming languages. Sponsored by https://zapple.tech

  • 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:

  • awesome-web-archiving

    An Awesome List for getting started with web archiving

  • https://github.com/iipc/awesome-web-archiving/blob/main/READ...

  • 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.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts