Skip to content

Commit 95f1d72

Browse files
Kapil GowruKapil Gowru
authored andcommitted
feat: moved over all docs content
1 parent ea4e8a9 commit 95f1d72

29 files changed

+1417
-174
lines changed

fern/products/docs/docs.yml

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -90,51 +90,39 @@ navigation:
9090
- page: Hiding Content
9191
path: ./pages/navigation/hiding-content.mdx
9292
- section: API References
93+
collapsed: true
9394
contents:
9495
- page: Generate API Reference
95-
icon: fa-regular fa-wand-sparkles
9696
path: ./pages/api-references/generate-api-ref.mdx
9797
slug: generate-api-ref
9898
- page: SDK Snippets
99-
icon: fa-regular fa-brackets-curly
10099
path: ./pages/api-references/sdk-snippets.mdx
101100
- page: HTTP Snippets
102-
icon: fa-regular fa-code
103101
path: ./pages/api-references/http-snippets.mdx
104102
- section: API Explorer
105103
slug: api-explorer
106104
path: ./pages/api-references/api-explorer.mdx
107-
icon: fa-regular fa-play
108105
contents:
109106
- page: Auto-populate API Keys
110-
icon: fa-regular fa-key
111107
path: ./pages/api-references/autopopulate-api-key.mdx
112108
- page: Endpoint Errors
113-
icon: fa-regular fa-triangle-exclamation
114109
path: ./pages/api-references/endpoint-errors.mdx
115110
- page: Audiences
116-
icon: fa-regular fa-user-group
117111
path: ./pages/api-references/audiences.mdx
118112
- page: Customize API Reference Layout
119-
icon: fa-regular fa-arrows-up-down-left-right
120113
path: ./pages/api-references/customize-api-ref.mdx
121114
- page: Write Markdown in API Reference
122-
icon: fa-regular fa-pencil
123115
path: ./pages/api-references/api-ref-content.mdx
124116
- page: Generate Webhook Reference
125-
icon: fa-regular fa-webhook
126117
path: ./pages/api-references/generate-webhook-ref.mdx
127118
- page: Multiple Server URLs
128-
icon: fa-regular fa-server
129119
path: ./pages/api-references/server-urls.mdx
130120
slug: server-urls
131121
- page: Generate WebSocket Reference
132-
icon: fa-regular fa-plug
133122
path: ./pages/api-references/generate-websocket-ref.mdx
134123
slug: generate-websocket-ref
135124
- page: Generate OpenRPC Reference
136-
icon: fa-regular fa-diamond
137-
path: ./pages/api
125+
path: ./pages/api-references/generate-openrpc-ref.mdx
138126
slug: generate-openrpc-ref
139127
- section: SEO
140128
collapsed: true
@@ -143,8 +131,6 @@ navigation:
143131
path: ./pages/seo/configuring-slugs.mdx
144132
- page: Redirects
145133
path: ./pages/seo/redirects.mdx
146-
- page: SEO Metadata
147-
path: ./pages/seo/seo-metadata.mdx
148134
- page: llms.txt
149135
path: ./pages/seo/llms-txt.mdx
150136
- section: Authentication
@@ -155,7 +141,7 @@ navigation:
155141
- page: RBAC
156142
path: ./pages/authentication/rbac.mdx
157143
- page: API Key Injection
158-
path: ./pages/authentication/api-key-injection.mdx
144+
path: ./pages/api-references/autopopulate-api-key.mdx
159145
- section: Enterprise
160146
collapsed: true
161147
contents:
@@ -164,6 +150,8 @@ navigation:
164150
- section: Integrations
165151
collapsed: true
166152
contents:
153+
- page: Overview
154+
path: ./pages/integrations/overview.mdx
167155
- section: Analytics
168156
contents:
169157
- page: Google
@@ -174,16 +162,27 @@ navigation:
174162
path: ./pages/integrations/analytics/fullstory.mdx
175163
- page: Segment
176164
path: ./pages/integrations/analytics/segment.mdx
165+
- page: Mixpanel
166+
path: ./pages/integrations/analytics/mixpanel.mdx
177167
- section: Support
178168
contents:
179-
- page: Postman
180-
path: ./pages/integrations/support/postman.mdx
169+
- page: Intercom
170+
path: ./pages/integrations/support/intercom.mdx
181171
- page: Postman
182172
path: ./pages/integrations/postman.mdx
183-
- page: Feature Flags
184-
path: ./pages/integrations/feature-flags.mdx
185-
- page: Self-hosted
186-
path: ./pages/integrations/self-hosted.mdx
173+
- page: LaunchDarkly Feature Flags
174+
path: ./pages/integrations/launchdarkly.mdx
175+
- section: Developer Tools
176+
collapsed: true
177+
contents:
178+
- page: Cursor
179+
path: ./pages/developer-tools/cursor.mdx
180+
- page: GitLab
181+
path: ./pages/developer-tools/gitlab.mdx
182+
- page: Vale
183+
path: ./pages/developer-tools/vale.mdx
184+
- page: View Markdown
185+
path: ./pages/developer-tools/view-markdown.mdx
187186
- changelog: ./pages/changelog
188187
icon: fa-regular fa-clock-rotate-left
189188

