Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToGoFieldName ¶
ToGoFieldName converts any OpenAPI identifier to a valid Go exported identifier in PascalCase for use as a struct field name. Unlike ToGoName, it does not escape Go reserved words because struct fields are accessed via selectors (e.g., obj.Type) which never conflict with keywords.
func ToGoName ¶
ToGoName converts any OpenAPI identifier to a valid Go exported identifier in PascalCase.
func ToGoParamName ¶
ToGoParamName converts any OpenAPI identifier to a valid Go unexported identifier in camelCase.
Types ¶
type Namer ¶
type Namer struct {
// contains filtered or unexported fields
}
Namer handles conversion of OpenAPI identifiers to Go identifiers and tracks used names to prevent collisions.
func (*Namer) RegisterName ¶
RegisterName registers a name and returns it. If the name has already been registered, a numeric suffix is appended to make it unique.