You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Learn how to generate and customize OpenRPC API reference documentation
4
+
---
5
+
6
+
Fern enables you to generate professional, interactive API reference documentation for your JSON-RPC APIs using the [OpenRPC](https://open-rpc.org/) specification. OpenRPC provides a standardized, machine-readable format for describing JSON-RPC 2.0 APIs, unlocking powerful documentation and code generation workflows.
7
+
8
+
<Framecaption={<ahref="https://www.alchemy.com/docs/data/nft-api/api-reference/nft-ownership-endpoints/get-nf-ts-for-owner-v-3">Example of Alchemy's docs site</a>}>
9
+
<imgsrc="./alchemy-openrpc.png"alt="Alchemy's OpenRPC API Reference Example" />
10
+
</Frame>
11
+
12
+
## How to Add an OpenRPC Endpoint
13
+
14
+
1. Add your OpenRPC specification file (e.g., `openrpc.yaml`) to your `/fern` directory.
15
+
2. Configure your `generators.yml` to point to your OpenRPC spec:
16
+
17
+
<CodeBlocktitle='generators.yml'>
18
+
```yaml
19
+
api:
20
+
specs:
21
+
- openrpc: ../../api-specs/openrpc/wallet.yml
22
+
```
23
+
</CodeBlock>
24
+
25
+
### Configuration Properties
26
+
27
+
<ParamField path="api.specs[].openrpc" required>
28
+
Path to your OpenRPC specification file. You can include multiple OpenRPC specs if your project exposes more than one JSON-RPC API.
0 commit comments