Files
responder/docs/source
kennethreitz e1a6a60cbb Add WebSocket DI, OpenAPI 3.1, negotiated errors; zero mypy/ruff findings
Features:
- WebSocket handlers receive path params and dependencies by declaring
  them after `ws` — injection is opt-in by name, so handler(ws)
  signatures keep working. Providers taking a parameter receive the
  WebSocket; generator teardown runs when the handler finishes
- OpenAPI 3.1 support (openapi="3.1.0")
- OpenAPI schema endpoint serves JSON via Accept negotiation, or always
  when openapi_route ends in .json
- Path parameters are auto-documented in the OpenAPI spec, typed from
  route convertors
- Built-in 404/405 responses are content-negotiated: JSON clients get
  {"error": ...} bodies

Fixes:
- OpenAPI paths no longer leak convertor patterns (/users/{id:int} ->
  /users/{id})
- Duplicate route registration raises ValueError instead of an assert
  that disappears under python -O
- Removed dead _exception_handlers bookkeeping

Quality:
- mypy: 25 errors -> 0 (proper signatures, BaseRoute interface,
  input validation; no blanket ignores)
- ruff: 11 findings -> 0, with per-file ignores codified in pyproject
- types-pyyaml added to the test extra

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 21:58:03 -04:00
..