Generate OpenAPI Definitions

“The OpenAPI specification, which is formerly known as Swagger Specification, is a community-driven open standard, programming language-agnostic interface description for HTTP APIs. This allows both humans and computers to discover and understand the capabilities of a service without requiring access to the source code.”

Because AppMap records your code’s runtime behavior, it can see and record all of the HTTP API calls processed including the schema of each request and response. Creating OpenAPI definitions by hand is error prone and time consuming. Keeping them up to date is additional work that quickly falls out of sync with the code. Using the AppMap we can automatically output OpenAPI definitions for an application.

Video Demo


  1. AppMaps for your application that includes calls to your API endpoints. (Refer to the AppMap documentation on how to record your application)
  2. Node.js installed in your environment path (For the CLI usage)
  3. The latest version of the AppMap code editor extension (for code editor usage)

Quick Start

Code Editor Example

Once you have generated AppMaps, click the “Generate OpenAPI definitions” button in your VS Code or JetBrains code editor.


CLI Example

Or use the AppMap openapi CLI to generate your OpenAPI definitions on the command line.

$ npx @appland/appmap@latest openapi --output-file openapi.yml

Additional Documentation

Was this page helpful? thumb_up Yes thumb_down No
Thank you for your feedback!