OpenAPI Spec Generation

Generates and maintains OpenAPI 3.1 specifications from code, with validation patterns and SDK generation support for consistent API contracts.

Overview

OpenAPI Spec Generation automates the creation and maintenance of API contracts in OpenAPI 3.1 format. It reads existing code or design-first specs and produces comprehensive, validated documentation that teams can use to generate SDKs and verify endpoint compliance.

Capabilities

CapabilityDescription
Spec GenerationCreates OpenAPI 3.1 specs from route definitions and type annotations
ValidationValidates spec files against the OpenAPI standard
SDK HintsAdds hints for common SDK generators (TypeScript, Python, Go)
Design-FirstSupports writing specs first, then scaffolding matching code
Diff DetectionIdentifies breaking changes between spec versions

Install Steps

1. Install via Claude Code

claude skill install openapi-spec-generation

2. Generate a spec from existing code

/openapi generate ./src/routes

3. Validate an existing spec file

/openapi validate openapi.yaml

Need help? Check the documentation or contact the Integration Team.