SDK Method Names
Use x-fern-sdk-method-name
to customize SDK method names for JSON-RPC methods
By default, Fern generates SDK method names based on your OpenRPC 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 JSON-RPC methods:
This will generate SDK methods like:
Method naming conventions
Follow these conventions when naming SDK methods:
CRUD operations
Use standard CRUD naming:
List operations
Use descriptive names for list operations:
Action operations
Use action-oriented names:
Language-specific method names
You can specify different method names for different programming languages:
Namespaced method names
For methods with namespace prefixes, customize the final method name:
Generates:
Notification method names
For notification methods (one-way calls), use appropriate naming:
Async method naming
For methods that return promises or futures, consider async naming:
This ensures method names follow the conventions of each target language while maintaining clear and intuitive APIs for developers.