Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


## 0.78.4
**`(fix):`** Collapse any combination of optional and nullable to optional<nullable<T>>.
**`(fix):`** Collapse any combination of optional and nullable to `optional<nullable<T>>`.

## 0.78.3
**`(chore):`** Support IR v59 in the Rust SDK generator.
Expand Down
50 changes: 46 additions & 4 deletions fern/products/sdks/snippets/readme-options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@ readme:
method: "POST"
path: "/users"
stream: false
customSections:
- title: "Custom Section"
language: "java"
content: |
This is a custom section. Latest package info is {{ group }}:{{ artifact }}:{{ version }}.
- title: "Custom Section"
language: "typescript"
content: |
Custom section for {{ packageName }}
- title: "Another Custom Section"
language: "typescript"
content: |
A second custom section for {{ packageName }}
features:
authentication:
- method: "POST"
Expand Down Expand Up @@ -42,10 +55,6 @@ readme:
Sections to disable in the README. Supported values: `"contributing"`.
</ParamField>

<ParamField path="defaultEndpoint" type="ReadmeEndpointSchema" required={false} toc={true}>
Specifies which endpoint's code snippet to showcase as the primary example in the README.
</ParamField>

<ParamField path="features" type="map<string, list<ReadmeEndpointSchema>>" required={false} toc={true}>
Organizes endpoints into named feature sections within the README. Each feature creates a dedicated section with example code snippets for the specified endpoints.
</ParamField>
Expand All @@ -64,4 +73,37 @@ Specifies which endpoint's code snippet to showcase as the primary example in th

<ParamField path="defaultEndpoint.stream" type="boolean" required={false} default="false" toc={true}>
Whether the endpoint is a streaming endpoint. Defaults to `false`.
</ParamField>

### Custom sections

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

<ParamField path="customSections.title" type="string" required={true} toc={true}>
The title of the custom section as it will appear in the README.
</ParamField>
<ParamField path="customSections.language" type="'java' | 'typescript'" required={true} toc={true}>
The target SDK language for this section. The custom section will only appear in README files generated for the specified language.
</ParamField>
<ParamField path="customSections.content" type="string" required={true} toc={true}>
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:

| Language | Variable | Description |
|----------|----------|-------------|
| TypeScript | `packageName` | Name of your package, as specified in the [`package-name` field](/sdks/generators/typescript/configuration#package-name) |
| Python | `packageName` | Name of your package, as specified in the [`package-name` field](/sdks/generators/python/configuration#package-name) |
| Go | `owner` | The owner of your Go module |
| Go | `repo` | The [repository](/sdks/generators/go/publishing#configure-output-location) where your Go module is published |
| Go | `version` | SDK version |
| Java | `group` | Maven `groupId` [from `coordinate` field](/sdks/generators/java/publishing#configure-maven-coordinate) |
| Java | `artifact` | Maven `artifactId` [from `coordinate` field](/sdks/generators/java/publishing#configure-maven-coordinate) |
| Java | `version` | SDK version |
| C#/.NET | `packageName` | Name of your package, as specified in the [`package-name` field](/sdks/generators/csharp/configuration#package-name) |
| PHP | `packageName` | Name of your package, as specified in the [`package-name` field](/sdks/generators/php/configuration#package-name) |
| Ruby | `packageName` | Name of your package, as specified in the [`package-name` field](/sdks/generators/ruby/configuration#package-name) |
| Swift | `gitUrl` | The [URL](/sdks/generators/swift/publishing#verify-package-availability) where your Swift package is published. For example, `https://github.com/fern-api/basic-swift-sdk` |
| Swift | `minVersion` | SDK version |

</ParamField>