Jul 20, 2022
·
3
Min Read

Introducing the OpenAPI Spec Generator Chrome Extension

by
Jean Yang
Share This Article

We’re excited to release our OpenAPI Spec Generator Chrome extension. With this extension, you can automatically generate an OpenAPI spec for any website by simply browsing.

Read on for more about the new OpenAPI Spec Generator Chrome extension, how it works, and how it fits in with Akita’s greater API observability offerings. To try it out, join our beta.

Akita OpenAPI Spec Generator, Chrome edition

All you have to do to automatically generate OpenAPI specs for a website you’re browsing is turn on the Akita OpenAPI Spec Generator.

What to expect

You can expect the Spec Generator to generate specs from the API calls it records from any AJAX website.

What’s the difference between recording the calls and generating the specs, you ask? Behind the scenes, the Akita OpenAPI Spec Generator analyzes the traffic in order to:

  • Automatically detect path parameters. Most other tools will consider `api/user0`, `api/user1`, and `api/user2` as separate entities. In the case of an API spec (and other situations we’ll cover later), what you want is `api/{user}`, where {user} is a path parameter. As long as the Spec Generator sees a handful of examples, the tool will automatically infer the endpoint `api/{user}`.
  • Automatically detect field and response types. As part of the API maps, Akita automatically infers data types, from `int` and `string` to `ansi_c_datetime` and `iso_8601_year_month`. See a list of inferred data types here.
  • Build an explorable, searchable map of the API. The Spec Generator turns all of this into an explorable, searchable map of your API. Search by data type, field name, response type, authentication, and more.

On top of all of this, you can export the API map as a regulation OpenAPI v3.0 spec.

An API map with the toolbox for filtering and downloading an OpenAPI spec.

How it works

The Spec Generator Chrome Extension records the API calls it sees while you’re browsing and sends them back to the Akita Cloud for analysis and for building API maps.

For the curious: the Spec Generator works by recording HAR files. Yes, the same HTTP Archive format with JSON-formatted files that people use for debugging browser experiences. If you want to learn more about how this works, read this other blog post about browser-based API spec generation here.

Hit "Start recording" and browse away.

API observability with Akita

You might be wondering: what do API specs have to do with observability?

At Akita, we got into the business of API observability to help people better understand what was happening in their production software systems. Our goal was to tell developers as much as possible, while having you do as little as possible.

Our take: you can see a lot of what’s happening in a system by looking at the communication. Specifically, what’s going on across the APIs. There are two reasons for this. First, it’s easy to watch APIs as an outsider, without asking a developer to provide a lot of annotations or other documentation about what they’re trying to do. Second, the rise of SaaS and microservices means that a lot of the action in a system happens across the APIs.

What you see in the Akita OpenAPI Spec Generator lays the groundwork for our other offerings. For instance, path parameter inference makes it possible for us to report on metrics and errors (and coming soon: alerts) in a per-endpoint way. (Mark Gritter on our team wrote a great blog post last week about why you want this.) Building a structured map of your API behavior makes it easier for us to precisely detect issues and help you root cause. Where we’re headed is building more and more precise maps of your API behavior, to take more off your plate as you work with your APIs.

Try us out!

Whether you need an API spec for something, or you’re curious about where getting that API spec can lead you, we’d love to have you try our beta. Find us in the Chrome web store here.

Check out the docs here and sign up to join our beta here.

Photo by Ayla Verschueren on Unsplash.

Share This Article

Join Our Private Beta now!

Thank you!

Your submission has been sent.
Oops! Something went wrong while submitting the form.