Customize README

Each SDK includes a README.md file in its root directory. This Markdown file provides an overview of the SDK and instructions for working with the associated API. By default, Fern generates the README automatically with usage examples and API details.

Although each SDK has its own README, the content can be configured globally through the readme section in the generators.yml file.

Configuration options

generators.yml
1readme:
2 bannerLink: "https://example.com/banner"
3 introduction: "Welcome to our API"
4 apiReferenceLink: "https://docs.example.com"
5 apiName: "Example Product"
6 exampleStyle: "minimal"
7 disabledSections:
8 - "contributing"
9 defaultEndpoint:
10 method: "POST"
11 path: "/users"
12 stream: false
13 customSections:
14 - title: "Custom Section"
15 language: "java"
16 content: |
17 This is a custom section. Latest package info is {{ group }}:{{ artifact }}:{{ version }}.
18 - title: "Custom Section"
19 language: "typescript"
20 content: |
21 Custom section for {{ packageName }}
22 - title: "Another Custom Section"
23 language: "typescript"
24 content: |
25 A second custom section for {{ packageName }}
26 features:
27 authentication:
28 - method: "POST"
29 path: "/auth/login"
30 - "GET /auth/profile"
31 users:
32 - method: "GET"
33 path: "/users"
34 - method: "POST"
35 path: "/users"
string

URL for a banner image or link that appears at the top of the README.

introduction
string

Custom introduction text that appears at the beginning of the README.

string

URL to your external API documentation or reference guide.

apiName
string

Name of the API that appears in the README. Will appear as Your Api Name SDK or Your Api Name API throughout the README. Defaults to organization name if not set.

exampleStyle
'minimal' | 'comprehensive'Defaults to comprehensive

Controls whether usage examples show only required parameters (minimal) or all parameters (comprehensive). Currently only supported for Java SDKs.

disabledSections
list of strings

Sections to disable in the README. Supported values: "contributing".

features
list of objects

Organizes endpoints into named feature sections within the README. Each feature creates a dedicated section with example code snippets for the specified endpoints.

Specifies which endpoint’s code snippet to showcase as the primary example in the README.

defaultEndpoint.method
stringRequired

HTTP method of the default endpoint (e.g., GET, POST, PUT, DELETE).

defaultEndpoint.path
stringRequired

Endpoint path for the default example (e.g., /users, /auth/login).

defaultEndpoint.stream
booleanDefaults to false

Whether the endpoint is a streaming endpoint. Defaults to false.

Define a custom section in the generated README for a specific SDK.

customSections.title
stringRequired

The title of the custom section as it will appear in the README.

customSections.language
'java' | 'typescript'Required

The target SDK language for this section. The custom section will only appear in README files generated for the specified language.

customSections.content
stringRequired

The Markdown content of the custom section. You can use template variables in the format {{ variable }} that will be dynamically replaced with values specific to each SDK language when the README is generated.

Available template variables by language:

LanguageVariableDescription
TypeScriptpackageNameName of your package, as specified in the package-name field
PythonpackageNameName of your package, as specified in the package_name field
GoownerThe owner of your Go module
GorepoThe repository where your Go module is published
GoversionSDK version
JavagroupMaven groupId from coordinate field
JavaartifactMaven artifactId from coordinate field
JavaversionSDK version
C#/.NETpackageNameName of your package, as specified in the package-name field
PHPpackageNameName of your package, as specified in the package-name field
RubypackageNameName of your package, as specified in the package-name field
SwiftgitUrlThe URL where your Swift package is published. For example, https://github.com/fern-api/basic-swift-sdk
SwiftminVersionSDK version

Additional customization

To go beyond the available configuration options, you can manually edit the README.md file. Then, add it to the .fernignore file to prevent it from being overwritten during regeneration.