Generate docs + client schemas
Generate docs and OpenAPI output from ContractSpec operations to power SDKs, docs sites, and tooling.
What you'll build
Export docs from your specs.
Emit OpenAPI 3.1 for client SDK generation.
Keep outputs deterministic with CI validation.
1) Generate docs
Use the generator to emit docs from your contracts.
bash
contractspec generateExpected output: Generate X doc files in generated/docs.
2) Export OpenAPI
Export an OpenAPI document from your registry module.
bash
contractspec openapi export --registry ./src/contracts/registry.ts --out ./generated/openapi.jsonExpected output: OpenAPI written to .../generated/openapi.json.
3) Validate specs
bash
contractspec validateExpected output: Validation passed.
Example package
The Integration Hub example provides a full registry of operations and is a good source for OpenAPI exports.
bash
contractspec examples show integration-hub
# openapi export against your registry module
contractspec openapi export --registry ./src/contracts/registry.ts --out ./generated/openapi.jsonWant exports tied to product decisions?
Studio compiles approved changes into deliverables and pushes them to your execution stack with full evidence context.
See what Studio adds