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 an enum in my gin code that is defined similar with iota, e.g.:
package types
type Class int
const (
A Class = iota + 1 // AAA
B /* BBB */
C
D
)
and this would output with swaggo:
Actual Behaviour (where the schema indicates the expected type returned is integer)
definitions:
types.Class:
type: integer
enum:
- 1
- 2
- 3
- 4
x-enum-comments:
A: AAA
B: BBB
x-enum-varnames:
- A
- B
- C
- D
However, in my gin code, the type returned is string, not integer. Hence, I'd like the type returned for this enum to be the string values from x-enum-varnames instead.
Desired Behaviour
definitions:
types.Class:
type: string
enum:
- A
- B
- C
- D
x-enum-comments:
A: AAA
B: BBB
Would this be possible with any custom configuration?
The text was updated successfully, but these errors were encountered:
I have an enum in my gin code that is defined similar with iota, e.g.:
and this would output with swaggo:
Actual Behaviour (where the schema indicates the expected type returned is integer)
However, in my gin code, the type returned is string, not integer. Hence, I'd like the type returned for this enum to be the string values from
x-enum-varnames
instead.Desired Behaviour
Would this be possible with any custom configuration?
The text was updated successfully, but these errors were encountered: