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.

generate-docs
contractspec generate

Expected output: Generate X doc files in generated/docs.

2) Export OpenAPI

Export an OpenAPI document from your registry module.

openapi-export
contractspec openapi export --registry ./src/contracts/registry.ts --out ./generated/openapi.json

Expected output: OpenAPI written to .../generated/openapi.json.

3) Validate specs

validate-specs
contractspec validate

Expected output: Validation passed.

Example package

The Integration Hub example provides a full registry of operations and is a good source for OpenAPI exports.

integration-hub-example
contractspec examples show integration-hub

# openapi export against your registry module
contractspec openapi export --registry ./src/contracts/registry.ts --out ./generated/openapi.json

Want 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
OSS docsbuildStart with OSS. Adopt Studio when you want the operating layer.

Why ContractSpec

Keep educational and comparison content reachable without letting it define the primary OSS learning path.