Back to blog
2026-03-26 4 min read
Freeze Your V1 API With One YAML File
Custom policies let you protect specific API versions, control severity per path, and enforce team rules in CI.
Your V1 API has 200 consumers. Your V2 is in active development. You need different rules for each. Delimit's custom policies let you define exactly what's allowed where.
One YAML file
Create .delimit/policies.yml in your repo:
rules:
- id: freeze_v1
name: Freeze V1 API
change_types:
- endpoint_removed
- method_removed
- field_removed
- type_changed
severity: error
action: forbid
conditions:
path_pattern: "^/v1/.*"
message: "V1 API is frozen. Make changes in V2."
- id: warn_v2_type_changes
name: Warn V2 Type Changes
change_types:
- type_changed
severity: warning
action: warn
conditions:
path_pattern: "^/v2/.*"
message: "Type changed at {path} -- verify client compat."What you can control
- Path patterns -- apply rules to specific API versions or service paths
- Change types -- target specific breaking change categories (10 available)
- Severity -- error (blocks in enforce mode) or warning (logged only)
- Messages -- custom error messages with path interpolation
Policies are checked in git alongside your spec. They're versioned, reviewable, and auditable — the same workflow as code.
Built-in presets
Don't want to write YAML? Use a preset:
npx delimit-cli init --preset strict # all violations are errors npx delimit-cli init --preset default # balanced npx delimit-cli init --preset relaxed # all violations are warnings
Try the GitHub Action
Add breaking change detection to any repo with an OpenAPI spec.
- uses: delimit-ai/delimit-action@v1
with:
spec: path/to/openapi.yamlView on Marketplace #policies#openapi#ci