- ID
- f353637a-3e5d-4b03-833a-61af8964acdb
BE-7835 Scaffold Schemathesis OpenAPI contract-testing harness
- source :: https://hungryroot.atlassian.net/browse/BE-7835
- tags :: Hungryroot API Project
- status :: Development in Progress
Summary
Phase 1 (Schemathesis) of contract testing proposal. Validate drf-spectacular
OpenAPI schema against implementation, in-process (no live server), via Django/DRF test client.
Scope
- Add ~schemathesis~ to ~pyproject.toml~ ~[project.optional-dependencies].dev~
- Create ~app/tests/rest/contract/~ package
- Load drf-spectacular schema in-process for ~/api/v2/~ and ~/api/v3/~
- Schema served at ~/api/v2/schema/~ and ~/api/v3/schema/~
- Generate directly, no running server
- Drive property-based request/response validation through DRF ~APIClient~
Acceptance Criteria
- [ ] Harness runs locally, validates at least one endpoint against schema
- [ ] Reports schema conformance failures clearly
- [ ] ~prek run ruff~ and ~prek run ruff-format~ clean on touched files