SDK Method Names
Use x-fern-sdk-method-name
to customize SDK method names for gRPC methods
By default, Fern generates SDK method names based on your gRPC service and method names. You can override this behavior using the x-fern-sdk-method-name
extension.
Customize method names
Use x-fern-sdk-method-name
to specify custom method names for your gRPC methods:
This will generate SDK methods like:
Method naming conventions
Follow these conventions when naming SDK methods:
CRUD operations
Use standard CRUD naming for common operations:
Search and query operations
Use descriptive names for search operations:
Action operations
Use action-oriented names for business operations:
Language-specific method names
You can specify different method names for different programming languages:
Streaming method names
For streaming methods, use appropriate naming:
Service-level naming
Customize the service name for better SDK organization:
This generates cleaner SDK interfaces:
Handling method overloading
For services with similar methods, use descriptive names to avoid conflicts:
Async method naming
For long-running operations, consider async naming:
Grouping related methods
Use consistent naming for related operations:
This ensures method names follow the conventions of each target language while maintaining clear and intuitive APIs for developers.