Documentation
¶
Overview ¶
Package naming provides string conversion utilities for mapping OpenAPI operation identifiers to Go and MCP naming conventions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeduplicateNames ¶
DeduplicateNames appends numeric suffixes (_2, _3, …) to resolve collisions in a list of names. The first occurrence keeps its original name; subsequent duplicates get incrementing suffixes.
func OperationDomain ¶
OperationDomain derives a domain/action name from an OpenAPI operation. It prefers the operationID (converted to snake_case). When operationID is empty, it falls back to a combination of HTTP method and path segments.
func ToPascalCase ¶
ToPascalCase converts a snake_case string to PascalCase. It recognizes common acronyms and uppercases them fully (e.g., "pet_id" → "PetID").
func ToSnakeCase ¶
ToSnakeCase converts a camelCase or PascalCase string to snake_case. It handles acronyms (e.g., "HTTPMethod" → "http_method") and consecutive uppercase runs.
Types ¶
This section is empty.