openapi-generator

Generate OpenAPI 3.0/3.1 specifications from Express, Next.js, Fastify, Hono, and NestJS routes.

5|Updated Dec 31, 2025
One-click install
npx skills add https://github.com/patricio0312rev/skillset --skill openapi-generator-patricio0312rev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openapi-generator
Source: https://github.com/patricio0312rev/skillset/tree/main/templates/testing/openapi-generator
Command: npx skills add https://github.com/patricio0312rev/skillset --skill openapi-generator-patricio0312rev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

OpenAPI specifications often drift from the implementation, causing integration headaches for teams consuming APIs. This skill analyzes Express, Next.js, Fastify, Hono, and NestJS routes to produce complete OpenAPI 3.0/3.1 specifications with schemas, examples, and human-readable documentation that can be imported into Postman, Insomnia, or Swagger UI.

Core Features & Use Cases

  • Automatic route discovery and conversion to OpenAPI paths.
  • Schema inference and component generation for request/response bodies.
  • Output in YAML or JSON with embedded documentation suitable for API explorers and client SDK generation.
  • Use Case: keep API docs in sync after each deployment by regenerating the spec from code.

Quick Start

Run the OpenAPI generator against your codebase to produce a starting OpenAPI specification.

Frequently Asked Questions about openapi-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I auto-generate OpenAPI specs from my Express or Next.js code?

To auto-generate OpenAPI specs from code, this skill analyzes your Express or Next.js routes to produce complete OpenAPI 3.0/3.1 specifications with schemas. It outputs YAML or JSON formats suitable for API explorers.

Can I generate OpenAPI documentation for Fastify, Hono, and NestJS frameworks?

Yes, you can generate OpenAPI documentation for Fastify, Hono, and NestJS frameworks. The skill performs automatic route discovery across these frameworks to build full OpenAPI specifications with embedded human-readable documentation.

How do I keep my Swagger UI documentation in sync with my API implementation?

To keep your Swagger UI documentation in sync with your API implementation, run the OpenAPI generator against your codebase after each deployment to regenerate the spec directly from your current routes.

Does the OpenAPI generator support exporting schemas for Postman and Insomnia?

Yes, the OpenAPI generator supports exporting schemas for Postman and Insomnia. It outputs YAML or JSON files with inferred request and response schemas that integrate directly into these client testing tools.

What is the best way to convert API routes into an OpenAPI 3.0 specification?

The best way to convert API routes into an OpenAPI 3.0 specification is to use an automated code-to-spec generator. This skill discovers your routes and performs schema inference to build complete OpenAPI specifications automatically.

Why do my OpenAPI specifications drift from my API implementation?

OpenAPI specifications drift from your API implementation when documentation is maintained separately from code. Generating OpenAPI specs directly from your framework routes ensures the documentation accurately reflects the current implementation.