OSS-first docs
These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.
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.
contractspec generateExpected output: Generate X doc files in generated/docs.
2) Export OpenAPI
Export an OpenAPI document from your registry module.
contractspec openapi export --registry ./src/contracts/registry.ts --out ./generated/openapi.jsonExpected output: OpenAPI written to .../generated/openapi.json.
3) Validate specs
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.
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 addsValidation and typing
Keep runtime validation and TypeScript types aligned from the same source definitions.
Docs generation pipeline
Feed generated docs into the public docs site without breaking source-of-truth ownership.
Why ContractSpec
Keep educational and comparison content reachable without letting it define the primary OSS learning path.