OpenAPI Spec Generator

intermediatedevelopmentMin 32K context

Generates complete OpenAPI 3.1 specifications from API descriptions, existing code, or route definitions. Includes request/response schemas, authentication, error responses, examples, and server configurations. Produces valid YAML ready for Swagger UI.

Use Cases

  • Generating OpenAPI specs from Express/NestJS route handlers
  • Creating API documentation from scratch based on requirements
  • Adding missing schemas and examples to existing specs
  • Converting Postman collections to OpenAPI format
  • Generating client SDKs from specifications

Example Prompt

Generate an OpenAPI 3.1 specification for the following API:

Base URL: [e.g., https://api.example.com/v1]
Authentication: [e.g., Bearer token]

Endpoints:
- [list endpoints with methods, paths, and brief descriptions]

Requirements:
- Complete request/response schemas with examples
- Error responses (400, 401, 403, 404, 429, 500)
- Pagination parameters where applicable
- Security scheme definitions
- Server configurations (dev, staging, prod)
- Tags for grouping endpoints

Output: Valid OpenAPI 3.1 YAML

Recommended Models

Compatible Tools

claude-codecursorgithub-copilotkiroany

Modalities

Input: text, code
Output: code

Related Skills

Author

OpenModels Community

@openmodelsrun