danielgtaylor / danielgtaylor/huma
Accessing validation results in the request pipeline
- Dominant language
- Go
- Stars
- 4.4k
- Forks
- 285
- Avg merge
- 40m
- Merged PRs (30d)
- 1
Description
Hi,
Is there a way to access the validation results in the downstream middlewares and/or handlers in the request pipeline before returning a response? I am happy with the built-in validation but I want to access and process the successfully validated fields and return `http.StatusOK` if there are any. (If this approach is not really compliant with the HTTP semantics, please let me know.)
What I am ultimately trying is to validate an input json object with possibly many fields and process all of the valid ones and let the user know which ones are successfully processed and which ones are not.
Thank you very much 🙏
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing Huma's request validation flow and how downstream middleware and handlers receive validation results. Compare the requested partial-processing behavior with the framework's current HTTP response semantics. Done would require a clearly defined, supported behavior for exposing successfully validated fields and reporting rejected fields.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100