feat(backend): harden pricing mutation contract and sync backend docs
- add typed response schemas for pricing write endpoints - add stale draft version guard for pricing mutations - unify pricing API contract around expected_scheme_version_id - update API route map - add smoke regression checklist for backend routes and artifact flows
This commit is contained in:
@@ -62,16 +62,20 @@ Validate:
|
||||
- no 500 on passthrough mode
|
||||
- unsupported mode returns 422
|
||||
|
||||
## 5. Pricing read model
|
||||
## 5. Pricing read / write contract
|
||||
|
||||
- GET /api/v1/schemes/{scheme_id}/pricing -> 200
|
||||
- GET /api/v1/schemes/{scheme_id}/current/seats/{seat_id}/price -> 200 for priced seat
|
||||
- GET /api/v1/schemes/{scheme_id}/test/seats/{seat_id} -> 200 for known seat
|
||||
- POST /api/v1/schemes/{scheme_id}/pricing/categories?expected_scheme_version_id={draft_version_id} -> 200 for valid draft
|
||||
- POST /api/v1/schemes/{scheme_id}/pricing/categories?expected_scheme_version_id=deadbeef... -> 409 for stale draft
|
||||
|
||||
Validate:
|
||||
- pricing bundle contains categories and rules arrays
|
||||
- effective seat price resolves according to domain priority
|
||||
- test seat preview explains selectable / has_price state
|
||||
- pricing write responses are stable and typed
|
||||
- stale pricing mutation returns `detail.code = stale_draft_version`
|
||||
|
||||
## 6. Draft publish preview
|
||||
|
||||
@@ -122,6 +126,8 @@ Regression is considered failed if any of the following happen:
|
||||
- passthrough display endpoint fails on known-good sample
|
||||
- publish preview refresh or cached read returns 500
|
||||
- pricing bundle contract changes unexpectedly
|
||||
- pricing write contract regresses or stops returning typed payloads
|
||||
- stale draft guard stops returning 409 on pricing mutations
|
||||
- admin audit/cleanup endpoints fail on healthy environment
|
||||
- artifact retention grows without bound for repeated preview refresh on same variant
|
||||
|
||||
|
||||
Reference in New Issue
Block a user