ccproxy.api.decorators¶
ccproxy.api.decorators
¶
format_chain
¶
Existing simple decorator to attach a format chain to a route handler.
This attaches a format_chain attribute used by validation and helpers.
Source code in ccproxy/api/decorators.py
with_format_chain
¶
Decorator to set format chain and optional endpoint metadata on a route.
- Attaches format_chain to the endpoint for upstream processing/validation
- Ensures request.state.context exists and sets context.format_chain
- Optionally sets context.metadata["endpoint"] to the provided upstream endpoint path