Skip to content

api

The api group provides API development tooling that works across all supported backend frameworks: spec generation, documentation, versioning, validation, testing, gateways, analytics, and type-safe client generation.

Terminal window
re-shell api --help
Subcommand Alias Purpose
openapi spec Auto-generate OpenAPI specifications from code annotations.
swagger ui Generate Swagger UI documentation with custom branding.
versioning version API versioning patterns and backwards-compatibility management.
validation validate Request/response validation middleware for all frameworks.
test API testing suite: contract testing, mocking, and load testing.
docs Interactive API documentation with live examples and try-it.
gateway API gateway integration for supported backend frameworks.
analytics API analytics and monitoring.
client Generate type-safe API clients from OpenAPI specifications.
verify Verify a spec against a baseline: report backward-incompatible changes and the impacted consumers.
Terminal window
# Generate an OpenAPI spec from annotations
re-shell api openapi generate
# Generate branded Swagger UI
re-shell api swagger
# Generate a type-safe client from a spec
re-shell api client
# Add validation middleware and gateway integration
re-shell api validation
re-shell api gateway

api verify compares the current spec with a baseline (--baseline <dir> or --baseline-spec <path>) and lists the breaking changes and the services that consume them (--api <name> picks the producer; --spec overrides discovery; --json for the envelope). For a contract diff between any two OpenAPI, .proto or GraphQL files, and a non-zero exit on breaking changes, see service bridge diff.

Tip. Nested --version flags resolve correctly — for example re-shell api openapi generate --version 0.25.1 sets the spec version rather than printing the CLI banner.

Run re-shell api <subcommand> --help for the flags of any subcommand.