Skip to content

Commit 0c08b99

Browse files
authored
chore: make config options linkable (#135)
1 parent 3947277 commit 0c08b99

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

fern/products/sdks/overview/typescript/configuration.mdx

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,28 @@ groups:
1818
1919
## SDK configuration options
2020
21-
<ParamField path="outputSourceFiles" type="boolean" default="true">
21+
<ParamField path="outputSourceFiles" type="boolean" default="true" toc={true}>
2222
When enabled, the generator outputs raw TypeScript files. When disabled (the default), outputs `.js` and `d.ts` files.
2323

2424
<Note>This only applies when dumping code locally. This configuration is ignored when publishing to Github or npm.</Note>
2525
</ParamField>
2626

27-
<ParamField path="includeCredentialsOnCrossOriginRequests" type="boolean" default="false">
27+
<ParamField path="includeCredentialsOnCrossOriginRequests" type="boolean" default="false" toc={true}>
2828
When enabled, [`withCredentials`](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials) is set to `true` when making network requests.
2929
</ParamField>
3030

31-
<ParamField path="bundle" type="boolean">
31+
<ParamField path="bundle" type="boolean" toc={true}>
3232
</ParamField>
3333

34-
<ParamField path="shouldGenerateWebsocketClients" type="boolean">
34+
<ParamField path="shouldGenerateWebsocketClients" type="boolean" toc={true}>
3535
Generate WebSocket clients from your AsyncAPI specs.
3636
</ParamField>
3737

38-
<ParamField path="defaultTimeoutInSeconds" type="number | 'infinity'">
38+
<ParamField path="defaultTimeoutInSeconds" type="number | 'infinity'" toc={true}>
3939
The default timeout for network requests. In the generated client, this can be overridden at the request level.
4040
</ParamField>
4141

42-
<ParamField path="skipResponseValidation" type="boolean" default="false">
42+
<ParamField path="skipResponseValidation" type="boolean" default="false" toc={true}>
4343
By default, the client will throw an error if the response from the server
4444
doesn't match the expected type (based on how the response is modeled in the
4545
Fern Definition).
@@ -50,7 +50,7 @@ If `skipResponseValidation` is set to `true`, the client will never throw if the
5050

5151
</ParamField>
5252

53-
<ParamField path="extraDependencies" type="object" default="{}">
53+
<ParamField path="extraDependencies" type="object" default="{}" toc={true}>
5454
Specify extra dependencies in the generated `package.json`. This is useful
5555
when you utilize [`.fernignore`](https://buildwithfern.com/learn/sdks/capabilities/custom-code) to
5656
supplement the generated client with custom code.
@@ -64,7 +64,7 @@ config:
6464

6565
</ParamField>
6666

67-
<ParamField path="extraDevDependencies" type="object" default="{}">
67+
<ParamField path="extraDevDependencies" type="object" default="{}" toc={true}>
6868
Specify extra dev dependencies in the generated `package.json`.
6969

7070
```yaml
@@ -77,7 +77,7 @@ config:
7777
<Note>Only applies when publishing to Github.</Note>
7878
</ParamField>
7979

80-
<ParamField path="extraPeerDependencies" type="object">
80+
<ParamField path="extraPeerDependencies" type="object" toc={true}>
8181
Specify extra peer dependencies in the generated `package.json`:
8282

8383
```yaml
@@ -89,7 +89,7 @@ config:
8989
```
9090
</ParamField>
9191

92-
<ParamField path="extraPeerDependenciesMeta" type="object">
92+
<ParamField path="extraPeerDependenciesMeta" type="object" toc={true}>
9393
Specify extra peer dependencies meta fields in the generated `package.json`:
9494

9595
```yaml
@@ -101,11 +101,11 @@ config:
101101
```
102102
</ParamField>
103103

104-
<ParamField path="treatUnknownAsAny" type="boolean" default="false">
104+
<ParamField path="treatUnknownAsAny" type="boolean" default="false" toc={true}>
105105
When `treatUnknownAsAny` is enabled, [unknown types from Fern are generated into TypeScript using `any` instead of the `unknown` type](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-0.html#new-unknown-top-type).
106106
</ParamField>
107107

108-
<ParamField path="noOptionalProperties" type="boolean" default="false">
108+
<ParamField path="noOptionalProperties" type="boolean" default="false" toc={true}>
109109
By default, Fern's `optional<>` properties will translate to optional TypeScript properties:
110110

111111
```yaml {4}
@@ -132,7 +132,7 @@ config:
132132
```
133133
</ParamField>
134134

135-
<ParamField path="packageJson" type="object">
135+
<ParamField path="packageJson" type="object" toc={true}>
136136
When you specify an object in `packageJson`, it will be merged into the `package.json` file.
137137

138138
```yaml
@@ -150,12 +150,12 @@ config:
150150
```
151151
</ParamField>
152152

153-
<ParamField path="publishToJsr" type="boolean">
153+
<ParamField path="publishToJsr" type="boolean" toc={true}>
154154
Publish your SDK to [JSR](https://jsr.io/). When enabled, the generator will
155155
generate a `jsr.json` as well as a GitHub workflow to publish to JSR.
156156
</ParamField>
157157

158-
<ParamField path="streamType" type="'wrapper' | 'web'">
158+
<ParamField path="streamType" type="'wrapper' | 'web'" toc={true}>
159159
Change the type of stream that is used in the generated SDK.
160160

161161
* `wrapper`: The streams use a wrapper with multiple underlying implementations to support versions of Node.js before Node.js 18.
@@ -164,7 +164,7 @@ Change the type of stream that is used in the generated SDK.
164164
The default is `web`.
165165
</ParamField>
166166

167-
<ParamField path="fileResponseType" type="'stream' | 'binary-response'">
167+
<ParamField path="fileResponseType" type="'stream' | 'binary-response'" toc={true}>
168168
Change the type of response returned to the user for a binary HTTP response:
169169

170170
* `stream`: Returns a stream. See `streamType`, which controls the type of stream returned.
@@ -181,25 +181,25 @@ const bodyUsed = response.bodyUsed;
181181
```
182182
</ParamField>
183183

184-
<ParamField path="formDataSupport" type="'Node16' | 'Node18'">
184+
<ParamField path="formDataSupport" type="'Node16' | 'Node18'" toc={true}>
185185
Choose whether you want to support Node.js 16 and above (`Node16`), or Node.js 18 and above (`Node18`).
186186

187187
* `Node16` uses multiple dependencies to support multipart forms, including `form-data`, `formdata-node`, and `form-data-encoder`.
188188
* `Node18` uses the native FormData API, and accepts a wider range of types for file uploads, such as `Buffer`, `File`, `Blob`, `Readable`, `ReadableStream`, `ArrayBuffer`, and `Uint8Array`
189189
</ParamField>
190-
<ParamField path="fetchSupport" type="'node-fetch' | 'native'">
190+
<ParamField path="fetchSupport" type="'node-fetch' | 'native'" toc={true}>
191191
Choose whether you want to include `node-fetch` to support Node.js versions before Node.js 18, or choose `native` to use the native `fetch` API available in Node.js 18 and later.
192192
</ParamField>
193193

194-
<ParamField path="packagePath" type="string">
194+
<ParamField path="packagePath" type="string" toc={true}>
195195
Specify the path where the source files for the generated SDK should be placed.
196196
</ParamField>
197197

198-
<ParamField path="allowExtraFields" type="boolean">
198+
<ParamField path="allowExtraFields" type="boolean" toc={true}>
199199
Allow fields that are not defined in object schemas. This only applies to serde.
200200
</ParamField>
201201

202-
<ParamField path="enableInlineTypes" type="boolean" default="true">
202+
<ParamField path="enableInlineTypes" type="boolean" default="true" toc={true}>
203203
When enabled, the inline schemas will be generated as nested types in TypeScript.
204204
This results in cleaner type names and a more intuitive developer experience.
205205

@@ -255,7 +255,7 @@ const bar: MyRootType.Foo.Bar = {};
255255
```
256256
</ParamField>
257257

258-
<ParamField path="inlineFileProperties" type="boolean" default="true">
258+
<ParamField path="inlineFileProperties" type="boolean" default="true" toc={true}>
259259
Generate file upload properties as inline request properties (instead of positional parameters).
260260

261261
`inlineFileProperties: false`:
@@ -307,7 +307,7 @@ public async post(
307307

308308
</ParamField>
309309

310-
<ParamField path="inlinePathParameters" type="boolean" default="true">
310+
<ParamField path="inlinePathParameters" type="boolean" default="true" toc={true}>
311311
Inline path parameters into request types.
312312

313313
`inlinePathParameters: false`:
@@ -323,7 +323,7 @@ await service.getFoo({ pathParamName: "pathParamValue", id: "SOME_ID" });
323323

324324
</ParamField>
325325

326-
<ParamField path="namespaceExport" type="string">
326+
<ParamField path="namespaceExport" type="string" toc={true}>
327327
By default, names are based on the organization and API names in the Fern Definition:
328328

329329
```typescript
@@ -344,7 +344,7 @@ By default, names are based on the organization and API names in the Fern Defini
344344

345345
</ParamField>
346346

347-
<ParamField path="noSerdeLayer" type="boolean" default="true">
347+
<ParamField path="noSerdeLayer" type="boolean" default="true" toc={true}>
348348

349349
No serialization/deserialization code is generated by default. The client uses `JSON.parse()` and `JSON.stringify()` instead of the default Serde layer.
350350

@@ -359,7 +359,7 @@ No serialization/deserialization code is generated by default. The client uses `
359359

360360
</ParamField>
361361

362-
<ParamField path="retainOriginalCasing" type="boolean" default="false">
362+
<ParamField path="retainOriginalCasing" type="boolean" default="false" toc={true}>
363363
When enabled, property names in the generated code retain their original casing from the API definition instead of being converted to camelCase.
364364

365365
```yaml
@@ -400,7 +400,7 @@ No serialization/deserialization code is generated by default. The client uses `
400400

401401
</ParamField>
402402

403-
<ParamField path="useBigInt" type="boolean" default="false">
403+
<ParamField path="useBigInt" type="boolean" default="false" toc={true}>
404404
When `useBigInt` is set to `true`, a customized JSON serializer & deserializer is used that will preserve the precision of `bigint`'s, as opposed to the native `JSON.stringify` and `JSON.parse` function which converts `bigint`'s to number's losing precision.
405405

406406
When combining `useBigInt` with our serialization layer (`no-serde: false`), both the request and response properties that are marked as `long` and `bigint` in OpenAPI/Fern spec, will consistently be `bigint`'s.
@@ -451,7 +451,7 @@ interface ObjectWithLongAndBigInt {
451451
```
452452
</ParamField>
453453

454-
<ParamField path="useBrandedStringAliases" type="boolean" default="false">
454+
<ParamField path="useBrandedStringAliases" type="boolean" default="false" toc={true}>
455455

456456
When `useBrandedStringAliases` is disabled (the default), string aliases are generated as
457457
normal TypeScript aliases:
@@ -504,7 +504,7 @@ interface ObjectWithLongAndBigInt {
504504

505505
</ParamField>
506506

507-
<ParamField path="neverThrowErrors" type="boolean" default="false">
507+
<ParamField path="neverThrowErrors" type="boolean" default="false" toc={true}>
508508
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`](packages/core-utilities/fetcher/src/APIResponse.ts).
509509

510510
```typescript
@@ -519,7 +519,7 @@ interface ObjectWithLongAndBigInt {
519519

520520
### Beta options
521521

522-
<ParamField path="includeContentHeadersOnFileDownloadResponse" type="boolean">
522+
<ParamField path="includeContentHeadersOnFileDownloadResponse" type="boolean" toc={true}>
523523

524524
Includes the content type and content length from binary responses. The user will receive an object of the following type:
525525

@@ -534,13 +534,13 @@ Includes the content type and content length from binary responses. The user wil
534534
`<BINARY_RESPONSE_TYPE>` is `core.BinaryResponse` or a stream, depending on `fileResponseType` setting.
535535
</ParamField>
536536

537-
<ParamField path="includeUtilsOnUnionMembers" type="boolean">
537+
<ParamField path="includeUtilsOnUnionMembers" type="boolean" toc={true}>
538538
</ParamField>
539539

540-
<ParamField path="includeOtherInUnionTypes" type="boolean">
540+
<ParamField path="includeOtherInUnionTypes" type="boolean" toc={true}>
541541
</ParamField>
542542

543-
<ParamField path="noScripts" type="boolean">
543+
<ParamField path="noScripts" type="boolean" toc={true}>
544544
Prevent the generator from running any scripts such as `yarn format` or `yarn install`. If any of the scripts cause errors, toggling this option will allow you to receive the generated code.
545545
</ParamField>
546546

0 commit comments

Comments
 (0)