OpenAPI Tooling
Use this guide when linting or previewing the OpenAPI specification.
The source of truth is openapi/openapi.yaml. Run commands from the repository root inside nix develop so just and redocly are available.
Commands
just lint-specbundles the OpenAPI spec with Redocly and lints it with Spectral.just swagger-servepreviews Swagger UI on port9080.just redoc-servepreviews Redoc on port9081.
Tooling
lint-spec uses Redocly from Nix to bundle the spec, then runs Spectral in Docker.
redoc-serve uses Redocly from Nix:
shell
just redoc-serve
swagger-serve uses Docker so Swagger UI does not need to be installed locally:
shell
just swagger-serve
Override preview ports by passing just variables:
shell
just REDOC_PORT=9091 redoc-serve
just SWAGGER_PORT=9090 swagger-serve