danielgtaylor / danielgtaylor/huma
Mapping Query Params in middleware
Open
question
- Dominant language
- Go
- Stars
- 4.4k
- Forks
- 285
- Avg merge
- 40m
- Merged PRs (30d)
- 1
Description
If I define an Operation and attach some middleware to it, is there a way I can parse the body, params and path params into the operation input struct within the middleware?
A router agnostic middleware has access to the query parameters through the `huma.Context`. These query parameters are always returned as a string. Assuming I have a struct with a `query` tag which corresponds to the query parameters passed, can I bind the query parameters into that struct within the middleware?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.