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
When generating spec from source code, enum fields with a value type of uint are incorrectly parsed and have their resulting spec values defined as strings.
This is due to any uint type (uint, uint8 , uint16 , uint32 , uint64) not being handled within parseValueFromSchema.
Steps to reproduce
Define a struct field as an enum with a value type of uint:
// enum:1,2,3
Example uint
Generate spec from the source code and look for the enum field and verify that it has its values defined like so:
"enum": [
"1",
"2",
"3"
]
Environment
go-swagger version: latest
go version: 1.20.4
The text was updated successfully, but these errors were encountered:
Problem statement
When generating spec from source code, enum fields with a value type of
uint
are incorrectly parsed and have their resulting spec values defined as strings.This is due to any
uint
type (uint
,uint8
,uint16
,uint32
,uint64
) not being handled within parseValueFromSchema.Steps to reproduce
Define a struct field as an enum with a value type of
uint
:Generate spec from the source code and look for the enum field and verify that it has its values defined like so:
Environment
go-swagger version: latest
go version: 1.20.4
The text was updated successfully, but these errors were encountered: