Skip to content

Commit 859e206

Browse files
docs: add exampleStyle configuration for README generation
Add documentation for the new exampleStyle field in README configuration. This field allows users to control the verbosity of usage examples in generated SDK README files, choosing between minimal (required parameters only) and comprehensive (all parameters) styles. Refs fern-api/fern#10001, fern-api/fern#9854 Co-Authored-By: [email protected] <[email protected]>
1 parent aba5b66 commit 859e206

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

fern/products/sdks/snippets/readme-options.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ readme:
44
introduction: "Welcome to our API"
55
apiReferenceLink: "https://docs.example.com"
66
apiName: "Example Product"
7+
exampleStyle: "minimal"
78
disabledSections:
89
- "contributing"
910
defaultEndpoint:
@@ -51,6 +52,10 @@ readme:
5152
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.
5253
</ParamField>
5354

55+
<ParamField path="exampleStyle" type="'minimal' | 'comprehensive'" required={false} default="comprehensive" toc={true}>
56+
Controls the verbosity of usage examples in the generated README. Use `minimal` to show only required parameters with simplified examples, or `comprehensive` to show all parameters including optional ones. Minimal examples improve readability for APIs with many optional fields.
57+
</ParamField>
58+
5459
<ParamField path="disabledSections" type="list of strings" required={false} toc={true}>
5560
Sections to disable in the README. Supported values: `"contributing"`.
5661
</ParamField>

0 commit comments

Comments
 (0)