From c32c0131fd770465e73ae999e953dda878805c4e Mon Sep 17 00:00:00 2001 From: Zach Kirsch Date: Sat, 22 Feb 2025 17:46:43 -0600 Subject: [PATCH] feat(internal): add 'language' prop to all Tabs in docs to enable syncing (#6136) * feat(internal): add 'language' prop to all Tabs in docs to enable syncing * undo changes to test --- .../capabilities/augment-with-custom-code.mdx | 28 +++++++++---------- .../sdks/capabilities/auto-pagination.mdx | 4 +-- .../capabilities/discriminated-unions.mdx | 4 +-- .../capabilities/forward-compatibility.mdx | 2 +- .../sdks/capabilities/integration-tests.mdx | 6 ++-- .../sdks/capabilities/multipart-form-data.mdx | 2 +- fern/pages/sdks/capabilities/oauth.mdx | 6 ++-- .../sdks/capabilities/schema-validation.mdx | 2 +- .../sdks/capabilities/server-sent-events.mdx | 4 +-- .../sdks/capabilities/strongly-typed.mdx | 2 +- .../sdks/introduction/customer-showcase.mdx | 24 ++++++++-------- 11 files changed, 42 insertions(+), 42 deletions(-) diff --git a/fern/pages/sdks/capabilities/augment-with-custom-code.mdx b/fern/pages/sdks/capabilities/augment-with-custom-code.mdx index ce5e77479bd..c004510acc9 100644 --- a/fern/pages/sdks/capabilities/augment-with-custom-code.mdx +++ b/fern/pages/sdks/capabilities/augment-with-custom-code.mdx @@ -18,7 +18,7 @@ Simply add your custom files to the SDK repository and list them out in `.ferni won't override any files that you add in `.fernignore`. - + ### Create a new file `src/helper.ts` @@ -49,7 +49,7 @@ won't override any files that you add in `.fernignore`. ``` - + ### Create a new file `src//helper.py` @@ -79,7 +79,7 @@ won't override any files that you add in `.fernignore`. ``` - + ### Create a new file `src/main/java//Helper.java` @@ -122,7 +122,7 @@ won't override any files that you add in `.fernignore`. ``` - + ### Create a new file `helper.go` @@ -164,7 +164,7 @@ principle is the same: **extension**. You can inherit the Fern generated client and add whatever methods you want. - + See an example from Flatfile using this process in their [TypeScript SDK](https://github.com/FlatFilers/flatfile-node) @@ -218,7 +218,7 @@ Fern generated client and add whatever methods you want. ``` - + See an example from ElevenLabs using this process in their [Python SDK](https://github.com/elevenlabs/elevenlabs-python/blob/main/src/elevenlabs/client.py). @@ -285,7 +285,7 @@ Fern generated client and add whatever methods you want. ``` - + ### Rename the Fern-generated client We suggest naming your Fern-generated client something like `BaseClient`to reflect that this client will be extended. @@ -331,7 +331,7 @@ Fern generated client and add whatever methods you want. ``` - + ### Create a new file `client/my_client.go` @@ -390,8 +390,8 @@ Fern generated client and add whatever methods you want. To add custom dependencies to your generated SDKs, you can update your `generators.yml`. - - + + ```yaml {4-7} - name: fernapi/fern-typescript-node-sdk version: "..." @@ -401,8 +401,8 @@ To add custom dependencies to your generated SDKs, you can update your `generato extraDevDependencies: "@types/lodash-es": '1.0.0' ``` - - + + ```yaml {4-7} - name: fernapi/fern-python-sdk version: "..." @@ -412,5 +412,5 @@ To add custom dependencies to your generated SDKs, you can update your `generato extra_dev_dependencies: requests_mock: '1.12.1' ``` - - + + diff --git a/fern/pages/sdks/capabilities/auto-pagination.mdx b/fern/pages/sdks/capabilities/auto-pagination.mdx index 5e724c72e50..a537b18c18b 100644 --- a/fern/pages/sdks/capabilities/auto-pagination.mdx +++ b/fern/pages/sdks/capabilities/auto-pagination.mdx @@ -8,7 +8,7 @@ description: Paginate through API responses easily with offset, cursor, and link Instead of forcing SDK users to learn the intricacies of your pagination system, Fern SDKs will return an iterator so that users can simply loop through all the results. - + When pagination for an endpoint is configured, the TypeScript SDK method will return a `Page` where `T` is the underlying data type. The `Page` @@ -42,7 +42,7 @@ Instead of forcing SDK users to learn the intricacies of your pagination system, ``` - + When pagination for an endpoint is configured, the Python SDK method will return a `Pager[T]` (specifically a `SyncPager[T]` or an `AsyncPager[T]`) where `T` is the underlying data type. The `Pager[T]` diff --git a/fern/pages/sdks/capabilities/discriminated-unions.mdx b/fern/pages/sdks/capabilities/discriminated-unions.mdx index 5a85bf29369..b6d6ea9fc2c 100644 --- a/fern/pages/sdks/capabilities/discriminated-unions.mdx +++ b/fern/pages/sdks/capabilities/discriminated-unions.mdx @@ -127,7 +127,7 @@ or - + ```ts maxLines=0 {1} export type Shape = Triangle | Square; @@ -173,7 +173,7 @@ export function computeArea(shape: Shape): number { - + Go does not have a built-in support for discriminated unions. However, you can define a union struct to achieve the same effect: diff --git a/fern/pages/sdks/capabilities/forward-compatibility.mdx b/fern/pages/sdks/capabilities/forward-compatibility.mdx index b554facbad4..0688575bc00 100644 --- a/fern/pages/sdks/capabilities/forward-compatibility.mdx +++ b/fern/pages/sdks/capabilities/forward-compatibility.mdx @@ -8,7 +8,7 @@ legacy SDKs. You can safely add additional response properties, enum values, and The legacy SDKs will safely handle deserializing extra information. - + ### Additional Response Properties As you make new response properties available, the legacy SDKs will continue to work. For example, let's say you diff --git a/fern/pages/sdks/capabilities/integration-tests.mdx b/fern/pages/sdks/capabilities/integration-tests.mdx index 5752a38ac77..daa03779390 100644 --- a/fern/pages/sdks/capabilities/integration-tests.mdx +++ b/fern/pages/sdks/capabilities/integration-tests.mdx @@ -56,7 +56,7 @@ add the test files to your `.fernignore` file to prevent them from being overwritten by Fern. - + ### Create `tests/custom.test.ts` ```typescript @@ -85,7 +85,7 @@ overwritten by Fern. ``` - + ### Create `tests/test_custom.py` ```python @@ -111,7 +111,7 @@ overwritten by Fern. ``` - + ### Create `src/test/java/com/example/MyClientTest.java` diff --git a/fern/pages/sdks/capabilities/multipart-form-data.mdx b/fern/pages/sdks/capabilities/multipart-form-data.mdx index c00854e8930..1dab7885643 100644 --- a/fern/pages/sdks/capabilities/multipart-form-data.mdx +++ b/fern/pages/sdks/capabilities/multipart-form-data.mdx @@ -7,7 +7,7 @@ Fern generated SDKs natively support uploading files and other media through multipart form data uploads. - + The TypeScript SDK will accept either a `fs.readStream`, `fs.ReadableStream` or a `Blob` for the file types. This is to ensure that the file upload functionality can be used in the browser, Node.js and edge runtimes like Next.js and Cloudflare. diff --git a/fern/pages/sdks/capabilities/oauth.mdx b/fern/pages/sdks/capabilities/oauth.mdx index ecbdda5f75c..a156de07f36 100644 --- a/fern/pages/sdks/capabilities/oauth.mdx +++ b/fern/pages/sdks/capabilities/oauth.mdx @@ -12,7 +12,7 @@ For the `client-credentials` OAuth flow, the user simply provides their `client- and they're ready to go. - + When OAuth is configured, the TypeScript SDK's client constructor will include the `clientId` and `clientSecret` parameters. @@ -30,7 +30,7 @@ and they're ready to go. - + When OAuth is configured, the Python SDK's client constructor will include the `client_id` and `client_secret` parameters. @@ -48,7 +48,7 @@ and they're ready to go. - + When OAuth is configured, the Java SDK’s builder methods for setting the `clientId` and `clientSecret` are available. diff --git a/fern/pages/sdks/capabilities/schema-validation.mdx b/fern/pages/sdks/capabilities/schema-validation.mdx index ea776fd69c9..628999a7ab5 100644 --- a/fern/pages/sdks/capabilities/schema-validation.mdx +++ b/fern/pages/sdks/capabilities/schema-validation.mdx @@ -12,7 +12,7 @@ languages like Python, TypeScript, and Ruby. However, for strongly typed languages like Go, Java, and C# this is always on. - + The TypeScript SDK contains a `serialization` folder when generated. ``` {5} diff --git a/fern/pages/sdks/capabilities/server-sent-events.mdx b/fern/pages/sdks/capabilities/server-sent-events.mdx index 3333223c9f3..6b48fdcd7d6 100644 --- a/fern/pages/sdks/capabilities/server-sent-events.mdx +++ b/fern/pages/sdks/capabilities/server-sent-events.mdx @@ -10,7 +10,7 @@ especially relevant for chat completions, where you want to stream LLM outputs in real-time. - + When an endpoint is configured to use Server-Sent Events, the TypeScript SDK method will return an `AsyncIterable` of the underlying data type. This allows you to use it in a `for await` loop. @@ -45,7 +45,7 @@ outputs in real-time. } ``` - + When an endpoint is configured to use Server-Sent Events, the Python SDK method will return an `typing.Iterator` of the underlying data type. diff --git a/fern/pages/sdks/capabilities/strongly-typed.mdx b/fern/pages/sdks/capabilities/strongly-typed.mdx index 8c7e33d19d4..6c805c4611a 100644 --- a/fern/pages/sdks/capabilities/strongly-typed.mdx +++ b/fern/pages/sdks/capabilities/strongly-typed.mdx @@ -8,7 +8,7 @@ code editors. Developers will receive compile errors when they forget to specify required fields or attempt to access fields that do not exist. - + TypeScript SDKs are published with type declarations (i.e. `.d.ts` files). This ensures that TypeScript consumers can leverage compile-time safety and intellisense when using the SDK. diff --git a/fern/pages/sdks/introduction/customer-showcase.mdx b/fern/pages/sdks/introduction/customer-showcase.mdx index 12f83130677..91f3662251d 100644 --- a/fern/pages/sdks/introduction/customer-showcase.mdx +++ b/fern/pages/sdks/introduction/customer-showcase.mdx @@ -16,32 +16,32 @@ Square trusts Fern to generate and maintain **7 SDKs**, ensuring their APIs are Check out Square's SDKs as they become generally available: - + View the Go source code in GitHub - + _Coming soon_ - + _Coming soon_ - + _Coming soon_ - + _Coming soon_ - + _Coming soon_ @@ -84,7 +84,7 @@ ElevenLabs uses Fern to generate SDKs with advanced capabilities for **file uplo Check out these features in ElevenLabs' SDKs here: - + View the Python source code in GitHub @@ -94,7 +94,7 @@ Check out these features in ElevenLabs' SDKs here: - + View the TypeScript source code in GitHub @@ -114,14 +114,14 @@ Candid uses Fern to generate an SDK with built in **OAuth support**, enabling se Check out OAuth in Candid's SDK here: - + View the Python source code in GitHub - + View the TypeScript source code in GitHub @@ -153,14 +153,14 @@ Humanloop uses Fern to support **server-sent events (SSE)** in their SDKs, allow Check out SSE in Humanloop's SDK here: - + View the Python source code in GitHub - + View the TypeScript source code in GitHub