Skip to content

[codex] add HTTP param decorators#129

Merged
ItayTheDar merged 1 commit into
mainfrom
catkin-foxglove
May 12, 2026
Merged

[codex] add HTTP param decorators#129
ItayTheDar merged 1 commit into
mainfrom
catkin-foxglove

Conversation

@ItayTheDar
Copy link
Copy Markdown
Contributor

Summary

  • Add PyNest HTTP parameter decorator markers: Body, Param, Query, Headers, Req, Res, Ip, HostParam, createParamDecorator, and ExecutionContext.
  • Adapt route registration to rewrite only marked parameters into FastAPI dependencies, preserving existing FastAPI signature binding for undecorated routes.
  • Add tests for built-in decorators, custom decorators, pipes, request/response injection, and backwards compatibility.
  • Add a documentation page and MkDocs nav entry for the new API.

Notes

Python does not support NestJS-style parameter decorator syntax inside function parameters, so this implements the feature using the existing PyNest/WebSocket-style marker-default pattern, for example def get(self, item_id: int = Param("id")).

Validation

  • uv run --group test python -m pytest -q — 162 passed, 8 warnings
  • uv run --group docs mkdocs build --strict — exits 0; existing docs warnings remain for Material/MkDocs 2.0 notice and lifespan_tasks.md not being included in nav.

@ItayTheDar ItayTheDar marked this pull request as ready for review May 12, 2026 20:54
@ItayTheDar ItayTheDar merged commit 8524deb into main May 12, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant