openapi-typesafe-fetch 1.0.0-rc.1 → 1.0.0-rc.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,920 @@
1
+ # openapi-typesafe-fetch
2
+
3
+ This package is a fork of `openapi-fetch`. The entries above `0.17.0` are releases of openapi-typesafe-fetch; `0.17.0` and the entries below it are the upstream history up to the fork point (upstream commit `d46a319a`), with `openapi-fetch` versions.
4
+
5
+ ## 1.0.0-rc.11
6
+
7
+ ### Patch Changes
8
+
9
+ - [#128](https://github.com/openapi-typesafe/openapi-typesafe/pull/128) [`fad3163`](https://github.com/openapi-typesafe/openapi-typesafe/commit/fad31635ed28508082d59c2e0a3ba6e881b20d02) Thanks [@fedorello](https://github.com/fedorello)! - A `json` inside the parameters of a media type no longer makes it a JSON media type in the types,
10
+ as at runtime: an error declared as `text/plain; profile=urn:a+json` or
11
+ `message/http; msgtype=application/json` is typed as the text (`string`) the client returns, and
12
+ `JSONLike`, `RequestBodyJSON`, `SuccessResponseJSON` and `ErrorResponseJSON` leave such media
13
+ types out. Only the media type before the `;` counts, for media ranges (`text/*`) too.
14
+
15
+ - [#128](https://github.com/openapi-typesafe/openapi-typesafe/pull/128) [`fad3163`](https://github.com/openapi-typesafe/openapi-typesafe/commit/fad31635ed28508082d59c2e0a3ba6e881b20d02) Thanks [@fedorello](https://github.com/fedorello)! - An optional `parseAs` with only some values, such as a wrapper's `options: { parseAs?: "text" }`
16
+ passed to `client.GET()`, types `data` as the body of each value or the JSON body (`string | T`),
17
+ as the client returns it. Before, it was typed as the JSON body only. Options whose `parseAs` may
18
+ be any value, or that have none, still type `data` as the JSON body. With and without
19
+ `exactOptionalPropertyTypes`.
20
+
21
+ - [#128](https://github.com/openapi-typesafe/openapi-typesafe/pull/128) [`fad3163`](https://github.com/openapi-typesafe/openapi-typesafe/commit/fad31635ed28508082d59c2e0a3ba6e881b20d02) Thanks [@fedorello](https://github.com/fedorello)! - `client.request(method, path, { parseAs })` types `data` by `parseAs`, as `client.GET()` and the
22
+ other method calls do: `{ parseAs: "text" }` gives a `string`, `"stream"` the body stream. Before,
23
+ `data` was always the JSON body. A literal in `params` or `body` next to `parseAs`, such as an
24
+ enum value, no longer loses the `parseAs` type either.
25
+
26
+ ## 1.0.0-rc.10
27
+
28
+ ### Patch Changes
29
+
30
+ - [#120](https://github.com/openapi-typesafe/openapi-typesafe/pull/120) [`e635904`](https://github.com/openapi-typesafe/openapi-typesafe/commit/e6359045a637d6edd0addf58b6703aabb2f3fceb) Thanks [@fedorello](https://github.com/fedorello)! - The `error` type now follows the media type of each error response, as the client reads it. An
31
+ error with a non-JSON media type, such as `text/plain`, is a `string` whatever its schema: a
32
+ `text/plain` error with an `integer` or `boolean` schema was typed as a number or a boolean, but
33
+ the client returns its text. An error with a media range such as `*/*`, `application/*` or
34
+ `text/*`, which may be JSON or not, is its schema or a `string`. `SuccessResponseJSON` and
35
+ `JSONLike` now count `text/*` as JSON too, like `application/*`. JSON errors keep their schemas, and success `data` is unchanged.
36
+
37
+ - [#120](https://github.com/openapi-typesafe/openapi-typesafe/pull/120) [`e635904`](https://github.com/openapi-typesafe/openapi-typesafe/commit/e6359045a637d6edd0addf58b6703aabb2f3fceb) Thanks [@fedorello](https://github.com/fedorello)! - A `parseAs` typed as a union with `undefined`, such as `"text" | undefined` passed on by a wrapper,
38
+ now types `data` as both bodies (`string` or the JSON body). It gave the JSON body only, while the
39
+ client reads the body as text when `parseAs` is `"text"`. `undefined` stays the default `"json"`.
40
+
41
+ ## 1.0.0-rc.9
42
+
43
+ ### Patch Changes
44
+
45
+ - [#112](https://github.com/openapi-typesafe/openapi-typesafe/pull/112) [`05886b5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/05886b5b8fdbb832f58abd12b9f8c741b0c73ad2) Thanks [@fedorello](https://github.com/fedorello)! - An error body is parsed as JSON only when its `Content-Type` is a JSON media type (`json` or a
46
+ `+json` suffix), or when the response has no `Content-Type` and the body is JSON. Any other error
47
+ body, such as `text/plain` or HTML, is returned as text, as its `string` type says. A `text/plain`
48
+ error body `429`, `true`, `0` or `null` came back as a number, a boolean or `null`, and with `0`
49
+ or `null` the check `if (error)` was skipped. openapi-fetch parses every error body, so this
50
+ differs from it.
51
+
52
+ - [#112](https://github.com/openapi-typesafe/openapi-typesafe/pull/112) [`05886b5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/05886b5b8fdbb832f58abd12b9f8c741b0c73ad2) Thanks [@fedorello](https://github.com/fedorello)! - Code that is generic in the path compiles again. `SuccessResponse`, `ErrorResponse`,
53
+ `ErrorResponseJSON` and the `data` and `error` of `FetchResponse` for `Paths[Path]` gave the whole
54
+ `responses` map next to the response bodies, so assigning them to the bodies failed with TS2322.
55
+ They give the bodies now. This also fixes the error type of hook wrappers generic in the path.
56
+
57
+ - [#112](https://github.com/openapi-typesafe/openapi-typesafe/pull/112) [`05886b5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/05886b5b8fdbb832f58abd12b9f8c741b0c73ad2) Thanks [@fedorello](https://github.com/fedorello)! - Every optional option of `createClient()` and of a request accepts `undefined` in its type, not
58
+ only the members of `querySerializer`: `baseUrl`, `fetch`, `Request`, `FormData`,
59
+ `querySerializer`, `bodySerializer`, `pathSerializer`, `headers`, `requestInitExt`, `parseAs`,
60
+ `middleware` and `params`. The client already counted `undefined` as left out, so a wrapper that
61
+ passes its own optional options on now compiles with `exactOptionalPropertyTypes`.
62
+
63
+ ## 1.0.0-rc.8
64
+
65
+ ### Patch Changes
66
+
67
+ - [#103](https://github.com/openapi-typesafe/openapi-typesafe/pull/103) [`091b864`](https://github.com/openapi-typesafe/openapi-typesafe/commit/091b864cdb6dd9e1ff5810d4d44cebee8a01a721) Thanks [@fedorello](https://github.com/fedorello)! - `createClient<any>()` types `data` and `error` as `any` again; they were `never`, so
68
+ `if (error)` made the whole result `never`. `SuccessResponse<any>` and `ErrorResponse<any>` are
69
+ `any` too.
70
+
71
+ - [#103](https://github.com/openapi-typesafe/openapi-typesafe/pull/103) [`091b864`](https://github.com/openapi-typesafe/openapi-typesafe/commit/091b864cdb6dd9e1ff5810d4d44cebee8a01a721) Thanks [@fedorello](https://github.com/fedorello)! - Response types follow what the client returns. `ErrorResponseJSON`, `SuccessResponseJSON` and the
72
+ `data` and `error` of a client made with ``createClient<paths, `${string}/json`>()`` keep a
73
+ JSON body of any JSON media type: an `application/problem+json` error, an
74
+ `application/vnd.api+json` success and `application/json; charset=utf-8` bodies were left out,
75
+ so the error could be `never` or miss a status. An error that is not JSON, such as the HTML page
76
+ of a proxy, is typed `string`, the text the client returns, instead of being left out.
77
+
78
+ - [#103](https://github.com/openapi-typesafe/openapi-typesafe/pull/103) [`091b864`](https://github.com/openapi-typesafe/openapi-typesafe/commit/091b864cdb6dd9e1ff5810d4d44cebee8a01a721) Thanks [@fedorello](https://github.com/fedorello)! - Every `querySerializer` option accepts `undefined` in its type, so a wrapper that passes its own
79
+ optional option on (`{ array: { explode: options.explode } }`) compiles with
80
+ `exactOptionalPropertyTypes`.
81
+
82
+ - [#103](https://github.com/openapi-typesafe/openapi-typesafe/pull/103) [`091b864`](https://github.com/openapi-typesafe/openapi-typesafe/commit/091b864cdb6dd9e1ff5810d4d44cebee8a01a721) Thanks [@fedorello](https://github.com/fedorello)! - `serializeArrayParam` and `serializeObjectParam` with a nested value in a path style (`simple`,
83
+ `label`, `matrix`) name `pathSerializer()` in their error, also inside your own `pathSerializer`,
84
+ instead of `querySerializer()`.
85
+
86
+ ## 1.0.0-rc.7
87
+
88
+ ### Patch Changes
89
+
90
+ - [#96](https://github.com/openapi-typesafe/openapi-typesafe/pull/96) [`171fa71`](https://github.com/openapi-typesafe/openapi-typesafe/commit/171fa71311107e4e26a9ae7a62b431662fb13de5) Thanks [@fedorello](https://github.com/fedorello)! - `SuccessResponseJSON`, `ErrorResponseJSON` and the `data` and `error` of a client made with
91
+ ``createClient<paths, `${string}/json`>()`` leave out a response that has no JSON media type. It
92
+ added its whole `content` map, so a `text/html` 500 typed the error as `{ "text/html": string }`,
93
+ a value the client never returns.
94
+
95
+ - [#96](https://github.com/openapi-typesafe/openapi-typesafe/pull/96) [`171fa71`](https://github.com/openapi-typesafe/openapi-typesafe/commit/171fa71311107e4e26a9ae7a62b431662fb13de5) Thanks [@fedorello](https://github.com/fedorello)! - A nested array or object in a path parameter (`{ id: [[1]] }`) now fails with an error that names
96
+ `pathSerializer()`, the option that sends such values. It told you to write a `querySerializer()`,
97
+ which does not apply to the path.
98
+
99
+ - [#96](https://github.com/openapi-typesafe/openapi-typesafe/pull/96) [`171fa71`](https://github.com/openapi-typesafe/openapi-typesafe/commit/171fa71311107e4e26a9ae7a62b431662fb13de5) Thanks [@fedorello](https://github.com/fedorello)! - A request's `querySerializer` option set to `undefined` (`{ array: { explode: undefined } }`, as a
100
+ wrapper passes its own optional option on) now takes the client's value, as an option left out
101
+ does. It replaced the client's value, so the default style was sent.
102
+
103
+ ## 1.0.0-rc.6
104
+
105
+ ### Patch Changes
106
+
107
+ - [#87](https://github.com/openapi-typesafe/openapi-typesafe/pull/87) [`dfb0fe3`](https://github.com/openapi-typesafe/openapi-typesafe/commit/dfb0fe3c61a75d2b8ca512577f4b699049171a64) Thanks [@fedorello](https://github.com/fedorello)! - Leave out `null` and `undefined` items and members of arrays and objects in every parameter style, also in the path and headers (`ids=1,null`, `filter=owner,undefined` and `x-p: a,,b,1` were sent before), and default `explode` to `true` for the `form` query style only, as OpenAPI does, so `{ array: { style: "pipeDelimited" } }` sends `id=3|4|5`. A nested value in a header parameter now fails with an error that names header parameters, not `querySerializer()`.
108
+
109
+ ## 1.0.0-rc.5
110
+
111
+ ### Minor Changes
112
+
113
+ - [#68](https://github.com/openapi-typesafe/openapi-typesafe/pull/68) [`0f0792b`](https://github.com/openapi-typesafe/openapi-typesafe/commit/0f0792b8efa4f5139653cd285455f7d6165ddb95) Thanks [@fedorello](https://github.com/fedorello)! - A `FormData`, `Blob`, `File` or `ReadableStream` body from `undici` or another realm (an iframe) is
114
+ sent as it is: the client told a body by `instanceof`, so it JSON-encoded one of another class as
115
+ `{}`. `createClient` takes a `FormData` class next to `Request`: a multipart body is built with it,
116
+ and a FormData body of another class is copied into one of it, since undici's `Request` read the
117
+ platform's FormData as the text `[object FormData]`. With undici, pass
118
+ `createClient({ fetch, Request, FormData })` from the package. An instance of the platform's own
119
+ global class is still sent as it is, so the FormData, Blob and URLSearchParams of React Native and
120
+ the Blob and File of jsdom 20 (Jest 29), which have no type tag or no `arrayBuffer`, keep working.
121
+
122
+ - [#67](https://github.com/openapi-typesafe/openapi-typesafe/pull/67) [`fbaded2`](https://github.com/openapi-typesafe/openapi-typesafe/commit/fbaded241385d032d5b28d2c93d5e0a7d6ae292b) Thanks [@fedorello](https://github.com/fedorello)! - The client has a read-only `baseUrl`: the `baseUrl` option without its trailing slash, or `""`.
123
+
124
+ ### Patch Changes
125
+
126
+ - [#68](https://github.com/openapi-typesafe/openapi-typesafe/pull/68) [`0f0792b`](https://github.com/openapi-typesafe/openapi-typesafe/commit/0f0792b8efa4f5139653cd285455f7d6165ddb95) Thanks [@fedorello](https://github.com/fedorello)! - An empty success body read with `parseAs: "text"`, `"blob"`, `"arrayBuffer"` or `"stream"` gives
127
+ `""`, an empty `Blob` or `ArrayBuffer`, or `response.body`, as its type says. A 204, an answer to
128
+ HEAD or a `Content-Length: 0` gave `undefined`, while the same empty body without a length gave
129
+ `""`. With the default `parseAs: "json"` an empty body is still `undefined`.
130
+
131
+ - [#68](https://github.com/openapi-typesafe/openapi-typesafe/pull/68) [`0f0792b`](https://github.com/openapi-typesafe/openapi-typesafe/commit/0f0792b8efa4f5139653cd285455f7d6165ddb95) Thanks [@fedorello](https://github.com/fedorello)! - `params.header` values are written in the `simple` style, the only style OpenAPI has for headers:
132
+ a `Date` as ISO 8601 (it was local time), an array as `a,b` (it was `a, b`) and an object as
133
+ `role,admin` (it was `[object Object]`), not percent-encoded, also in the names. A nested object or
134
+ array inside one throws, as in the query. An empty array or object sends no header, and `null`
135
+ still removes one.
136
+
137
+ - [#68](https://github.com/openapi-typesafe/openapi-typesafe/pull/68) [`0f0792b`](https://github.com/openapi-typesafe/openapi-typesafe/commit/0f0792b8efa4f5139653cd285455f7d6165ddb95) Thanks [@fedorello](https://github.com/fedorello)! - A form or multipart `Content-Type` with spaces or tabs before its parameters
138
+ (`application/x-www-form-urlencoded ; charset=utf-8`, RFC 9110 OWS) gives form data or `FormData`
139
+ again, in the runtime and in the result type of `defaultBodySerializer`; the object was sent as
140
+ JSON. The JSON check already took them.
141
+
142
+ - [#68](https://github.com/openapi-typesafe/openapi-typesafe/pull/68) [`0f0792b`](https://github.com/openapi-typesafe/openapi-typesafe/commit/0f0792b8efa4f5139653cd285455f7d6165ddb95) Thanks [@fedorello](https://github.com/fedorello)! - `style` and `explode` of the `array` and `object` options of `QuerySerializerOptions` are optional,
143
+ and one left out takes the client's value, else its default (`form` or `deepObject`, exploded): a
144
+ request's `{ array: { explode: false } }` keeps the client's `style`. `onError` may return an
145
+ `Error` of another realm (an iframe, `node:vm`); it was rejected as not an error.
146
+
147
+ - [#68](https://github.com/openapi-typesafe/openapi-typesafe/pull/68) [`0f0792b`](https://github.com/openapi-typesafe/openapi-typesafe/commit/0f0792b8efa4f5139653cd285455f7d6165ddb95) Thanks [@fedorello](https://github.com/fedorello)! - The query of a request whose path template has a fragment (`/docs#intro`) goes before the
148
+ fragment, joined with a query the template already has. It was added after the `#`, where it is
149
+ part of the fragment, so `fetch` never sent it.
150
+
151
+ - [#75](https://github.com/openapi-typesafe/openapi-typesafe/pull/75) [`a74608e`](https://github.com/openapi-typesafe/openapi-typesafe/commit/a74608ec36b0a938594e0d0fac10c9fb222c1742) Thanks [@fedorello](https://github.com/fedorello)! - `Readable` and `Writable` find the `$Read` and `$Write` properties of an object with an index
152
+ signature (`additionalProperties`). The keys were read through the index signature, so no
153
+ property was marked: a request body required the `readOnly` `id`, and a response kept the
154
+ `writeOnly` password. The helper types that `--read-write-markers` writes are fixed the same way.
155
+
156
+ - [#68](https://github.com/openapi-typesafe/openapi-typesafe/pull/68) [`0f0792b`](https://github.com/openapi-typesafe/openapi-typesafe/commit/0f0792b8efa4f5139653cd285455f7d6165ddb95) Thanks [@fedorello](https://github.com/fedorello)! - A response is typed as data or an error by the first digit of its status, as `response.ok` reads
157
+ it: a declared 205, 208 or 226 types `data` with its body, and a 419, a 3XX (read with
158
+ `redirect: "manual"`) or a 1XX types `error` with its body.
159
+ The types classified by two closed lists of statuses, `OkStatus` and `ErrorStatus`, which stay
160
+ exported. New helper types `SuccessStatusKey` and `ErrorStatusKey` name the statuses of each kind.
161
+
162
+ ## 1.0.0-rc.4
163
+
164
+ ### Minor Changes
165
+
166
+ - [#48](https://github.com/openapi-typesafe/openapi-typesafe/pull/48) [`cff72cd`](https://github.com/openapi-typesafe/openapi-typesafe/commit/cff72cd19bf7a68429f302e0ece79304fcb6ba5c) Thanks [@fedorello](https://github.com/fedorello)! - The client declares the helper types (`PathsWithMethod`, `FilterKeys`, `SuccessResponse`, …) in
167
+ its `openapi-typesafe-fetch/helpers` entry, and `openapi-typesafe-helpers` re-exports them. The
168
+ names of both packages are one declaration, so they mix, also in generic code: `Readable<T>` of one
169
+ package fits `Readable<T>` of the other. A library built with `declaration: true` under pnpm or
170
+ Yarn PnP that uses the client gets declarations that name `openapi-typesafe-fetch/helpers`, of a
171
+ package it depends on, under every `moduleResolution` (also `node10`): no TS2742 ("cannot be
172
+ named without a reference to …/openapi-typesafe-helpers") under pnpm, and no `import("openapi-typesafe-helpers")` that its users
173
+ cannot resolve under Yarn PnP. openapi-fetch fails the same way. The main entry exports the names
174
+ of openapi-fetch and no helper type, so `export type * from "openapi-typesafe-fetch"` next to a
175
+ type of the same name still compiles. The client no longer depends on `openapi-typesafe-helpers`,
176
+ so it has no runtime dependency.
177
+
178
+ ### Patch Changes
179
+
180
+ - [#40](https://github.com/openapi-typesafe/openapi-typesafe/pull/40) [`bc4d41d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/bc4d41d870d13fdb5eb1303744e5235308cdc2bb) Thanks [@fedorello](https://github.com/fedorello)! - A `Date` in an exploded query array or object (the default styles) is sent as ISO 8601
181
+ (`toISOString()`); openapi-fetch threw "Deeply-nested arrays/objects aren't supported". A `Date`
182
+ field of a `multipart/form-data` body is sent as ISO 8601 too. The places where openapi-fetch left
183
+ a `Date` out or sent it as a local time text are listed under Major Changes.
184
+
185
+ - [#47](https://github.com/openapi-typesafe/openapi-typesafe/pull/47) [`1c8af0d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/1c8af0dc371ae8be5b595b055ee1ebc53916088f) Thanks [@fedorello](https://github.com/fedorello)! - `randomID`, exported at runtime as in openapi-fetch, is declared (`randomID(): string`) and listed
186
+ in the API docs, so TypeScript code can import it.
187
+
188
+ - [#61](https://github.com/openapi-typesafe/openapi-typesafe/pull/61) [`2afc816`](https://github.com/openapi-typesafe/openapi-typesafe/commit/2afc816881dab23d3dd8fe4d1a2d20456dd917f8) Thanks [@fedorello](https://github.com/fedorello)! - A `FormData` that `defaultBodySerializer` built gets the platform's boundary also when another
189
+ copy of the package built it, such as the CommonJS build next to the ES module build in one
190
+ application. A `bodySerializer` that wrapped the default one of the other build kept a boundary
191
+ set by hand, and the server could not split the parts. The form is marked with the registered
192
+ symbol `Symbol.for("openapi-typesafe-fetch/form")`, which is not a form field.
193
+
194
+ - [#40](https://github.com/openapi-typesafe/openapi-typesafe/pull/40) [`bc4d41d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/bc4d41d870d13fdb5eb1303744e5235308cdc2bb) Thanks [@fedorello](https://github.com/fedorello)! - A success body that is not JSON, such as the HTML page of a proxy, throws a `SyntaxError` that
195
+ names the status, the `Content-Type` and the length of the body and says which `parseAs` to set
196
+ (`parseAs: "text"` for a `text/*` response), instead of a bare parser error. The error holds no
197
+ body text, which can be a secret such as an OAuth token: the parser's error, whose message quotes
198
+ the body, is not kept as `cause` either.
199
+
200
+ - [#47](https://github.com/openapi-typesafe/openapi-typesafe/pull/47) [`1c8af0d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/1c8af0dc371ae8be5b595b055ee1ebc53916088f) Thanks [@fedorello](https://github.com/fedorello)! - A `ReadableStream` body, or an async iterable such as a Node.js `Readable`
201
+ (`fs.createReadStream()`), is sent as a stream, with the `duplex: "half"` option that the Fetch
202
+ standard requires for it. It was JSON-encoded (to `{}`, or to the internal fields of a `Readable`)
203
+ with a JSON `Content-Type`, so a streamed upload was lost without an error.
204
+ The declarations name the async iterable type with `/// <reference lib="es2018.asynciterable" />`,
205
+ so a project whose `lib` is older than ES2018 still compiles.
206
+
207
+ - [#48](https://github.com/openapi-typesafe/openapi-typesafe/pull/48) [`cff72cd`](https://github.com/openapi-typesafe/openapi-typesafe/commit/cff72cd19bf7a68429f302e0ece79304fcb6ba5c) Thanks [@fedorello](https://github.com/fedorello)! - A call with a union of paths (`client.GET(path)` with `path: "/a" | "/b"`) types `data` and
208
+ `error` as the union of each operation's types. In openapi-fetch a path without a response body
209
+ typed `data` as its content map, and a path with only a `default` response typed it `undefined`.
210
+ `SuccessResponse` and `ErrorResponse` of a union of response maps are the union of each map's
211
+ responses.
212
+
213
+ ## 1.0.0-rc.3
214
+
215
+ ### Patch Changes
216
+
217
+ - Updated dependencies []:
218
+ - openapi-typesafe-helpers@1.0.0-rc.3
219
+
220
+ ## 1.0.0-rc.2
221
+
222
+ ### Major Changes
223
+
224
+ - [#18](https://github.com/openapi-typesafe/openapi-typesafe/pull/18) [`bfd3e60`](https://github.com/openapi-typesafe/openapi-typesafe/commit/bfd3e605bdbe240d7a8a327a59d8924781016fbd) Thanks [@fedorello](https://github.com/fedorello)! - First stable release of openapi-typesafe-fetch, the successor of openapi-fetch 0.17 with the same
225
+ API: change the import from `openapi-fetch`. A library that imports `openapi-fetch` itself, such as
226
+ swr-openapi, needs it aliased to this package
227
+ ([how](https://openapi-typesafe.github.io/openapi-typesafe/fetch/#libraries-built-on-openapi-fetch)). From 1.0 the package follows semver.
228
+
229
+ Changes that can need work when you move from openapi-fetch 0.17:
230
+ - `engines.node` is `>=22` (server code; browsers are not affected).
231
+ - `Blob`, `File`, `ArrayBuffer`, typed array and `URLSearchParams` bodies are sent as they are; they
232
+ were JSON-encoded to `{}`.
233
+ - An object body with `Content-Type: multipart/form-data` is sent as `FormData`, not JSON.
234
+ - A string body with a non-JSON `Content-Type` is sent as is, without JSON quotes (upstream
235
+ [#2555](https://github.com/openapi-ts/openapi-typescript/issues/2555), [#2382](https://github.com/openapi-ts/openapi-typescript/issues/2382)).
236
+ - A nested object in a form or multipart body throws; write a `bodySerializer` for it.
237
+ - Query parameter names and object keys are percent-encoded like values (`[ ] $ : @ ,` stay).
238
+ - A path parameter that makes a `.` or `..` segment, or a path that starts with `//`, rejects
239
+ before `fetch` is called (upstream [#2483](https://github.com/openapi-ts/openapi-typescript/issues/2483)).
240
+ - A path that already has a query string gets `&` before `params.query`, not a second `?`.
241
+ - `defaultBodySerializer` declares its real return type instead of `string`; check
242
+ `typeof result === "string"` where you used the result as a string.
243
+ - `HttpMethod` includes `"query"`: a hand-written `Record<HttpMethod, …>` needs a `query` entry.
244
+
245
+ ### Patch Changes
246
+
247
+ - [#15](https://github.com/openapi-typesafe/openapi-typesafe/pull/15) [`5837bac`](https://github.com/openapi-typesafe/openapi-typesafe/commit/5837baca3bbcd58bd132622d9a4723e97bc5a9bc) Thanks [@fedorello](https://github.com/fedorello)! - A form body with `; charset=UTF-8` is sent as a form, and its `null` fields are left out.
248
+
249
+ - [#15](https://github.com/openapi-typesafe/openapi-typesafe/pull/15) [`5837bac`](https://github.com/openapi-typesafe/openapi-typesafe/commit/5837baca3bbcd58bd132622d9a4723e97bc5a9bc) Thanks [@fedorello](https://github.com/fedorello)! - Headers given as a list of pairs (`[["x-t", "1"]]`) work.
250
+
251
+ - [#16](https://github.com/openapi-typesafe/openapi-typesafe/pull/16) [`cd79dbd`](https://github.com/openapi-typesafe/openapi-typesafe/commit/cd79dbd39d33dc913ec101a4c46560dff801da4e) Thanks [@fedorello](https://github.com/fedorello)! - Path values with `$'`, `` $` ``, `$&` or `$$` are sent as written.
252
+ - Updated dependencies [[`cd79dbd`](https://github.com/openapi-typesafe/openapi-typesafe/commit/cd79dbd39d33dc913ec101a4c46560dff801da4e), [`bfd3e60`](https://github.com/openapi-typesafe/openapi-typesafe/commit/bfd3e605bdbe240d7a8a327a59d8924781016fbd)]:
253
+ - openapi-typesafe-helpers@1.0.0-rc.2
254
+
255
+ ## 1.0.0-rc.1
256
+
257
+ ### Patch Changes
258
+
259
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - `createClient<any>()` no longer requires an init argument: `client.GET("/users/me")` compiles.
260
+ `RequestBodyOption<any>` was `{ body?: never } | { body: any }`, so `body` counted as required
261
+ (upstream [#2526](https://github.com/openapi-typesafe/openapi-typesafe/issues/2526)). It is now `{ body?: any }`.
262
+
263
+ - [#11](https://github.com/openapi-typesafe/openapi-typesafe/pull/11) [`578bd5d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/578bd5df6e6937cc3a8870a78ff84bfa6837f0b7) Thanks [@fedorello](https://github.com/fedorello)! - The CommonJS declarations (`dist/index.d.cts`) now say what `require()` returns, as in
264
+ openapi-fetch and openapi-react-query they did not. For the fetch client it is
265
+ `{ default, ...named }`: `import createClient = require("openapi-typesafe-fetch")` type-checked
266
+ and then failed at runtime with "createClient is not a function"; use `.default` or a default
267
+ import. For the react-query client it is `createClient` itself; the exported types next to its
268
+ `export =` were an error (TS2309) with `skipLibCheck: false`, and are now in a namespace merged with
269
+ the function, so `import type { QueryKey } from "openapi-typesafe-react-query"` still works. Default
270
+ imports and ES modules do not change.
271
+
272
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - An operation that declares no 2XX response types `data` with its `default` response, which covers
273
+ every undeclared status, successes too. `data` was `never` (upstream [#1862](https://github.com/openapi-typesafe/openapi-typesafe/issues/1862)). `SuccessResponse`
274
+ follows the same rule. With a 2XX response declared, `default` still types only `error`.
275
+
276
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - Middleware may return a `Request` or `Response` from the `undici` package, from another realm (an
277
+ iframe, an Electron host) or of a custom `Request` class. They are recognized by their members, not
278
+ by `instanceof`, which rejected them with "onRequest: must return new Request()" (upstream [#1847](https://github.com/openapi-typesafe/openapi-typesafe/issues/1847)):
279
+ a `Request` by its `method`, `url` and `headers`, a `Response` by its `status` and `headers`.
280
+ `Headers` from the `undici` package passed as `headers` are no longer dropped.
281
+
282
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - With a schema of hundreds of paths, a call with a wrong path reports the path and the editor
283
+ completes paths on TypeScript 5.4 to 6.0. It gave "Type instantiation is excessively deep and
284
+ possibly infinite" (TS2589) and no completion (upstream [#1882](https://github.com/openapi-typesafe/openapi-typesafe/issues/1882)): the init type of all operations
285
+ of the method was one deep type, and is now computed per operation. The type matrix checks this
286
+ with the GitHub schema on every supported TypeScript version.
287
+
288
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - `Parameters<typeof $api.queryOptions>` (and of `useQuery`, `useSuspenseQuery` and the fetch
289
+ client's `request`) takes the arguments of every operation; its path was `never` (upstream [#2178](https://github.com/openapi-typesafe/openapi-typesafe/issues/2178)).
290
+ `PathsWithMethod<paths, HttpMethod>` is now every path that has some method; a known method or set
291
+ of methods still gives the paths that have each of them, as before. Code that is generic in the
292
+ paths, such as swr-openapi's hooks, compiles as with openapi-typescript's helpers. The init in those parameters is required when some operation
293
+ requires one (`IsInitOptional`), so a helper passes `{}` for a path that needs none. A single call
294
+ is checked as before, also with a union of paths or methods.
295
+ `ReturnType` of these generic functions stays `any`; the `queryOptions` docs show what to use.
296
+
297
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - The method types take the generated `interface paths`: `UseQueryMethod`, `UseSuspenseQueryMethod`,
298
+ `UseInfiniteQueryMethod`, `UseMutationMethod`, `QueryOptionsFunction`, `QueryKey`,
299
+ `InfiniteQueryKey`, `ClientMethod` and `ClientRequestMethod` required
300
+ `Record<string, Record<HttpMethod, {}>>`, which an interface does not satisfy (TS2344, upstream
301
+ [#2267](https://github.com/openapi-typesafe/openapi-typesafe/issues/2267)). They now take any `Paths`, like `OpenapiQueryClient` and `Client`. `PathOperation` is the
302
+ new exported lookup of an operation; `MaybeOptionalInit` takes any key as its location.
303
+
304
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - `createClient` and `createPathBasedClient` accept `fetch` and `Request` of another Fetch API
305
+ implementation, such as the `undici` package (upstream [#2562](https://github.com/openapi-typesafe/openapi-typesafe/issues/2562)). Their types are not the DOM lib's,
306
+ so an overload with `OtherFetchClientOptions` checks only that `fetch` returns a promise and
307
+ `Request` is a class. An inline `fetch` still gets a typed `Request` input.
308
+ - Updated dependencies [[`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01), [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01)]:
309
+ - openapi-typesafe-helpers@1.0.0-rc.1
310
+
311
+ ## 1.0.0-rc.0
312
+
313
+ ### Minor Changes
314
+
315
+ - [`551c058`](https://github.com/openapi-typesafe/openapi-typesafe/commit/551c05889d32eaf1d328111e5c4d167e0337e5a4) Thanks [@fedorello](https://github.com/fedorello)! - The OpenAPI 3.2 `QUERY` method: `HttpMethod` includes `"query"`, the fetch client has
316
+ `client.QUERY(url, { body })` (also through `request("query", …)` and the path-based client), and
317
+ the react-query hooks accept `"query"`. A `Record<HttpMethod, …>` written by hand needs a `query`
318
+ entry. The path-based client maps only HTTP method keys, so `parameters` no longer shows up as a
319
+ `PARAMETERS()` call that always failed.
320
+
321
+ ### Patch Changes
322
+
323
+ - [`16f572f`](https://github.com/openapi-typesafe/openapi-typesafe/commit/16f572fd582fbabe058abad2604ffb3299ddc97a) Thanks [@fedorello](https://github.com/fedorello)! - `defaultBodySerializer` recognizes headers from another JavaScript realm (an iframe, `node:vm`, Jest VM modules), so an `application/x-www-form-urlencoded` body is no longer sent as JSON there. Its type now declares the optional `headers` parameter. Fixes upstream [#2637](https://github.com/openapi-typesafe/openapi-typesafe/issues/2637).
324
+
325
+ - [`2b3671f`](https://github.com/openapi-typesafe/openapi-typesafe/commit/2b3671f126f78e24ead7ad785a55b79540ae9092) Thanks [@fedorello](https://github.com/fedorello)! - Middleware request ids come from a process-wide counter instead of `Math.random()`. Next.js prerendering rejected the random value as a side effect before uncached data. Ids stay unique, also across clients that share a middleware. Fixes upstream [#2486](https://github.com/openapi-typesafe/openapi-typesafe/issues/2486) (as [#2763](https://github.com/openapi-typesafe/openapi-typesafe/issues/2763) proposed).
326
+
327
+ - [`e49344a`](https://github.com/openapi-typesafe/openapi-typesafe/commit/e49344a208fb3bb38cd86f62c1395f8f7ca950f6) Thanks [@fedorello](https://github.com/fedorello)! - Packages contain only their build output, sources for source maps, the CLI, and the README, license and changelog. Coverage reports, local logs and tool configs are no longer packed.
328
+
329
+ - [`b775891`](https://github.com/openapi-typesafe/openapi-typesafe/commit/b775891e2ac748aeab4cb3106c1df44a0b7ddf30) Thanks [@kaigritun](https://github.com/kaigritun)! - fix(openapi-typesafe-fetch): handle empty error responses when Content-Length header is stripped
330
+
331
+ - [`bb9d754`](https://github.com/openapi-typesafe/openapi-typesafe/commit/bb9d754cbb4133ac1ae09f1a340af455f9482ecc) Thanks [@fedorello](https://github.com/fedorello)! - The error for an invalid middleware has a missing backtick back: "Middleware must be an object
332
+ with one of `onRequest()`, `onResponse()` or `onError()`".
333
+
334
+ - [`4091466`](https://github.com/openapi-typesafe/openapi-typesafe/commit/40914664dd3d9aba10c2720a78d226ba9355e5ba) Thanks [@fedorello](https://github.com/fedorello)! - An object body with `Content-Type: multipart/form-data` is now sent as `FormData`: one part per
335
+ field, a `Blob` or `File` as a file part, an array as one part per item. Before, it was
336
+ JSON-encoded, so every file upload needed its own `bodySerializer`. A `Content-Type` without a
337
+ `boundary` set by hand for a `FormData` body is dropped, so the platform sets the boundary and the
338
+ server can read the parts (openapi-typescript#1214). A nested object in such a body throws and
339
+ names `bodySerializer()`. See ADR-013, decision 10.
340
+
341
+ - [`3786df3`](https://github.com/openapi-typesafe/openapi-typesafe/commit/3786df3482727d6b728b7409ebc9ee8b66f3b97c) Thanks [@fedorello](https://github.com/fedorello)! - Query parameter names and object keys are now percent-encoded, like values. A key from your data,
342
+ such as the keys of an `additionalProperties` query object, could add a parameter (`a&admin`) or a
343
+ path segment (`a/b`). `[`, `]`, `$`, `:`, `@` and `,` stay as written, so `filter[status]` and
344
+ `$filter` are unchanged. See ADR-013, decision 9.
345
+
346
+ - [`77e1425`](https://github.com/openapi-typesafe/openapi-typesafe/commit/77e1425ac5b45833f2a69e12448056292f71803f) Thanks [@fedorello](https://github.com/fedorello)! - Request bodies that `fetch` sends as they are now go out unchanged, without a JSON `Content-Type`:
347
+ `Blob`, `File`, `URLSearchParams`, `ArrayBuffer` and typed arrays. Before, they were JSON-encoded to
348
+ `{}`, so a binary upload lost its data. A nested object in an `application/x-www-form-urlencoded`
349
+ body now throws instead of being sent as `[object Object]`, and a path that already has a query
350
+ string gets `&` instead of a second `?`. See ADR-013, decisions 6 to 8.
351
+
352
+ - [`4ddbce1`](https://github.com/openapi-typesafe/openapi-typesafe/commit/4ddbce1079976752abb426e79d27a744f9fe1cb3) Thanks [@fedorello](https://github.com/fedorello)! - `defaultPathSerializer` throws when a path parameter makes a `.` or `..` path segment, so a value like `..` can no longer move a request to another endpoint (path traversal). Such a request now rejects before `fetch` is called (ADR-013). Fixes upstream [#2483](https://github.com/openapi-typesafe/openapi-typesafe/issues/2483).
353
+
354
+ - [`f8ac0d6`](https://github.com/openapi-typesafe/openapi-typesafe/commit/f8ac0d6e8f35d317ccb41758b7a2f3dc1ecf1f87) Thanks [@fedorello](https://github.com/fedorello)! - A string request body is sent as is when the request sets a non-JSON `Content-Type` such as `text/plain`; before, it was JSON-encoded and got extra quotes. With a JSON `Content-Type`, or none, a string is still sent as a JSON string value (ADR-013). Fixes upstream [#2555](https://github.com/openapi-typesafe/openapi-typesafe/issues/2555), [#2382](https://github.com/openapi-typesafe/openapi-typesafe/issues/2382).
355
+ - Updated dependencies [[`e49344a`](https://github.com/openapi-typesafe/openapi-typesafe/commit/e49344a208fb3bb38cd86f62c1395f8f7ca950f6), [`551c058`](https://github.com/openapi-typesafe/openapi-typesafe/commit/551c05889d32eaf1d328111e5c4d167e0337e5a4), [`63275f8`](https://github.com/openapi-typesafe/openapi-typesafe/commit/63275f86ff7ba855338f09f87fb9567c8ed91300), [`d5dcbb3`](https://github.com/openapi-typesafe/openapi-typesafe/commit/d5dcbb3f38e4d583334977c50db92461085d4a11)]:
356
+ - openapi-typesafe-helpers@1.0.0-rc.0
357
+
358
+ ## 0.17.0
359
+
360
+ ### Minor Changes
361
+
362
+ - [#2549](https://github.com/openapi-ts/openapi-typescript/pull/2549) [`a690e52`](https://github.com/openapi-ts/openapi-typescript/commit/a690e526b7693479bc2f2f002d71a020fa5e4e16) Thanks [@abumalick](https://github.com/abumalick)! - Add readOnly/writeOnly support via `--read-write-markers` flag. When enabled, readOnly properties are wrapped with `$Read<T>` and writeOnly properties with `$Write<T>`. openapi-fetch uses `Readable<T>` and `Writable<T>` helpers to exclude these properties from responses and request bodies respectively.
363
+
364
+ ### Patch Changes
365
+
366
+ - [#2572](https://github.com/openapi-ts/openapi-typescript/pull/2572) [`9350ddf`](https://github.com/openapi-ts/openapi-typescript/commit/9350ddfcd44b661a5288667ebfcf298868dd9784) Thanks [@luis-guideti](https://github.com/luis-guideti)! - Do not treat Content-Length=0 as empty when Transfer-Encoding is chunked
367
+
368
+ - Updated dependencies [[`a690e52`](https://github.com/openapi-ts/openapi-typescript/commit/a690e526b7693479bc2f2f002d71a020fa5e4e16)]:
369
+ - openapi-typescript-helpers@0.1.0
370
+
371
+ ## 0.16.0
372
+
373
+ ### Minor Changes
374
+
375
+ - [#2362](https://github.com/openapi-ts/openapi-typescript/pull/2362) [`9002418`](https://github.com/openapi-ts/openapi-typescript/commit/90024185c7a251b5dbedd148e4eb5d15b95409c8) Thanks [@luxass](https://github.com/luxass)! - Added support for setting a custom path serializers either globally or per request. This allows you to customize how path parameters are serialized in the URL. E.g. you can use a custom serializer to prevent encoding of a path parameter, if you need to pass a value that should not be encoded.
376
+
377
+ ## 0.15.2
378
+
379
+ ### Patch Changes
380
+
381
+ - [#2508](https://github.com/openapi-ts/openapi-typescript/pull/2508) [`89843b0`](https://github.com/openapi-ts/openapi-typescript/commit/89843b06296ac1b227cc27546009e79b3a749aaa) Thanks [@srbarba](https://github.com/srbarba)! - Use text() when no content-length is provided to avoid errors parsing empty bodies (200 with no content)
382
+
383
+ ## 0.15.1
384
+
385
+ ### Patch Changes
386
+
387
+ - [#2556](https://github.com/openapi-ts/openapi-typescript/pull/2556) [`36c0fb8`](https://github.com/openapi-ts/openapi-typescript/commit/36c0fb8a0504b27284843daaa9f49f80e2cfad0d) Thanks [@justAnArthur](https://github.com/justAnArthur)! - fix omit serializing for already serialized data
388
+
389
+ ## 0.15.0
390
+
391
+ ### Minor Changes
392
+
393
+ - [#2465](https://github.com/openapi-ts/openapi-typescript/pull/2465) [`8f96eb5`](https://github.com/openapi-ts/openapi-typescript/commit/8f96eb50f5ec060e2e9100e9a43d3fe98e9795c5) Thanks [@Kauabunga](https://github.com/Kauabunga)! - Enable request level middlewares option
394
+
395
+ ## 0.14.1
396
+
397
+ ### Patch Changes
398
+
399
+ - [#2407](https://github.com/openapi-ts/openapi-typescript/pull/2407) [`7527d1e`](https://github.com/openapi-ts/openapi-typescript/commit/7527d1e7502cd1e9621922f028b4736d85f25800) Thanks [@jthacker](https://github.com/jthacker)! - Fix Request parameter being ignored by client methods
400
+
401
+ ## 0.14.0
402
+
403
+ ### Minor Changes
404
+
405
+ - [#2310](https://github.com/openapi-ts/openapi-typescript/pull/2310) [`e66b5ce`](https://github.com/openapi-ts/openapi-typescript/commit/e66b5ce63bfcdc57c6ee942e5ed4e7667e64c290) Thanks [@drwpow](https://github.com/drwpow)! - Build package with unbuild. Also remove the minified version (openapi-fetch is only useful in a TypeScript/bundler environment, so there’s no sense in loading it from a CDN clientside).
406
+
407
+ ## 0.13.8
408
+
409
+ ### Patch Changes
410
+
411
+ - [#2096](https://github.com/openapi-ts/openapi-typescript/pull/2096) [`0058128`](https://github.com/openapi-ts/openapi-typescript/commit/0058128afa258180793ae2071022d89a688d8ddc) Thanks [@obulat](https://github.com/obulat)! - Encode the request body if `Content-Type` header is `x-www-form-urlencoded`
412
+ - [#2157](https://github.com/openapi-ts/openapi-typescript/pull/2157) [`419d9ac`](https://github.com/openapi-ts/openapi-typescript/commit/419d9ac6851cf780b81060ddc05c231c5225a17b) Thanks [@Rendez](https://github.com/Rendez)! - Fix overriding baseUrl per request without overriding default baseUrl
413
+ - [#2308](https://github.com/openapi-ts/openapi-typescript/pull/2308) [`81c031d`](https://github.com/openapi-ts/openapi-typescript/commit/81c031da8584ed49b033ebfc67bbb3e1ca258699) Thanks [@drwpow](https://github.com/drwpow)! - Improve header handling
414
+
415
+ ## 0.13.7
416
+
417
+ ### Patch Changes
418
+
419
+ - [#2256](https://github.com/openapi-ts/openapi-typescript/pull/2256) [`30c6da8`](https://github.com/openapi-ts/openapi-typescript/commit/30c6da800a00bda87da66dea6d04807e1379f06a) Thanks [@KajSzy](https://github.com/KajSzy)! - fix dynamic access to methods using wrapAsPathBasedClient
420
+
421
+ ## 0.13.6
422
+
423
+ ### Patch Changes
424
+
425
+ - [#2205](https://github.com/openapi-ts/openapi-typescript/pull/2205) [`4966560`](https://github.com/openapi-ts/openapi-typescript/commit/4966560790ad49fabb06d718115a82a779a5b74a) Thanks [@live-small](https://github.com/live-small)! - Fix HEAD method requests to prevent body parsing regardless of Content-Length header value
426
+
427
+ ## 0.13.5
428
+
429
+ ### Patch Changes
430
+
431
+ - [#2091](https://github.com/openapi-ts/openapi-typescript/pull/2091) [`ebe56f3`](https://github.com/openapi-ts/openapi-typescript/commit/ebe56f337561bfdd1bf1abdc56ba3d2f48c4d393) Thanks [@p-dubovitsky](https://github.com/p-dubovitsky)! - Allow returning Response from onRequest callback
432
+
433
+ ## 0.13.4
434
+
435
+ ### Patch Changes
436
+
437
+ - [#2063](https://github.com/openapi-ts/openapi-typescript/pull/2063) [`5935cd2`](https://github.com/openapi-ts/openapi-typescript/commit/5935cd25a05d3ec1f4c8bf222d65395a0b9ae5b4) Thanks [@kerwanp](https://github.com/kerwanp)! - add support for arbitrary method
438
+
439
+ ## 0.13.3
440
+
441
+ ### Patch Changes
442
+
443
+ Refresh of 0.13.2; corrupted package
444
+
445
+ ## 0.13.2
446
+
447
+ ### Patch Changes
448
+
449
+ - [#2020](https://github.com/openapi-ts/openapi-typescript/pull/2020) [`7081842`](https://github.com/openapi-ts/openapi-typescript/commit/70818420c1cd6ca2ad2529bf2d7936bd01f3ef42) Thanks [@mellster2012](https://github.com/mellster2012)! - Add client option to pass custom RequestInit object into fetch requests for supported implementations
450
+
451
+ ## 0.13.1
452
+
453
+ ### Patch Changes
454
+
455
+ - [#1974](https://github.com/openapi-ts/openapi-typescript/pull/1974) [`35c576c`](https://github.com/openapi-ts/openapi-typescript/commit/35c576c8b2852f66e641014d13ffcfdeb21e98a1) Thanks [@luchsamapparat](https://github.com/luchsamapparat)! - add onError handler to middleware
456
+
457
+ ## 0.13.0
458
+
459
+ ### Minor Changes
460
+
461
+ - [#1968](https://github.com/openapi-ts/openapi-typescript/pull/1968) [`267977e`](https://github.com/openapi-ts/openapi-typescript/commit/267977e369f7a84c5d828023e6175729e4dd4c22) Thanks [@DjordyKoert](https://github.com/DjordyKoert)! - 204 responses or response with a Content-Length of 0 will now return undefined instead of an empty object
462
+
463
+ ## 0.12.5
464
+
465
+ ### Patch Changes
466
+
467
+ - [#1937](https://github.com/openapi-ts/openapi-typescript/pull/1937) [`06163a2`](https://github.com/openapi-ts/openapi-typescript/commit/06163a2030eaf8d0579f624d86481e1205aef396) Thanks [@DjordyKoert](https://github.com/DjordyKoert)! - client data & error now return a union of possible types
468
+
469
+ - Updated dependencies [[`06163a2`](https://github.com/openapi-ts/openapi-typescript/commit/06163a2030eaf8d0579f624d86481e1205aef396)]:
470
+ - openapi-typescript-helpers@0.0.15
471
+
472
+ ## 0.12.4
473
+
474
+ ### Patch Changes
475
+
476
+ - Updated dependencies [[`abfad56`](https://github.com/openapi-ts/openapi-typescript/commit/abfad5659183f95f705598dc52ae2dfe7a18ec04)]:
477
+ - openapi-typescript-helpers@0.0.14
478
+
479
+ ## 0.12.3
480
+
481
+ ### Patch Changes
482
+
483
+ - [#1936](https://github.com/openapi-ts/openapi-typescript/pull/1936) [`d14aa65`](https://github.com/openapi-ts/openapi-typescript/commit/d14aa65207b8abd1f369965bbd32ebb581e8d741) Thanks [@BlakeSzabo](https://github.com/BlakeSzabo)! - Fix multiple empty arrays in query params appending extra ampersands
484
+
485
+ ## 0.12.2
486
+
487
+ ### Patch Changes
488
+
489
+ - [#1918](https://github.com/openapi-ts/openapi-typescript/pull/1918) [`e39d11e`](https://github.com/openapi-ts/openapi-typescript/commit/e39d11e5ac4e7f5fc2ce81e8a6d7792f91a6551a) Thanks [@yicrotkd](https://github.com/yicrotkd)! - Improve `Middleware` type definition to require either onRequest or onResponse
490
+
491
+ ## 0.12.1
492
+
493
+ ### Patch Changes
494
+
495
+ - [#1907](https://github.com/openapi-ts/openapi-typescript/pull/1907) [`efaa1e2`](https://github.com/openapi-ts/openapi-typescript/commit/efaa1e23b9cb0901fe026e48fbb4b347f0c95507) Thanks [@tobiasdcl](https://github.com/tobiasdcl)! - allow usage of custom Request class
496
+
497
+ ## 0.12.0
498
+
499
+ ### Minor Changes
500
+
501
+ - ⚠️ **Breaking Change** [#1826](https://github.com/openapi-ts/openapi-typescript/pull/1826) [`b893c44`](https://github.com/openapi-ts/openapi-typescript/commit/b893c44f4290917f24c2ef7cda106c540df9cb3d) Thanks [@goce-cz](https://github.com/goce-cz)! - Do not set content-type on body-less requests
502
+
503
+ ## 0.11.3
504
+
505
+ ### Patch Changes
506
+
507
+ - [#1825](https://github.com/openapi-ts/openapi-typescript/pull/1825) [`6038f8f`](https://github.com/openapi-ts/openapi-typescript/commit/6038f8fca09fa698c9dd9bc49349c49342c46ac2) Thanks [@goce-cz](https://github.com/goce-cz)! - Allow falsy values (except undefined) as a valid body
508
+
509
+ ## 0.11.2
510
+
511
+ ### Patch Changes
512
+
513
+ - [#1817](https://github.com/openapi-ts/openapi-typescript/pull/1817) [`2a4b067`](https://github.com/openapi-ts/openapi-typescript/commit/2a4b067f43f7e0b75aecbf5c2fb3013a4e96e591) Thanks [@Gruak](https://github.com/Gruak)! - Allow specifying baseUrl per request
514
+
515
+ - [#1842](https://github.com/openapi-ts/openapi-typescript/pull/1842) [`0e42cbb`](https://github.com/openapi-ts/openapi-typescript/commit/0e42cbb98e2a023c33685de65ab0b8dbf82cc4b3) Thanks [@gzm0](https://github.com/gzm0)! - fix: allow use of `PathBasedClient` with generated `paths`
516
+
517
+ ## 0.11.1
518
+
519
+ ### Patch Changes
520
+
521
+ - [#1831](https://github.com/openapi-ts/openapi-typescript/pull/1831) [`091e71a`](https://github.com/openapi-ts/openapi-typescript/commit/091e71ad4bf805be32261a53524f320c2fa42690) Thanks [@SebastienGllmt](https://github.com/SebastienGllmt)! - Add MethodResponse utility type to easily get the return type of an endpoint on a client
522
+
523
+ - [#1833](https://github.com/openapi-ts/openapi-typescript/pull/1833) [`cec023d`](https://github.com/openapi-ts/openapi-typescript/commit/cec023d3461c79ca355a88366949d0f6382e4e2a) Thanks [@ngraef](https://github.com/ngraef)! - Fix identification of required properties when `strictNullChecks` is disabled
524
+
525
+ - Updated dependencies [[`cec023d`](https://github.com/openapi-ts/openapi-typescript/commit/cec023d3461c79ca355a88366949d0f6382e4e2a)]:
526
+ - openapi-typescript-helpers@0.0.12
527
+
528
+ ## 0.11.0
529
+
530
+ ### Minor Changes
531
+
532
+ -- ⚠️ **Breaking Change** [#1791](https://github.com/openapi-ts/openapi-typescript/pull/1791) [`a956d5d`](https://github.com/openapi-ts/openapi-typescript/commit/a956d5d8480834402536283ee2f24ce8086698dc) Thanks [@gzm0](https://github.com/gzm0)! - Add support for `client["/endpoint"].GET()` style calls
533
+
534
+ ## 0.10.6
535
+
536
+ ### Patch Changes
537
+
538
+ - [#1809](https://github.com/openapi-ts/openapi-typescript/pull/1809) [`f21c05b`](https://github.com/openapi-ts/openapi-typescript/commit/f21c05b9afcc89ee6ef73edab4045620b410eb01) Thanks [@gzm0](https://github.com/gzm0)! - perf: remove unnecessary `async` keywords (for reduced code size)
539
+
540
+ - [#1827](https://github.com/openapi-ts/openapi-typescript/pull/1827) [`ba0d595`](https://github.com/openapi-ts/openapi-typescript/commit/ba0d595556661053b5ef310afafec4fcc116e206) Thanks [@ngraef](https://github.com/ngraef)! - Fix typing for environments without DOM lib
541
+
542
+ ## 0.10.5
543
+
544
+ ### Patch Changes
545
+
546
+ - [#1762](https://github.com/openapi-ts/openapi-typescript/pull/1762) [`7698546`](https://github.com/openapi-ts/openapi-typescript/commit/76985467402dc52d705902c21159387ddaff3519) Thanks [@thatsprettyfaroutman](https://github.com/thatsprettyfaroutman)! - Allow FormData through defaultBodySerializer
547
+
548
+ ## 0.10.4
549
+
550
+ ### Patch Changes
551
+
552
+ - Updated dependencies [[`bcc9222`](https://github.com/openapi-ts/openapi-typescript/commit/bcc92223c83ba074316e17534a173fee8da9cd41)]:
553
+ - openapi-typescript-helpers@0.0.11
554
+
555
+ ## 0.10.3
556
+
557
+ ### Patch Changes
558
+
559
+ - [#1717](https://github.com/openapi-ts/openapi-typescript/pull/1717) [`335530c`](https://github.com/openapi-ts/openapi-typescript/commit/335530c4f8f966d0154f19504585c462f5f5a409) Thanks [@kerwanp](https://github.com/kerwanp)! - Ignore configuration files in published package
560
+
561
+ - [#1717](https://github.com/openapi-ts/openapi-typescript/pull/1717) [`335530c`](https://github.com/openapi-ts/openapi-typescript/commit/335530c4f8f966d0154f19504585c462f5f5a409) Thanks [@kerwanp](https://github.com/kerwanp)! - Create own client type for easier reusability
562
+
563
+ - Updated dependencies [[`335530c`](https://github.com/openapi-ts/openapi-typescript/commit/335530c4f8f966d0154f19504585c462f5f5a409)]:
564
+ - openapi-typescript-helpers@0.0.10
565
+
566
+ ## 0.10.2
567
+
568
+ ### Patch Changes
569
+
570
+ - [#1696](https://github.com/openapi-ts/openapi-typescript/pull/1696) [`aea31a8`](https://github.com/openapi-ts/openapi-typescript/commit/aea31a8679b901745a98f856fea9d53dff6807b3) Thanks [@swachter](https://github.com/swachter)! - Fix: encode primitive path parameters
571
+
572
+ ## 0.10.1
573
+
574
+ ### Patch Changes
575
+
576
+ - [#1719](https://github.com/openapi-ts/openapi-typescript/pull/1719) [`a8f2253`](https://github.com/openapi-ts/openapi-typescript/commit/a8f2253d31f060f66fe8c5c69ae79b1f81e78587) Thanks [@drwpow](https://github.com/drwpow)! - Remove nanoid from dependencies
577
+
578
+ - [#1719](https://github.com/openapi-ts/openapi-typescript/pull/1719) [`a8f2253`](https://github.com/openapi-ts/openapi-typescript/commit/a8f2253d31f060f66fe8c5c69ae79b1f81e78587) Thanks [@drwpow](https://github.com/drwpow)! - Fix "failed to execute fetch on Window" error
579
+
580
+ - [#1719](https://github.com/openapi-ts/openapi-typescript/pull/1719) [`a8f2253`](https://github.com/openapi-ts/openapi-typescript/commit/a8f2253d31f060f66fe8c5c69ae79b1f81e78587) Thanks [@drwpow](https://github.com/drwpow)! - Revert customFetch API back to `fetch(input: Request)`
581
+
582
+ ## 0.10.0
583
+
584
+ ### Minor Changes
585
+
586
+ - ⚠️ **Breaking Change**: `openapi-typescript@7` is needed to work. You’ll get type errors with `openapi-typescript@6` and below.
587
+ - ⚠️ **Breaking Change**: The Middleware API has changed to be an object rather than `(request, options)` or `(response, options)`. [See Middleware docs](https://openapi-ts.dev/openapi-fetch/middleware-auth) for updated API.
588
+ - ⚠️ **Breaking Change**: The `Content-Type` header is no longer sent by default if a body payload is attached.
589
+ - ⚠️ **Breaking Change**: The `customFetch` type now calls `fetch(input: string, init: RequestInit)` and the types have been updated, rather than `fetch(input: Request)` introduced in `0.9.0`.
590
+
591
+ - Added `id` to middleware handlers that create a unique ID per-fetch
592
+
593
+ ## 0.9.8
594
+
595
+ ### Patch Changes
596
+
597
+ - [#1697](https://github.com/openapi-ts/openapi-typescript/pull/1697) [`e77ce50`](https://github.com/openapi-ts/openapi-typescript/commit/e77ce501e479f54fb783c19b99fa7a53a894732c) Thanks [@armandabric](https://github.com/armandabric)! - Expose original request on Middleware.onResponse
598
+
599
+ ## 0.9.7
600
+
601
+ ### Patch Changes
602
+
603
+ - [#1672](https://github.com/openapi-ts/openapi-typescript/pull/1672) [`64cb619`](https://github.com/openapi-ts/openapi-typescript/commit/64cb6193ddd94523636fd55ba308117f2614a2e2) Thanks [@jaredLunde](https://github.com/jaredLunde)! - Fixes issue where native properties were not excluded from custom properties in the CustomRequest class
604
+
605
+ ## 0.9.6
606
+
607
+ ### Patch Changes
608
+
609
+ - [#1653](https://github.com/openapi-ts/openapi-typescript/pull/1653) [`4f4253a`](https://github.com/openapi-ts/openapi-typescript/commit/4f4253a031820a664499b9df7ed5c8b192aa98b3) Thanks [@FreeAoi](https://github.com/FreeAoi)! - Let request object have custom properties
610
+
611
+ ## 0.9.5
612
+
613
+ ### Patch Changes
614
+
615
+ - [#1639](https://github.com/openapi-ts/openapi-typescript/pull/1639) [`645f436`](https://github.com/openapi-ts/openapi-typescript/commit/645f4366d2907b05eee1e6ec33d13edab8614fa1) Thanks [@FreeAoi](https://github.com/FreeAoi)! - fix request option types don't showing optional props correctly
616
+
617
+ ## 0.9.4
618
+
619
+ ### Patch Changes
620
+
621
+ - [#1597](https://github.com/openapi-ts/openapi-typescript/pull/1597) [`1f7ad9d`](https://github.com/openapi-ts/openapi-typescript/commit/1f7ad9d41f1f1ca7b1195a381c907393f9ef743b) Thanks [@armandabric](https://github.com/armandabric)! - Allow to select the response content type
622
+
623
+ - [#1585](https://github.com/openapi-ts/openapi-typescript/pull/1585) [`4e06f86`](https://github.com/openapi-ts/openapi-typescript/commit/4e06f86934e11f3dbc3aabee4b4e61dd62680782) Thanks [@mikestopcontinues](https://github.com/mikestopcontinues)! - Update types for path-methods object
624
+
625
+ - [#1610](https://github.com/openapi-ts/openapi-typescript/pull/1610) [`cc8073b`](https://github.com/openapi-ts/openapi-typescript/commit/cc8073b3ee42e7aaa546a9c6a0553c300d8882de) Thanks [@illright](https://github.com/illright)! - Fix data/error discrimination when there are empty-body errors
626
+
627
+ - [#1587](https://github.com/openapi-ts/openapi-typescript/pull/1587) [`2a66a64`](https://github.com/openapi-ts/openapi-typescript/commit/2a66a6483d755a090e57a457b22eb99696da098a) Thanks [@JE-lee](https://github.com/JE-lee)! - Fix the custom fetch type
628
+
629
+ ## 0.9.3
630
+
631
+ ### Patch Changes
632
+
633
+ - [#1580](https://github.com/openapi-ts/openapi-typescript/pull/1580) [`4c0c7fc`](https://github.com/openapi-ts/openapi-typescript/commit/4c0c7fc69dc6416dcf1fea785455bce8b9742704) Thanks [@drwpow](https://github.com/drwpow)! - Fix type errors
634
+
635
+ ## 0.9.2
636
+
637
+ ### Patch Changes
638
+
639
+ - [#1550](https://github.com/openapi-ts/openapi-typescript/pull/1550) [`a5a9cc7`](https://github.com/openapi-ts/openapi-typescript/commit/a5a9cc766f893fd93500a5a1ff909746194bfdc7) Thanks [@shirish87](https://github.com/shirish87)! - Fix 'Content-Type' header being removed from requests with multipart/form-data body
640
+
641
+ ## 0.9.1
642
+
643
+ ### Patch Changes
644
+
645
+ - [#1546](https://github.com/openapi-ts/openapi-typescript/pull/1546) [`cc64453`](https://github.com/openapi-ts/openapi-typescript/commit/cc64453c7f92c77c19bc45dc0f701a98ab461b16) Thanks [@drwpow](https://github.com/drwpow)! - Fix JSON consuming body
646
+
647
+ ## 0.9.0
648
+
649
+ ### Minor Changes
650
+
651
+ - [#1521](https://github.com/openapi-ts/openapi-typescript/pull/1521) [`b174dd6`](https://github.com/openapi-ts/openapi-typescript/commit/b174dd6a7668e2f1f6bf6bd086ba2dabf7fb669e) Thanks [@drwpow](https://github.com/drwpow)! - Add middleware support
652
+
653
+ - [#1521](https://github.com/openapi-ts/openapi-typescript/pull/1521) [`fc3a468`](https://github.com/openapi-ts/openapi-typescript/commit/fc3a468c4342e17d203712be358b30a3fb82ab1e) Thanks [@drwpow](https://github.com/drwpow)! - ⚠️ Breaking change (internal): fetch() is now called with new Request() to support middleware (which may affect test mocking)
654
+
655
+ - [#1521](https://github.com/openapi-ts/openapi-typescript/pull/1521) [`2551e4b`](https://github.com/openapi-ts/openapi-typescript/commit/2551e4bde41d5437a76c13bb5ba25ede4f14db10) Thanks [@drwpow](https://github.com/drwpow)! - ⚠️ **Breaking change**: Responses are no longer automatically `.clone()`’d in certain instances. Be sure to `.clone()` yourself if you need to access the raw body!
656
+
657
+ - [#1534](https://github.com/openapi-ts/openapi-typescript/pull/1534) [`2bbeb92`](https://github.com/openapi-ts/openapi-typescript/commit/2bbeb92244cb82a534abb016ffb5fbd1255d9db5) Thanks [@drwpow](https://github.com/drwpow)! - ⚠️ Breaking change: no longer supports deeply-nested objects/arrays for query & path serialization.
658
+
659
+ ### Patch Changes
660
+
661
+ - [#1484](https://github.com/openapi-ts/openapi-typescript/pull/1484) [`49bbd72`](https://github.com/openapi-ts/openapi-typescript/commit/49bbd72800f7bc6c460a741c50d11eb216746290) Thanks [@drwpow](https://github.com/drwpow)! - Remove prepare script
662
+
663
+ - [#1479](https://github.com/openapi-ts/openapi-typescript/pull/1479) [`c6d945b`](https://github.com/openapi-ts/openapi-typescript/commit/c6d945be717bb3999178fb3a77292e41e1b7ab80) Thanks [@darwish](https://github.com/darwish)! - Fixed build of openapi-typescript-helpers for CommonJS environments
664
+
665
+ - [#1534](https://github.com/openapi-ts/openapi-typescript/pull/1534) [`2bbeb92`](https://github.com/openapi-ts/openapi-typescript/commit/2bbeb92244cb82a534abb016ffb5fbd1255d9db5) Thanks [@drwpow](https://github.com/drwpow)! - Add support for automatic label & matrix path serialization.
666
+
667
+ - [#1521](https://github.com/openapi-ts/openapi-typescript/pull/1521) [`fd44bd2`](https://github.com/openapi-ts/openapi-typescript/commit/fd44bd28d881715e30f5a71435f05f6bae13859d) Thanks [@drwpow](https://github.com/drwpow)! - Support arrays in headers
668
+
669
+ - [#1534](https://github.com/openapi-ts/openapi-typescript/pull/1534) [`2bbeb92`](https://github.com/openapi-ts/openapi-typescript/commit/2bbeb92244cb82a534abb016ffb5fbd1255d9db5) Thanks [@drwpow](https://github.com/drwpow)! - Remove leading question marks from querySerializer
670
+
671
+ - [#1530](https://github.com/openapi-ts/openapi-typescript/pull/1530) [`4765658`](https://github.com/openapi-ts/openapi-typescript/commit/4765658460e0850d005e3f08cd63c4949326349b) Thanks [@wydengyre](https://github.com/wydengyre)! - Exports the ClientMethod utility type.
672
+
673
+ - Updated dependencies [[`c6d945b`](https://github.com/openapi-ts/openapi-typescript/commit/c6d945be717bb3999178fb3a77292e41e1b7ab80)]:
674
+ - openapi-typescript-helpers@0.0.7
675
+
676
+ ## 0.8.2
677
+
678
+ ### Patch Changes
679
+
680
+ - [#1424](https://github.com/openapi-ts/openapi-typescript/pull/1424) [`8f5adb3`](https://github.com/openapi-ts/openapi-typescript/commit/8f5adb3700eacff287d8b3f62837cb823503d5a4) Thanks [@drwpow](https://github.com/drwpow)! - Separate TS types to be managed manually
681
+
682
+ - Updated dependencies [[`5be2082`](https://github.com/openapi-ts/openapi-typescript/commit/5be20827334c60e53222445561b9cfc526f4f6a9)]:
683
+ - openapi-typescript-helpers@0.0.5
684
+
685
+ ## 0.8.1
686
+
687
+ ### Patch Changes
688
+
689
+ - [#1404](https://github.com/openapi-ts/openapi-typescript/pull/1404) [`93204e4`](https://github.com/openapi-ts/openapi-typescript/commit/93204e4de1b6e0469fdc8b710f5b279671570a9a) Thanks [@drwpow](https://github.com/drwpow)! - Fix behavior for empty arrays and objects in default `querySerializer`
690
+
691
+ ## 0.8.0
692
+
693
+ ### Minor Changes
694
+
695
+ - [#1399](https://github.com/openapi-ts/openapi-typescript/pull/1399) [`4fca1e4`](https://github.com/openapi-ts/openapi-typescript/commit/4fca1e477f524223fa8921559caef6bb364dc194) Thanks [@drwpow](https://github.com/drwpow)! - ⚠️ **Breaking**: change default querySerializer behavior to produce `style: form`, `explode: true` query params [according to the OpenAPI specification](https://swagger.io/docs/specification/serialization/#query). Also adds support for `deepObject`s (square bracket style).
696
+
697
+ ## 0.7.10
698
+
699
+ ### Patch Changes
700
+
701
+ - [#1373](https://github.com/openapi-ts/openapi-typescript/pull/1373) [`fd3e96f`](https://github.com/openapi-ts/openapi-typescript/commit/fd3e96fb2e68a0d58b326331264809e76ca89672) Thanks [@HugeLetters](https://github.com/HugeLetters)! - Added the option to provide custom fetch function to individual API calls.
702
+
703
+ ## 0.7.9
704
+
705
+ ### Patch Changes
706
+
707
+ - [#1366](https://github.com/openapi-ts/openapi-typescript/pull/1366) [`04dbd6d`](https://github.com/openapi-ts/openapi-typescript/commit/04dbd6d84fffd1d88300421bae25e946f1c303da) Thanks [@drwpow](https://github.com/drwpow)! - Fix empty object being required param
708
+
709
+ - Updated dependencies [[`04dbd6d`](https://github.com/openapi-ts/openapi-typescript/commit/04dbd6d84fffd1d88300421bae25e946f1c303da)]:
710
+ - openapi-typescript-helpers@0.0.4
711
+
712
+ ## 0.7.8
713
+
714
+ ### Patch Changes
715
+
716
+ - [#1360](https://github.com/openapi-ts/openapi-typescript/pull/1360) [`b59e431`](https://github.com/openapi-ts/openapi-typescript/commit/b59e431d1876d1cc60dda5e9b59b6185b0136437) Thanks [@marcomuser](https://github.com/marcomuser)! - Fix CJS build for TypeScript
717
+
718
+ ## 0.7.7
719
+
720
+ ### Patch Changes
721
+
722
+ - Updated dependencies [[`996e51e`](https://github.com/openapi-ts/openapi-typescript/commit/996e51e9b475f4818af77301ed5c0ab458736cb9)]:
723
+ - openapi-typescript-helpers@0.0.3
724
+
725
+ ## 0.7.6
726
+
727
+ ### Patch Changes
728
+
729
+ - [#1332](https://github.com/openapi-ts/openapi-typescript/pull/1332) [`8e8ebfd`](https://github.com/openapi-ts/openapi-typescript/commit/8e8ebfdcd84ff6a3d7b6f5d00695fc11366b436e) Thanks [@drwpow](https://github.com/drwpow)! - Restore original .d.ts module-resolution behavior
730
+
731
+ ## 0.7.5
732
+
733
+ ### Patch Changes
734
+
735
+ - Updated dependencies [[`e63a345`](https://github.com/openapi-ts/openapi-typescript/commit/e63a34561c8137c4cfdef858a2272be32960ca4f)]:
736
+ - openapi-typescript-helpers@0.0.2
737
+
738
+ ## 0.7.4
739
+
740
+ ### Patch Changes
741
+
742
+ - [#1314](https://github.com/openapi-ts/openapi-typescript/pull/1314) [`181c4de`](https://github.com/openapi-ts/openapi-typescript/commit/181c4de395e9c337937f61d6dd5e0ba47954d893) Thanks [@drwpow](https://github.com/drwpow)! - Make headers typing friendlier
743
+
744
+ - [#1314](https://github.com/openapi-ts/openapi-typescript/pull/1314) [`181c4de`](https://github.com/openapi-ts/openapi-typescript/commit/181c4de395e9c337937f61d6dd5e0ba47954d893) Thanks [@drwpow](https://github.com/drwpow)! - Allow unsetting headers
745
+
746
+ ## 0.7.3
747
+
748
+ ### Patch Changes
749
+
750
+ - [#1300](https://github.com/openapi-ts/openapi-typescript/pull/1300) [`5939e20`](https://github.com/openapi-ts/openapi-typescript/commit/5939e20b86ca3019cbc0a1c7f6de2b15a806cf72) Thanks [@drwpow](https://github.com/drwpow)! - Use openapi-typescript-helpers package for types
751
+
752
+ ## 0.7.2
753
+
754
+ ### Patch Changes
755
+
756
+ - [#1242](https://github.com/openapi-ts/openapi-typescript/pull/1242) [`8d11701`](https://github.com/openapi-ts/openapi-typescript/commit/8d11701deb22d47bc8ef04b6210ea6722ecb461b) Thanks [@drwpow](https://github.com/drwpow)! - Fix impossible body typing
757
+
758
+ ## 0.7.1
759
+
760
+ ### Patch Changes
761
+
762
+ - [#1251](https://github.com/openapi-ts/openapi-typescript/pull/1251) [`80717a7`](https://github.com/openapi-ts/openapi-typescript/commit/80717a75ad20f2224a9a61d2a5b3d2b2bbd7c78b) Thanks [@drwpow](https://github.com/drwpow)! - Fix 2XX, 4XX, 5XX responses
763
+
764
+ ## 0.7.0
765
+
766
+ ### Minor Changes
767
+
768
+ - [#1243](https://github.com/openapi-ts/openapi-typescript/pull/1243) [`541abf4`](https://github.com/openapi-ts/openapi-typescript/commit/541abf4966cf6020de5e4bf4b93cfa9741ec9a00) Thanks [@drwpow](https://github.com/drwpow)! - ⚠️ Breaking: rename all methods to UPPERCASE (`GET()`, `POST()`, etc.)
769
+
770
+ ## 0.6.2
771
+
772
+ ### Patch Changes
773
+
774
+ - [#1239](https://github.com/openapi-ts/openapi-typescript/pull/1239) [`4c93067`](https://github.com/openapi-ts/openapi-typescript/commit/4c9306720daa65b1c1977030737a52121fd46668) Thanks [@drwpow](https://github.com/drwpow)! - Fix params.header inference
775
+
776
+ ## 0.6.1
777
+
778
+ ### Patch Changes
779
+
780
+ - [#1192](https://github.com/openapi-ts/openapi-typescript/pull/1192) [`38ee8b4`](https://github.com/openapi-ts/openapi-typescript/commit/38ee8b406ecf07e2dece05c4867a0bc5d27c309d) Thanks [@psychedelicious](https://github.com/psychedelicious)! - Fix header handling for FormData
781
+
782
+ ## 0.6.0
783
+
784
+ ### Minor Changes
785
+
786
+ - [`0380e9a`](https://github.com/openapi-ts/openapi-typescript/commit/0380e9a572f6edfcc6ca1242b7f11abd8fc24610) Thanks [@drwpow](https://github.com/drwpow)! - Add multipart/form-data request body support
787
+
788
+ - [`0380e9a`](https://github.com/openapi-ts/openapi-typescript/commit/0380e9a572f6edfcc6ca1242b7f11abd8fc24610) Thanks [@drwpow](https://github.com/drwpow)! - Breaking: openapi-fetch now just takes the first media type it finds rather than preferring JSON. This is because in the case of `multipart/form-data` vs `application/json`, it’s not inherently clear which you’d want. Or if there were multiple JSON-like media types.
789
+
790
+ ## 0.5.0
791
+
792
+ ### Minor Changes
793
+
794
+ - [#1183](https://github.com/openapi-ts/openapi-typescript/pull/1183) [`431a98f`](https://github.com/openapi-ts/openapi-typescript/commit/431a98f0b6d518aa8e780f063d680d380a8a12dd) Thanks [@psychedelicious](https://github.com/psychedelicious)! - Add global `querySerializer()` option to `createClient()`
795
+
796
+ ### Patch Changes
797
+
798
+ - [#1186](https://github.com/openapi-ts/openapi-typescript/pull/1186) [`cd0a653`](https://github.com/openapi-ts/openapi-typescript/commit/cd0a65354b03fce8a6e28453b8760ac017205df1) Thanks [@drwpow](https://github.com/drwpow)! - Fix CJS build
799
+
800
+ ## 0.4.0
801
+
802
+ ### Minor Changes
803
+
804
+ - [#1176](https://github.com/openapi-ts/openapi-typescript/pull/1176) [`21fb484`](https://github.com/openapi-ts/openapi-typescript/pull/1176/commits/21fb4848f1e70e4423a5f20cae330210b5b813b4) Thanks [@kecrily](https://github.com/kecrily)! - Add CommonJS bundle
805
+
806
+ ## 0.3.0
807
+
808
+ ### Minor Changes
809
+
810
+ - [#1169](https://github.com/openapi-ts/openapi-typescript/pull/1169) [`74bfc0d`](https://github.com/openapi-ts/openapi-typescript/commit/74bfc0d879747790aed7942e11f4b277b9b0428d) Thanks [@drwpow](https://github.com/drwpow)! - Expose createFinalURL() logic for testing
811
+
812
+ - [#1169](https://github.com/openapi-ts/openapi-typescript/pull/1169) [`74bfc0d`](https://github.com/openapi-ts/openapi-typescript/commit/74bfc0d879747790aed7942e11f4b277b9b0428d) Thanks [@drwpow](https://github.com/drwpow)! - Automatically remove `undefined` and `null` query params without requiring querySerializer
813
+
814
+ - [#1169](https://github.com/openapi-ts/openapi-typescript/pull/1169) [`74bfc0d`](https://github.com/openapi-ts/openapi-typescript/commit/74bfc0d879747790aed7942e11f4b277b9b0428d) Thanks [@drwpow](https://github.com/drwpow)! - Allow overriding of JSON body parsing
815
+
816
+ ### Patch Changes
817
+
818
+ - [#1169](https://github.com/openapi-ts/openapi-typescript/pull/1169) [`74bfc0d`](https://github.com/openapi-ts/openapi-typescript/commit/74bfc0d879747790aed7942e11f4b277b9b0428d) Thanks [@drwpow](https://github.com/drwpow)! - Clone response internally
819
+
820
+ - [#1169](https://github.com/openapi-ts/openapi-typescript/pull/1169) [`74bfc0d`](https://github.com/openapi-ts/openapi-typescript/commit/74bfc0d879747790aed7942e11f4b277b9b0428d) Thanks [@drwpow](https://github.com/drwpow)! - Strip trailing slashes from baseUrl
821
+
822
+ - [#1169](https://github.com/openapi-ts/openapi-typescript/pull/1169) [`74bfc0d`](https://github.com/openapi-ts/openapi-typescript/commit/74bfc0d879747790aed7942e11f4b277b9b0428d) Thanks [@drwpow](https://github.com/drwpow)! - Fix querySerializer typing
823
+
824
+ ## 0.2.1
825
+
826
+ ### Patch Changes
827
+
828
+ - [#1139](https://github.com/openapi-ts/openapi-typescript/pull/1139) [`30c01fa`](https://github.com/openapi-ts/openapi-typescript/commit/30c01fa3727a9696166a9bf44dd01693cc354a09) Thanks [@drwpow](https://github.com/drwpow)! - Treat `default` response as error
829
+
830
+ ## 0.2.0
831
+
832
+ ### Minor Changes
833
+
834
+ - 97c8757: Add custom fetch option (#51). Thanks, [@hd-o](https://github.com/hd-o)!
835
+
836
+ ## 0.1.4
837
+
838
+ ### Patch Changes
839
+
840
+ - 63ebe48: Fix request body type when optional (#48)
841
+
842
+ ## 0.1.3
843
+
844
+ ### Patch Changes
845
+
846
+ - 8c01480: Fix querySerializer signature
847
+
848
+ ## 0.1.2
849
+
850
+ ### Patch Changes
851
+
852
+ - e730cd8: Fix post() and options() types
853
+
854
+ ## 0.1.1
855
+
856
+ ### Patch Changes
857
+
858
+ - 5d1fb7d: Fix bad HTTP method lookup causing polymorphsim
859
+
860
+ ## 0.1.0
861
+
862
+ ### Minor Changes
863
+
864
+ - f878cd3: Add querySerializer
865
+
866
+ ### Patch Changes
867
+
868
+ - 22197a1: Add missing type defs for minified build
869
+ - ff3174a: Fix type inference bugs
870
+ - 4ce3828: Skip parsing JSON for empty responses (#23)
871
+ - ff3ae1b: Skip parsing JSON for 204 responses (#28)
872
+
873
+ ## 0.0.8
874
+
875
+ ### Patch Changes
876
+
877
+ - 8e7cb46: Fix TypeScript lib error, simplify generated types
878
+
879
+ ## 0.0.7
880
+
881
+ ### Patch Changes
882
+
883
+ - fce1546: Support "application/json;charset=utf-8" content types (#15). Thanks, [@shinzui](https://github.com/shinzui)!
884
+ - 0899e0e: Add minified build (#18)
885
+
886
+ ## 0.0.6
887
+
888
+ ### Patch Changes
889
+
890
+ - 27c149c: Fix data, error sometimes returning undefined
891
+
892
+ ## 0.0.5
893
+
894
+ ### Patch Changes
895
+
896
+ - c818e65: Export BaseParams shared type (#8)
897
+
898
+ ## 0.0.4
899
+
900
+ ### Patch Changes
901
+
902
+ - ce99563: Fix optional requestBody in path
903
+
904
+ ## 0.0.3
905
+
906
+ ### Patch Changes
907
+
908
+ - b69cb51: Autocomplete URLs by path ([#2](https://github.com/drwpow/openapi-fetch/pull/2)). Thanks, [@mitchell-merry](https://github.com/mitchell-merry)!
909
+
910
+ ## 0.0.2
911
+
912
+ ### Patch Changes
913
+
914
+ - 5a47464: Fix module entry
915
+
916
+ ## 0.0.1
917
+
918
+ ### Patch Changes
919
+
920
+ - 55d7013: Encode path params