[REQ] [GO] [SERVER] Added enumClassPrefix option to go-gin-server generation
Created by: pmcgleenon
Is your feature request related to a problem? Please describe.
I'm running into problems with the go-gin-server target for generated enums.
I see go-server already has this option enumClassPrefix to use the classname in the enum which seems to fix it. https://github.com/OpenAPITools/openapi-generator/issues/6907
go-gin-server doesn't have this option. Also the go-gin-server model.mustache template looks incorrect:
- type declaration uses "name" but the value definition is using "classname" so the generated code is invalid:
type ComparisonOperator_anyOf string
// List of ComparisonOperator_anyOf
const (
EQ ComparisonOperatorAnyOf = "EQ" <- this is not matching ComparisonOperator_anyOf in type declaration above
NEQ ComparisonOperatorAnyOf = "NEQ"
GT ComparisonOperatorAnyOf = "GT"
GTE ComparisonOperatorAnyOf = "GTE"
LT ComparisonOperatorAnyOf = "LT"
LTE ComparisonOperatorAnyOf = "LTE"
)
Describe the solution you'd like
adding the enumClassPrefix option to go-gin-server resolves this