api-contract.md
49 lines · review/specialists/api-contract.md at 3f79d81
1# API Contract Specialist Review Checklist
3Scope: When SCOPE_API=true
4Output: JSON objects, one finding per line. Schema:
5{"severity":"CRITICAL|INFORMATIONAL","confidence":N,"path":"file","line":N,"category":"api-contract","summary":"...","fix":"...","fingerprint":"path:line:api-contract","specialist":"api-contract"}
6Optional: line, fix, fingerprint, evidence, test_stub.
7If no findings: output `NO FINDINGS` and nothing else.
9---
API Contract Specialist Review Checklist
Scope: When SCOPE_API=true Output: JSON objects, one finding per line. Schema: {"severity":"CRITICAL|INFORMATIONAL","confidence":N,"path":"file","line":N,"category":"api-contract","summary":"...","fix":"...","fingerprint":"path:line:api-contract","specialist":"api-contract"} Optional: line, fix, fingerprint, evidence, test_stub. If no findings: output NO FINDINGS and nothing else.
Raw lines 1 to 10
Categories
Raw lines 11 to 1213### Breaking Changes
14- Removed fields from response bodies (clients may depend on them)
15- Changed field types (string → number, object → array)
16- New required parameters added to existing endpoints
17- Changed HTTP methods (GET → POST) or status codes (200 → 201)
18- Renamed endpoints without maintaining the old path as a redirect/alias
19- Changed authentication requirements (public → authenticated)
Breaking Changes
- Removed fields from response bodies (clients may depend on them)
- Changed field types (string → number, object → array)
- New required parameters added to existing endpoints
- Changed HTTP methods (GET → POST) or status codes (200 → 201)
- Renamed endpoints without maintaining the old path as a redirect/alias
- Changed authentication requirements (public → authenticated)
21### Versioning Strategy
22- Breaking changes made without a version bump (v1 → v2)
23- Multiple versioning strategies mixed in the same API (URL vs header vs query param)
24- Deprecated endpoints without a sunset timeline or migration guide
25- Version-specific logic scattered across controllers instead of centralized
Versioning Strategy
- Breaking changes made without a version bump (v1 → v2)
- Multiple versioning strategies mixed in the same API (URL vs header vs query param)
- Deprecated endpoints without a sunset timeline or migration guide
- Version-specific logic scattered across controllers instead of centralized
27### Error Response Consistency
28- New endpoints returning different error formats than existing ones
29- Error responses missing standard fields (error code, message, details)
30- HTTP status codes that don't match the error type (200 for errors, 500 for validation)
31- Error messages that leak internal implementation details (stack traces, SQL)
Error Response Consistency
- New endpoints returning different error formats than existing ones
- Error responses missing standard fields (error code, message, details)
- HTTP status codes that don't match the error type (200 for errors, 500 for validation)
- Error messages that leak internal implementation details (stack traces, SQL)
33### Rate Limiting & Pagination
34- New endpoints missing rate limiting when similar endpoints have it
35- Pagination changes (offset → cursor) without backwards compatibility
36- Changed page sizes or default limits without documentation
37- Missing total count or next-page indicators in paginated responses
Rate Limiting & Pagination
- New endpoints missing rate limiting when similar endpoints have it
- Pagination changes (offset → cursor) without backwards compatibility
- Changed page sizes or default limits without documentation
- Missing total count or next-page indicators in paginated responses
39### Documentation Drift
40- OpenAPI/Swagger spec not updated to match new endpoints or changed params
41- README or API docs describing old behavior after changes
42- Example requests/responses that no longer work
43- Missing documentation for new endpoints or changed parameters
Documentation Drift
- OpenAPI/Swagger spec not updated to match new endpoints or changed params
- README or API docs describing old behavior after changes
- Example requests/responses that no longer work
- Missing documentation for new endpoints or changed parameters
45### Backwards Compatibility
46- Clients on older versions: will they break?
47- Mobile apps that can't force-update: does the API still work for them?
48- Webhook payloads changed without notifying subscribers
49- SDK or client library changes needed to use new features
Backwards Compatibility
- Clients on older versions: will they break?
- Mobile apps that can't force-update: does the API still work for them?
- Webhook payloads changed without notifying subscribers
- SDK or client library changes needed to use new features