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:
greebo
2026-03-19 19:11:33 +03:00
parent c7c9184a71
commit fbeac890be
5 changed files with 197 additions and 215 deletions

View File

@@ -55,6 +55,19 @@
- POST /api/v1/schemes/{scheme_id}/draft/remap/preview
- POST /api/v1/schemes/{scheme_id}/draft/remap/apply
## app/api/routes/editor.py
- GET /api/v1/schemes/{scheme_id}/draft/structure
- GET /api/v1/schemes/{scheme_id}/draft/compare-preview
- POST /api/v1/schemes/{scheme_id}/draft/sectors
- POST /api/v1/schemes/{scheme_id}/draft/groups
- DELETE /api/v1/schemes/{scheme_id}/draft/sectors/records/{sector_record_id}
- DELETE /api/v1/schemes/{scheme_id}/draft/groups/records/{group_record_id}
- PATCH /api/v1/schemes/{scheme_id}/draft/seats/records/{seat_record_id}
- POST /api/v1/schemes/{scheme_id}/draft/seats/bulk
- PATCH /api/v1/schemes/{scheme_id}/draft/sectors/records/{sector_record_id}
- PATCH /api/v1/schemes/{scheme_id}/draft/groups/records/{group_record_id}
- POST /api/v1/schemes/{scheme_id}/draft/repair-references
## app/api/routes/admin.py
- GET /api/v1/admin/schemes/{scheme_id}/current/artifacts
- GET /api/v1/admin/schemes/{scheme_id}/current/validation
@@ -66,4 +79,4 @@
## Notes
- This file is an operational route index, not a generated OpenAPI export.
- Update this map in the same change set when adding, removing, renaming, or moving routes.
- Editor routes are maintained separately and should be synced from current source before relying on this file as a full route inventory.
- Query guards such as expected_current_scheme_version_id / expected_scheme_version_id are part of the operational contract for optimistic concurrency on mutable flows.