I'm trying to generate an oapi 3.1 client for the mealie OpenAPI spec (will attach the .json spec) and the generator emits the following constants for an enum (specified in the schema as "RelationalOperator":{"type":"string","enum":["=","<>",">","<",">=","<="],"title":"RelationalOperator"}):
type RelationalOperator string
const (
RelationalOperatorUnknown RelationalOperator = "="
RelationalOperatorUnknown RelationalOperator = "<>"
RelationalOperatorUnknown RelationalOperator = ">"
RelationalOperatorUnknown RelationalOperator = "<"
RelationalOperatorUnknown RelationalOperator = ">="
RelationalOperatorUnknown RelationalOperator = "<="
)
I guess the generator should use a counter for the "unknown" variables (or use the character names, but that'd become really verbose very quickly), otherwise the generated code isn't syntactically correct.
For now I'll patch this out of my spec document, but would be neat if this just worked fully out of the box - just like the rest of the generator, which seems pretty bulletproof!
mealy-openapi.json
I'm trying to generate an oapi 3.1 client for the mealie OpenAPI spec (will attach the .json spec) and the generator emits the following constants for an enum (specified in the schema as
"RelationalOperator":{"type":"string","enum":["=","<>",">","<",">=","<="],"title":"RelationalOperator"}):I guess the generator should use a counter for the "unknown" variables (or use the character names, but that'd become really verbose very quickly), otherwise the generated code isn't syntactically correct.
For now I'll patch this out of my spec document, but would be neat if this just worked fully out of the box - just like the rest of the generator, which seems pretty bulletproof!
mealy-openapi.json