540 KB
Loading
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: Generate OpenRPC Reference
3+
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+
<Frame caption={<a href="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+
<img src="./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+
<CodeBlock title='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.
29+
</ParamField>
30+
31+
## Common Use Cases
32+
33+
JSON-RPC APIs are widely used for:
34+
- **Blockchain & Crypto**: Node RPC endpoints, wallet APIs
35+
- **FinTech**: Trading platforms, market data feeds
36+
- **Developer Tools**: Language servers, debuggers, automation
37+
- **Distributed Systems**: Remote procedure calls between services
38+
39+
Leverage Fern and OpenRPC to deliver world-class developer experiences for your JSON-RPC APIs.
Lines changed: 69 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,73 @@
11
---
2-
title: Role-Based Access Control
2+
title: Role-based access control
3+
subtitle: Control who can view your documentation
4+
description: Learn how to restrict access to your documentation using role-based access control (RBAC)
35
---
46

5-
How to implement role-based access control for your documentation.
7+
<Note>RBAC is part of the pro plan.</Note>
68

7-
<Warning>This page is a WIP, please refer to our previous [documentation](https://buildwithfern.com/learn/docs/getting-started/overview).</Warning>
9+
Fern allows you to restrict parts of your navigation to individuals with specific roles. Below, we walk through each of the steps
10+
required to configure RBAC.
11+
12+
<Steps>
13+
### Define all the `roles` in your docs.yml
14+
15+
Start by defining all the different roles in your `docs.yml`. You can simply specify this under a `roles` key:
16+
17+
```yml docs.yml
18+
roles:
19+
- everyone # every user is given this role
20+
- partners
21+
- beta-users
22+
- admins
23+
```
24+
25+
<Info>The `everyone` role is a special role. Every user has this role.</Info>
26+
27+
### Define viewers on parts of the navigation
28+
29+
Every navigation item (`sections`, `pages`, `api references`) can have a set of designated viewers. If you don't
30+
specify viewers, then it defaults to `everyone` and the page is public.
31+
32+
```yml docs.yml {7-8,14-16}
33+
navigation:
34+
- tab: Documentation
35+
layout:
36+
- page: Overview
37+
path: pages/overview.mdx
38+
- section: Beta Release
39+
viewers:
40+
- beta-users
41+
- tab: API Reference
42+
layout:
43+
- page: Overview
44+
path: pages/overview.mdx
45+
- section: Beta Release
46+
viewers:
47+
- partners
48+
- admin
49+
```
50+
51+
The viewers are inherited by nested pieces of content. For example, if a section can only be viewed by `admins`, then all its
52+
pages and nested sections can also only be viewed by admins.
53+
54+
### Configure authentication via a `fern_token`
55+
56+
In this step, we will configure authentication so that Fern can understand what roles a particular user has. Fern expects the user's
57+
browser session to have a cookie called `fern_token`. If the cookie is not present, the user will be redirected to your company's
58+
login page.
59+
60+
Upon login, you must set a JWT for the user using a secret key that we will provide you with. The JWT must have a `fern` claim
61+
with a key called roles.
62+
63+
```json
64+
{
65+
"fern": {
66+
"roles": ["partners"]
67+
}
68+
}
69+
```
70+
71+
<Note>Please reach out to [email protected] when you are on this step so we can provide you with a secret key.</Note>
72+
73+
</Steps>

fern/products/docs/pages/configuration/versioning.mdx

Lines changed: 0 additions & 103 deletions
This file was deleted.

0 commit comments

Comments
 (0)