If you use Fern to generate SDKs, you can display SDK code snippets in your API Reference. These snippets show examples using your actual SDK in TypeScript, Python, Go, and other supported languages.
Once configured, SDK snippets replace HTTP snippets.
By default, SDK snippets are dynamic code examples that allow users to modify parameters and see code examples update in real time across all supported languages.
Alternatively, you can disable dynamic snippets in your docs.yml and use static code examples.

To configure SDK snippets, first name your SDKs in generators.yml and then reference that name in docs.yml.
Fern needs to read request examples from your API definition to generate code snippets. For OpenAPI, follow Swagger’s examples documentation.
Configure package names in your generators.yml file:
package-name: your-package-name to the output section.coordinate: com.your-org:your-package-name to the output section.packageName: YourPackageName to the config section.repository: your-organization/your-repository to the github section.Add the package name for the corresponding SDK to your docs.yml file:
your-package-name must match the your-package-name that you configured in your generators.yml file.com.your-org:your-package-name must match the coordinate that you configured in your generators.yml file.YourPackageName must match the packageName that you configured in your generators.yml file.https://github.com/.To display different package names for SDK users versus documentation users, use overrides files.
You can specify which SDK version to use when generating code snippets.
Use the default-language key at the top indentation level of docs.yml. This setting applies to both SDK snippets and HTTP snippets.
Looking for information on generating API endpoint request and response snippets? See our documentation on Endpoint Request Snippets and Endpoint Response Snippets.