Replies: 2 comments
-
|
Hi @juliarn! Please check our request "optional" tagging documentation: https://huma.rocks/features/request-validation/?h=optional#optional-required |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I want to use Huma to generate OpenAPI spec from Go types for my API responses. Some of these types are generated using other tools and therefore do not allow me to set the omitempty property to mark individual fields as optional. However, all types share that optional fields have a pointer type.
Is there a possibility to automatically set all fields with pointer types to optional in the generated OpenAPI spec? This would solve my issue perfectly.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions