You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to implement an endpoint which accepts and validates application/x-www-form-urlencoded using some of the examples in previous issues for reference. I have the endpoint working. However, the OpenAPI docs lists it accepts both application/json and application/x-www-form-urlencoded.
I'd like to remove application/json support if possible. To do this I tried adding a contentType overwrite tag to the the Body struct in the handler func's input struct.
Hello,
I have been trying to implement an endpoint which accepts and validates application/x-www-form-urlencoded using some of the examples in previous issues for reference. I have the endpoint working. However, the OpenAPI docs lists it accepts both application/json and application/x-www-form-urlencoded.
I'd like to remove application/json support if possible. To do this I tried adding a contentType overwrite tag to the the Body struct in the handler func's input struct.
This resolves the docs reporting it accepts json but it causes the huma validator to panic from a nil pointer dereference when I submit a request:
Is there a better way to do what I need?
Example code:
https://go.dev/play/p/ul4rPk-eh6r
The text was updated successfully, but these errors were encountered: