Skip to content

Commit 56999fa

Browse files
committed
docs: update docs according to the latest changes
1 parent ce3e871 commit 56999fa

6 files changed

+78
-0
lines changed

docs/classes/openapi_client.CommonHttpClientError.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
[openapi-client](../modules/openapi_client.md).CommonHttpClientError
66

7+
Error thrown by the common HTTP client.
8+
79
## Hierarchy
810

911
- `Error`
@@ -49,20 +51,28 @@ Error.constructor
4951

5052
`Readonly` **options**: `undefined` \| [`CommonHttpClientOptions`](../interfaces/openapi_client.CommonHttpClientOptions.md)
5153

54+
Options of the common HTTP client.
55+
5256
___
5357

5458
### request
5559

5660
`Readonly` **request**: `undefined` \| [`CommonHttpClientFetchRequest`](../interfaces/openapi_client.CommonHttpClientFetchRequest.md)
5761

62+
Request that caused the error. Can be undefined in case of failure during request building phase.
63+
5864
___
5965

6066
### response
6167

6268
`Readonly` **response**: `undefined` \| [`CommonHttpClientFetchResponse`](../interfaces/openapi_client.CommonHttpClientFetchResponse.md)
6369

70+
Response that caused the error. Can be undefined in case of network failure.
71+
6472
___
6573

6674
### url
6775

6876
`Readonly` **url**: `URL`
77+
78+
URL of the request.

docs/interfaces/openapi_client.CommonHttpClientFetchRequestHeaders.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
[openapi-client](../modules/openapi_client.md).CommonHttpClientFetchRequestHeaders
66

7+
Request headers as used by the fetch function.
8+
79
## Indexable
810

911
[headerName: `string`]: `string`

docs/interfaces/openapi_client.CommonHttpClientOptions.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
[openapi-client](../modules/openapi_client.md).CommonHttpClientOptions
66

7+
Options for the common HTTP client.
8+
79
## Table of contents
810

911
### Properties
@@ -23,12 +25,16 @@
2325

2426
**baseUrl**: `string`
2527

28+
Base URL for the API. Endpoints are relative to this URL.
29+
2630
___
2731

2832
### binaryResponseType
2933

3034
**binaryResponseType**: ``"blob"`` \| ``"readableStream"``
3135

36+
Type of the response body for binary responses.
37+
3238
___
3339

3440
### errorClass
@@ -39,6 +45,8 @@ ___
3945

4046
**new errorClass**(`url`, `request`, `response`, `options`, `message`)
4147

48+
Error class to be thrown when an error occurs.
49+
4250
##### Parameters
4351

4452
| Name | Type |
@@ -59,6 +67,8 @@ ___
5967

6068
▸ (`url`, `request`): `Promise`\<[`CommonHttpClientFetchResponse`](openapi_client.CommonHttpClientFetchResponse.md)\>
6169

70+
Fetch function. Default is window.fetch-based implementation.
71+
6272
##### Parameters
6373

6474
| Name | Type |
@@ -80,6 +90,8 @@ ___
8090

8191
▸ (`response`, `request`): `string`
8292

93+
Format the HTTP error message.
94+
8395
##### Parameters
8496

8597
| Name | Type |
@@ -97,6 +109,8 @@ ___
97109

98110
`Optional` **headers**: [`CommonHttpClientRequestHeaders`](openapi_client.CommonHttpClientRequestHeaders.md)
99111

112+
Default headers to be sent with each request.
113+
100114
___
101115

102116
### preprocessFetchResponse
@@ -107,6 +121,8 @@ ___
107121

108122
▸ (`response`, `request`): `Promise`\<[`CommonHttpClientFetchResponse`](openapi_client.CommonHttpClientFetchResponse.md)\>
109123

124+
Preprocess the response before returning it.
125+
110126
##### Parameters
111127

112128
| Name | Type |
@@ -128,6 +144,8 @@ ___
128144

