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'd like some way to override Optional[int32] to actual render as int32 in the swagger output.
I took a look at https://github.com/swaggo/swag#model-composition-in-response and if this were implemented for requests too, I could likely do something like this.
// @Param request body PutPlanInput{renewOnto=int32,renewQuantity=int32} true "Request"
Describe alternatives you've considered
There could be some generic type mapping so a user defined list of things could be switched Optional[int32] -> int32 for example
Extra annotations on the struct could also enable this mapping?
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I have a struct defined that I use as JSON body input for a handler
I am making use of an Optional pattern, so that I can determine if the value was 1) set and is null 2) not set
The rest of that code looks like this
This however results in swaggo generating the fallowing swagger spec, which is not actually what I want the user to see.
Describe the solution you'd like
I'd like some way to override
Optional[int32]
to actual render asint32
in the swagger output.I took a look at https://github.com/swaggo/swag#model-composition-in-response and if this were implemented for requests too, I could likely do something like this.
Describe alternatives you've considered
Optional[int32]
->int32
for exampleThe text was updated successfully, but these errors were encountered: