Skip to content
Merged
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
30 changes: 16 additions & 14 deletions fern/products/sdks/overview/typescript/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ groups:
- name: fernapi/fern-typescript-sdk
version: <Markdown src="/snippets/version-number-ts.mdx"/>
config:
namespaceExport: Acme
namespaceExport: AcmePayments
```

## SDK configuration options
Expand Down Expand Up @@ -258,26 +258,28 @@ await service.getFoo({ pathParamName: "pathParamValue", id: "SOME_ID" });
</ParamField>

<ParamField path="namespaceExport" type="string" toc={true}>
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";
```

</ParamField>


<ParamField path="neverThrowErrors" type="boolean" default="false" toc={true}>
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).

Expand Down