129145
▸ (`request`): `Promise`\<[`CommonHttpClientRequest`](../modules/openapi_client.md#commonhttpclientrequest)\>
130146

147+
Preprocess the request before sending it.
148+
131149
##### Parameters
132150

133151
| Name | Type |

docs/interfaces/openapi_client.CommonHttpClientRequestHeaders.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
[openapi-client](../modules/openapi_client.md).CommonHttpClientRequestHeaders
66

7+
A forgiving version of the request headers. Undefined and null values are allowed.
8+
79
## Indexable
810

911
[headerName: `string`]: `string` \| `undefined` \| ``null``

docs/interfaces/openapi_client.OpenApiClientGeneratorConfigCore.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Configuration for the core classes.
1212

1313
- [cleanupFiles](openapi_client.OpenApiClientGeneratorConfigCore.md#cleanupfiles)
1414
- [filenameFormat](openapi_client.OpenApiClientGeneratorConfigCore.md#filenameformat)
15+
- [generateJsDoc](openapi_client.OpenApiClientGeneratorConfigCore.md#generatejsdoc)
1516
- [relativeDirPath](openapi_client.OpenApiClientGeneratorConfigCore.md#relativedirpath)
1617

1718
## Properties
@@ -45,6 +46,14 @@ Filename format for the core classes.
4546

4647
___
4748

49+
### generateJsDoc
50+
51+
`Optional` **generateJsDoc**: [`GenerateCoreJsDoc`](../modules/openapi_client.md#generatecorejsdoc)
52+
53+
JSDoc generation callback for core classes / members.
54+
55+
___
56+
4857
### relativeDirPath
4958

5059
`Optional` **relativeDirPath**: `string`

docs/modules/openapi_client.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
- [CommonHttpClientResponseHeaders](openapi_client.md#commonhttpclientresponseheaders)
3939
- [GenerateClientErrorJsDoc](openapi_client.md#generateclienterrorjsdoc)
4040
- [GenerateClientJsDoc](openapi_client.md#generateclientjsdoc)
41+
- [GenerateCoreJsDoc](openapi_client.md#generatecorejsdoc)
4142
- [GenerateModelJsDoc](openapi_client.md#generatemodeljsdoc)
4243
- [GenerateModelNameCallback](openapi_client.md#generatemodelnamecallback)
4344
- [GenerateOperationJsDoc](openapi_client.md#generateoperationjsdoc)
@@ -146,6 +147,42 @@ function generateClientJsDoc({suggestedJsDoc, info}) {
146147

147148
___
148149

150+
### GenerateCoreJsDoc
151+
152+
Ƭ **GenerateCoreJsDoc**: (`params`: \{ `memberName?`: `string` ; `suggestedJsDoc`: [`JsDocBlock`](../interfaces/index.JsDocBlock.md) ; `typeName`: `string` }) => [`JsDocBlock`](../interfaces/index.JsDocBlock.md)
153+
154+
#### Type declaration
155+
156+
▸ (`params`): [`JsDocBlock`](../interfaces/index.JsDocBlock.md)
157+
158+
Callback for generating the JSDoc for core classes.
159+
160+
##### Parameters
161+
162+
| Name | Type | Description |
163+
| :------ | :------ | :------ |
164+
| `params` | `Object` | - |
165+
| `params.memberName?` | `string` | Name of the member of the core class. Empty if the JSDoc is for the class itself. |
166+
| `params.suggestedJsDoc` | [`JsDocBlock`](../interfaces/index.JsDocBlock.md) | Suggested JSDoc block. Used by default if the callback is not specified. |
167+
| `params.typeName` | `string` | Name of the core class. |
168+
169+
##### Returns
170+
171+
[`JsDocBlock`](../interfaces/index.JsDocBlock.md)
172+
173+
**`Example`**
174+
175+
```ts
176+
function GenerateCoreJsDoc({suggestedJsDoc}) {
177+
return {
178+
...suggestedJsDoc,
179+
tags: [...suggestedJsDoc.tags, {name: 'internal'}]
180+
};
181+
}
182+
```
183+
184+
___
185+
149186
### GenerateModelJsDoc
150187

151188
Ƭ **GenerateModelJsDoc**: (`params`: \{ `fieldPath`: `string`[] ; `schema`: [`OpenApiSchema`](openapi.md#openapischema) ; `schemaName`: `string` ; `suggestedJsDoc`: [`JsDocBlock`](../interfaces/index.JsDocBlock.md) }) => [`JsDocBlock`](../interfaces/index.JsDocBlock.md)

0 commit comments

Comments
 (0)