As a follow-on to https://github.com/danielgtaylor/huma/issues/289, we're seeing a need to have request-aware middleware plugged into the request processing pipeline to implement a pattern that cross-cuts all API endpoints.
The main idea is:
Request structure matches some specific criteria (payload contains a field for instance)
Request has additional context added to it
Right now we're doing this by wrapping the API handler functions that get setup at registration time -- but it would be better to have a well defined construct for this pattern.
As a follow-on to https://github.com/danielgtaylor/huma/issues/289, we're seeing a need to have request-aware middleware plugged into the request processing pipeline to implement a pattern that cross-cuts all API endpoints.
The main idea is:
Right now we're doing this by wrapping the API handler functions that get setup at registration time -- but it would be better to have a well defined construct for this pattern.
Thanks in advance for considering!