Skip to content
Draft
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
36 changes: 36 additions & 0 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 @@ -64,4 +77,27 @@ 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}>
The title of the custom section as it will appear in the README.
</ParamField>
<ParamField path="customSections.language" type="'java' | 'typescript'" required={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}>
The Markdown content of the custom section. You can use template variables to dynamically insert package names and SDK version numbers.

| Language | Variable | Description |
|----------|----------|-------------|
| Java | `{{ group }}` | Maven groupId from `coordinate` field |
| Java | `{{ artifact }}` | Maven artifactId from `coordinate` field |
| Java | `{{ version }}` | SDK version |
| TypeScript | `{{ packageName }}` | Name of your package, as specified in the `package-name` field |
| TypeScript | `{{ version }}` | SDK version |

</ParamField>