api_contract_check
Compare the current API response shape against a committed snapshot to identify breaking, risky, or additive changes. Use update to overwrite the snapshot when changes are intended.
Instructions
What this branch changes about the API, and who it breaks.
Removing a serializer field is a one line diff that reads as tidying up.
The client on a version nobody updated still reads that field. Every tool
that catches this needs the app running: drf-api-checker records real
responses during a test run, OpenAPI diffing needs the schema generated.
Changes come back sorted by who they hurt. Breaking means an existing
client stops working: a field it reads disappears, a field it omits becomes
required, a type or a constraint narrows. Risky means it still parses but
the values may surprise it. Additive means nobody notices.
Args:
snapshot_path: the committed contract to compare against.
update: overwrite the snapshot with the current shape instead of
comparing. Do this once you have decided a change is intended.
max_depth: how far to expand nested serializers.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| update | No | ||
| max_depth | No | ||
| snapshot_path | No | .django-chainsaw-contract.json |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||