command
Version:
v2.0.1
Opens a new window with list of versions in this module.
Published: Feb 2, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 10
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Spec-first example
This example shows a minimal spec-first workflow:
- Define the OpenAPI source of truth in
openapi.json.
- Generate handler skeletons + error types.
- Implement handlers and wire middleware.
Generate the skeletons:
go generate ./...
Files of interest:
openapi.json: source of truth.
spec_gen.go: generated routes/constants/handlers/errors.
main.go: wiring with OpenAPI request + response validation.
handlers.go: handler implementations.
Notes:
- The generator emits
StatusError types for non-2xx responses.
- Response validation is enabled to catch mismatched handler output in dev/test.
Documentation
¶
Code generated by spec-first example; DO NOT EDIT.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.