Skip to content

Naming Rules

How controllers, operations, types, and query keys are named.

The generator derives folder names, function names, type names, and query keys from the spec using a consistent set of rules.

Rules

SourceResultExample
Controller (OpenAPI tag)kebab-case folderContactTag → contact-tag/
OperationcamelCase from operationIdgetContact → getContact
Operation (no operationId)method + path segmentsGET /users/{id} → getUsersId
Operation (reserved word)suffixed with _delete → delete_
Query export object<controllerCamel>QueriescontactQueries
Mutation hookuse + PascalCase(operation)createContact → useCreateContact
Schema typesanitized schema namePage«User» → PageOfUser
Query key[dir, op, args]["contact", "getContact", { contactId: 1 }]