| name | openapi-spec-generator |
| description | Generate complete, production-ready OpenAPI 3.x and Swagger 2.0 specifications from natural language descriptions, code, or partial specs. Use this skill whenever the user mentions OpenAPI, Swagger, API spec, REST API documentation, YAML/JSON API schema, endpoint documentation, API... |
| risk | unknown |
| source | https://github.com/LambdaTest/agent-skills/tree/main/api-skill/openapi-spec-generator |
| source_repo | LambdaTest/agent-skills |
| source_type | community |
| date_added | 2026-07-01T00:00:00.000Z |
| license | MIT |
| license_source | https://github.com/LambdaTest/agent-skills/blob/main/LICENSE |
OpenAPI / Swagger Specification Generator
When to Use
Use this skill when you need generate complete, production-ready OpenAPI 3.x and Swagger 2.0 specifications from natural language descriptions, code, or partial specs. Use this skill whenever the user mentions OpenAPI, Swagger, API spec, REST API documentation, YAML/JSON API schema, endpoint documentation, API...
Generate complete, valid OpenAPI 3.x or Swagger 2.0 specifications from descriptions, code, or partial specs.
Workflow
Step 1 — Gather Context
Before writing any YAML/JSON, ask (or infer from context) the following:
| Question | Why it matters |
|---|
| OpenAPI 3.x or Swagger 2.0? | Different info, servers/host, components/definitions structure |
| Output format: YAML or JSON? | YAML default unless user specifies JSON |
| What does this API do? | Sets info.title, info.description, tags |
| List of endpoints (or code to extract from)? | Core paths object |
| Authentication type(s)? | securitySchemes — see reference |
| Common data models or entities? | components/schemas / definitions |
| Any existing partial spec to extend? | Merge rather than overwrite |
If the user provides code (Express routes, FastAPI, Django URLs, Spring controllers, etc.), extract endpoints automatically — do not ask what the user already told you.
Step 2 — Build the Spec
Follow the structure guide for the chosen version. Always produce a complete, valid spec — never leave placeholder comments like # TODO: add schema.
OpenAPI 3.x Skeleton
openapi: "3.1.0"
info:
title: <API Title>
version: "1.0.0"
description: <Short
[]
[]
[]
[]
{}
{}