• Library Documentationv1.61.0
    • Overview
    • Next.js One Endpoint
    • Spec Validation + Typing
    • Generate Docs + Clients
    • Docs Pipeline
    • CI Diff Gating

Guides

Hands-on guides with commands, expected output, and CI-verified example packages.

Contract types overview

Learn about the different contract types and when to use each one.

Target time: 15 min

Next.js: one endpoint

Add ContractSpec to an existing Next.js app by wiring one operation end-to-end.

Target time: 25 min

Import existing codebases

Convert your existing API endpoints into ContractSpec contracts for fast onboarding.

Target time: 20 min

Spec-driven validation + typing

Define operations with SchemaModel, generate types, and enforce validation without rewrites.

Target time: 20 min

Generate docs + client schemas

Export docs and OpenAPI for client SDKs and tooling from your specs.

Target time: 20 min

Docs pipeline

Wire generated docs into a reference site with a chunked index.

Target time: 20 min

CI gating with deterministic diffs

Add ContractSpec CI checks to gate breaking changes and drift.

Target time: 15 min
How to use the guides
  • Run each guide in a fresh branch or sandbox workspace.
  • Use the linked example package to validate end-to-end.
  • Keep the commands as written to match CI expectations.
guides-quickstart
# list all examples
contractspec examples list

# validate example packages in this repo
contractspec examples validate --repo-root .

Stay updated

Get the latest updates on new integrations, features, and templates.

No spam. Unsubscribe anytime. Manage preferences via Privacy.

Product

  • How it works
  • Templates
  • Pricing
  • Comparison

Docs

  • Getting started
  • Specs
  • Safety

Company

  • Changelog
  • Manifesto
  • Privacy
  • Terms

Install

Social

Built with ContractSpec © 2026

PrivacyTerms