oapi-codegen
Generates idiomatic Go server boilerplate and clients from an OpenAPI description, wiring into the common Go HTTP routers.
Specifications it implements
What this tool does to each specification, in the role vocabulary. Follow a standard through to standards.apievangelist.com for what it actually specifies.
| Standard | Role | What that means |
|---|---|---|
| OpenAPI | generates |
Produces: server-stub, client |
- Interfaces
clilibrary- Install
-
go
github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen - Invoke
oapi-codegen -generate types,client -package <pkg> <spec.yaml> > <client.gen.go>- Consumes
- openapi
- Emits
- go
- Runtime
- Runs offline Deterministic Writes No credentials
Where it applies
Jobs this tool actually does, and the surface each one is exercised on.
- Website
- https://github.com/oapi-codegen/oapi-codegen
- Repository
- https://github.com/oapi-codegen/oapi-codegen
- License
- Apache-2.0 — reported by the GitHub API, verified 2026-09-17
- Stars
- 8576 · last commit 2026-09-17
/tools.json,
against the tool.schema.json
schema, using the roles.json
vocabulary. Start at /llms.txt.