Skip to content

Commit 07a4588

Browse files
committed
add new readme guide
1 parent 56d5ca4 commit 07a4588

File tree

3 files changed

+30
-6
lines changed

3 files changed

+30
-6
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: Customize README
3+
description: Guide to configuring the README in your SDK
4+
---
5+
6+
By default, the README for your SDKs is generated programmatically. You can override this by configuring the `readme` section in `generators.yml` to control the content and structure of generated README files across all your SDKs.
7+
You can add custom introductions, showcase key endpoints, and organize your SDK documentation with feature sections.
8+
9+
```yaml title="generators.yml"
10+
readme:
11+
introduction: "Welcome to our API"
12+
apiReferenceLink: "https://docs.example.com"
13+
defaultEndpoint:
14+
method: "POST"
15+
path: "/users"
16+
features:
17+
authentication:
18+
- method: "POST"
19+
path: "/auth/login"
20+
users:
21+
- method: "GET"
22+
path: "/users"
23+
```
24+
25+
For more detailed information on `readme` configuration, see the [`generators.yml` documentation](/sdks/reference/generators-yml#readme)

fern/products/sdks/reference/generators-yml-reference.mdx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,9 @@ api:
108108
- openapi: ./path/to/openapi
109109
headers:
110110
X-Version:
111-
name: version # codegen name of the variable
112-
type: literal<"1234"> # type of the header, in this case a literal
111+
name: version # The variable name to use in generated SDK code. If not specified, uses the header name.
112+
type: literal<"1234"> # The type of the header value for code generation (e.g., "string", "literal<'value'>", "number").
113113
```
114-
115-
For advanced configuration objects:
116-
- `name` (string): The variable name to use in generated SDK code. If not specified, uses the header name.
117-
- `type` (string): The type of the header value for code generation (e.g., "string", "literal<'value'>", "number").
118114
</ParamField>
119115
120116
<ParamField path="environments" type="EnvironmentsSchema" toc={true}>

fern/products/sdks/sdks.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ navigation:
202202
- page: Filter Your Endpoints (Audiences)
203203
path: ./guides/filter-your-endpoints-audiences.mdx
204204
slug: audiences
205+
- page: Customize the README for your SDKs
206+
path: ./guides/configure-readme.mdx
207+
slug: readme
205208
- page: Self-host Fern's SDK Generators
206209
hidden: true
207210
path: ./guides/self-host-fern-generators.mdx

0 commit comments

Comments
 (0)