Introduce two decorators in controllers/openapi/_contract.py that each own one
slice of the HTTP contract from a single Pydantic model reference:
- @accepts(query=, body=): validate the request, inject the validated model as a
typed kwarg, and emit the Swagger param/body schema. Validation errors map to
422 with ValidationError.json() (one shape).
- @returns(status, model): emit the response schema and serialize the handler's
returned model via model_dump(mode="json"); non-model returns pass through.
Both sit below @auth_router.guard so auth precedes validation and the unit-test
__wrapped__ seam keeps unwrapping exactly the guard layer.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>