New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow custom query param types. #433
Labels
enhancement
New feature or request
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The idea is to have something like
And allow the user to implement the field conversion.
Using the SchemaProvider interface it can be set the query param type, but the current implementation does not provide any interface for the conversion part.
The fallback is the TextUnmarshaler interface, but this interface is not enough because then will fail on the validation phase (always set the value as a string).
So my proposal is to add an interface that allow the user to implement this conversion.. something like
the relevant code is on the huma.go file, starting at line 825.
The text was updated successfully, but these errors were encountered: