Customize method names

View as Markdown

You can fine-tune your SDK method and group names to create intuitive, user-friendly code that matches your API’s purpose. For example, instead of client.postUsers you can configure your SDK to read client.users.create().

Generated SDK behavior

Fern generates SDK methods using your configured group and method names. Casing is automatically adapted for each language (snake_case in Python, camelCase in TypeScript, PascalCase in Go, etc.), so you define the endpoint structure once and get correctly formatted methods across all generated SDKs.

1const response = await client.users.create();

Setting up method names

Configure how endpoints map to SDK method and group names in your API definition:

openapi.yaml
1paths:
2 /users:
3 post:
4 x-fern-sdk-group-name: users
5 x-fern-sdk-method-name: create

For full configuration details, see the docs for your API definition format: