Overlay Customizations
Overlays allow you to modify your OpenRPC specification without directly editing the original file. This is useful for:
- Adding Fern-specific extensions
- Customizing documentation
- Adding examples and descriptions
- Overriding specific properties
Configure overlays
To use overlays, add them to your generators.yml
file:
Overlay file structure
Overlay files follow the OpenAPI Overlay Specification format:
Add method names
Override SDK method names for better developer experience:
Add examples
Enhance your specification with examples:
Filter with audiences
Add audience filtering to methods:
Add documentation
Enhance descriptions and documentation:
Server configurations
Add server-specific configurations:
Add parameter customizations
Customize parameter names and descriptions:
Add error documentation
Enhance error handling information:
Multiple overlays
You can apply multiple overlay files in sequence:
Environment-specific overlays
Use different overlays for different environments:
Overlays are applied in order, allowing you to build up customizations incrementally while keeping your original OpenRPC specification clean and focused on the core API definition.