Documentation
¶
Overview ¶
Package naming provides shared case conversion utilities for oastools packages.
This internal package contains common string transformation functions used by multiple oastools packages including builder and joiner. Functions include ToPascalCase, ToCamelCase, ToSnakeCase, ToKebabCase, and ToTitleCase.
These functions are used for:
- Builder package: Schema and operation naming from titles
- Joiner package: Template functions for operation-aware schema renaming
As an internal package, these functions are not part of the public API and may change without notice.
Package naming provides shared string case conversion utilities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToCamelCase ¶
ToCamelCase converts a string to camelCase. Like PascalCase but with the first letter lowercase. Example: "user_profile" -> "userProfile" Example: "UserProfile" -> "userProfile"
func ToKebabCase ¶
ToKebabCase converts a string to kebab-case. Like snake_case but with hyphens instead of underscores. Example: "UserProfile" -> "user-profile"
func ToPascalCase ¶
ToPascalCase converts a string to PascalCase. Separators (underscore, hyphen, dot, slash) trigger capitalization of the next letter. Example: "user_profile" -> "UserProfile" Example: "api-client" -> "ApiClient"
func ToSnakeCase ¶
ToSnakeCase converts a string to snake_case. Uppercase letters are prefixed with underscore and lowercased. Existing separators (hyphen, dot, slash) are converted to underscores. Example: "UserProfile" -> "user_profile" Example: "APIClient" -> "api_client"
func ToTitleCase ¶
ToTitleCase converts the first letter to uppercase. Example: "hello" -> "Hello"
Types ¶
This section is empty.