diff --git a/fern/products/sdks/overview/typescript/configuration.mdx b/fern/products/sdks/overview/typescript/configuration.mdx index 283f32dd1..4d1b299df 100644 --- a/fern/products/sdks/overview/typescript/configuration.mdx +++ b/fern/products/sdks/overview/typescript/configuration.mdx @@ -13,7 +13,7 @@ groups: - name: fernapi/fern-typescript-sdk version: config: - namespaceExport: Acme + namespaceExport: AcmePayments ``` ## SDK configuration options @@ -258,26 +258,28 @@ await service.getFoo({ pathParamName: "pathParamValue", id: "SOME_ID" }); -By default, names are based on the organization and API names in the Fern Definition: +Customizes the exported namespace and client class names in the generated SDK. Must be in PascalCase. + +By default, names are derived from the organization and API names defined in your API definition: - ```typescript - import { AcmeApi, AcmeApiClient } from "@acme/node"; - ``` +```typescript +import { AcmeApi, AcmeApiClient } from "@acme/node"; +``` - `namespaceExport` customizes the exported namespace and client names: +Setting namespaceExport overrides these default names: - ```yaml - # generators.yml - config: - namespaceExport: Acme - ``` +```yaml title="generators.yml" +config: + namespaceExport: AcmePayments +``` - ```typescript - import { Acme, AcmeClient } from "@acme/node"; - ``` +```typescript +import { AcmePayments, AcmeClient } from "@acme/node"; +``` + When enabled, the client doesn't throw errors when a non-200 response is received from the server. Instead, the response is wrapped in an [`ApiResponse`](https://github.com/fern-api/fern/blob/main/seed/ts-sdk/alias/src/core/fetcher/APIResponse.ts).