TypeScript / NestJS: @nestjs/swagger ships an OpenAPI generator that reads decorators on controllers and DTOs.
How-to
Generate an OpenAPI spec from your existing code.
If you have a working API but no OpenAPI spec, the fastest path is usually to generate one from the framework you already use. This page is a short guide to the tools per language and what to do with the resulting spec.
Completely free for 30 days. No credit card required.
01Details
Per-language options
TypeScript / Fastify: @fastify/swagger derives a spec from JSON Schema route options.
Python / FastAPI: built-in OpenAPI generator from type hints and Pydantic models — the cleanest in the ecosystem.
Python / Django REST: drf-spectacular generates from serializers and viewsets.
Go: swaggo/swag or go-swagger (annotations on handlers).
Java / Spring: springdoc-openapi reads annotations and @RestController mappings.
02Details
What you'll need to do by hand
Add operation IDs (most generators pick weak defaults).
Provide examples for request bodies and responses.
Tag operations into resource groups so generated SDKs nest correctly.
Pull duplicate schemas into components.schemas so generated types aren't _1/_2 variants.
03Outputs
What to do with the generated spec
Validate it (Spectral, Stoplight, openapi-cli).
Generate SDKs from it (Bloom emits TypeScript + Python from the same spec).
Host docs from it (custom domain, redirects, llms.txt).
Use the spec as the contract for contract tests against the running service.
04Details
Why this matters for the SDK side
A spec generated from code is automatically in sync with the running service.
Once the spec exists, SDK regeneration is a one-command step.
The compatibility report (Bloom) tells you if any SDK change would break customers.