Expand description
Naming support for generated code.
OpenAPI specs use different naming conventions for their types, operations, and resources. When codegen emits these names, it needs to transform them into identifiers that conform to the grammar and idiomatic case style of each target language.
Codegen segments OpenAPI names into NamePart segments. A UniqueNames
scope turns these segment sequences into a representation that’s unique
within that scope, and stable regardless of whether it’s rendered
AsPascalCase, AsSnakeCase, or AsKebabCase.
Structs§
- AsKebab
Case - Formats a name as
kebab-case. - AsPascal
Case - Formats a
UniqueNameasPascalCase. - AsSnake
Case - Formats a
UniqueNameassnake_case. - Unique
Name - A name that’s unique within a scope, and that can be rendered in any case.
- Unique
Names - A scope that claims target language names before final case rendering.
Enums§
- Name
Part - A segment of an OpenAPI source name.