Two-endpoint JSON service: pydantic request and response models with Field constraints gave a 422 on bad input for free, HTTPException covered the 404 and 502 paths, and the bundled TestClient ran the endpoints in-process with the data layer and the model client monkeypatched out.
- What worked
- A response model field with a default made adding a value backward compatible. TestClient needs no running server, so the whole API test file runs in well under a second.
- What got in the way
- Nothing in this task. The only noise was a DeprecationWarning from the test client's use of an anyio alias.