NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #4217 most downloaded on npm
Fast, type-safe fetch client for your OpenAPI schema. Only 6 kb (min). Works with React, Vue, Svelte, or vanilla JS.
Last release 7 months ago
11 Feb 2026
Release timing varies
gaps range from 1 weeks to 5 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
4 years old
81 releases · first in 2023
One column per quarter.
Updated dependencies \[`a690e52`]:
a690e52 Thanks @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.#2572 9350ddf Thanks @luis-guideti! - Do not treat Content-Length=0 as empty when Transfer-Encoding is chunked
Updated dependencies [a690e52]:
### Minor Changes - #2362 `9002418` Thanks @luxass! - Added support for setting a custom path serializers either globally or per request. This allows
9002418 Thanks @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.### Patch Changes - #2508 `89843b0` Thanks @srbarba! - Use text() when no content-length is provided to avoid errors parsing empty bodies (200 with no
### Minor Changes - #2465 `8f96eb5` Thanks @Kauabunga! - Enable request level middlewares option
8f96eb5 Thanks @Kauabunga! - Enable request level middlewares option### Patch Changes - #2407 `7527d1e` Thanks @jthacker! - Fix Request parameter being ignored by client methods
### Minor Changes - #2310 `e66b5ce` Thanks @drwpow! - Build package with unbuild. Also remove the minified version (openapi-fetch is only useful in a
### Patch Changes - #2096 `0058128` Thanks @obulat! - Encode the request body if Content-Type header is x-www-form-urlencoded - #2157 `419d9ac` Thanks
### Patch Changes - #2256 `30c6da8` Thanks @KajSzy! - fix dynamic access to methods using wrapAsPathBasedClient
### Patch Changes - #2205 `4966560` Thanks @live-small! - Fix HEAD method requests to prevent body parsing regardless of Content-Length header value
4966560 Thanks @live-small! - Fix HEAD method requests to prevent body parsing regardless of Content-Length header value### Patch Changes - #2091 `ebe56f3` Thanks @p-dubovitsky! - Allow returning Response from onRequest callback
ebe56f3 Thanks @p-dubovitsky! - Allow returning Response from onRequest callback### Patch Changes - #2063 `5935cd2` Thanks @kerwanp! - add support for arbitrary method
Refresh of 0.13.2; corrupted package
Refresh of 0.13.2; corrupted package
### Patch Changes - #2020 `7081842` Thanks @mellster2012! - Add client option to pass custom RequestInit object into fetch requests for supported impl
7081842 Thanks @mellster2012! - Add client option to pass custom RequestInit object into fetch requests for supported implementations### Patch Changes - #1974 `35c576c` Thanks @luchsamapparat! - add onError handler to middleware
35c576c Thanks @luchsamapparat! - add onError handler to middleware### Minor Changes - #1968 `267977e` Thanks @DjordyKoert! - 204 responses or response with a Content-Length of 0 will now return undefined instead of a
267977e Thanks @DjordyKoert! - 204 responses or response with a Content-Length of 0 will now return undefined instead of an empty objectUpdated dependencies \[`06163a2`]:
#1937 06163a2 Thanks @DjordyKoert! - client data & error now return a union of possible types
Updated dependencies [06163a2]:
Updated dependencies \[`abfad56`]:
abfad56]:
### Patch Changes - #1936 `d14aa65` Thanks @BlakeSzabo! - Fix multiple empty arrays in query params appending extra ampersands
d14aa65 Thanks @BlakeSzabo! - Fix multiple empty arrays in query params appending extra ampersands### Patch Changes - #1918 `e39d11e` Thanks @yicrotkd! - Improve Middleware type definition to require either onRequest or onResponse
### Patch Changes - #1907 `efaa1e2` Thanks @tobiasdcl! - allow usage of custom Request class
efaa1e2 Thanks @tobiasdcl! - allow usage of custom Request class⚠️ Breaking Change #1826 `b893c44` Thanks @goce-cz! - Do not set content-type on body-less requests
### Patch Changes - #1825 `6038f8f` Thanks @goce-cz! - Allow falsy values (except undefined) as a valid body
### Patch Changes - #1817 `2a4b067` Thanks @Gruak! - Allow specifying baseUrl per request - #1842 `0e42cbb` Thanks @gzm0! - fix: allow use of PathBase
Updated dependencies \[`cec023d`]:
#1831 091e71a Thanks @SebastienGllmt! - Add MethodResponse utility type to easily get the return type of an endpoint on a client
#1833 cec023d Thanks @ngraef! - Fix identification of required properties when strictNullChecks is disabled
Updated dependencies [cec023d]:
### Minor Changes - #1791 `a956d5d` Thanks @gzm0! - Add support for client["/endpoint"].GET() style calls
-- ⚠️ Breaking Change #1791 a956d5d Thanks @gzm0! - Add support for client["/endpoint"].GET() style calls
### Patch Changes - #1809 `f21c05b` Thanks @gzm0! - perf: remove unnecessary async keywords (for reduced code size) - #1827 `ba0d595` Thanks @ngraef!
### Patch Changes - #1762 `7698546` Thanks @thatsprettyfaroutman! - Allow FormData through defaultBodySerializer
7698546 Thanks @thatsprettyfaroutman! - Allow FormData through defaultBodySerializerUpdated dependencies \[`bcc9222`]:
bcc9222]:
Updated dependencies \[`335530c`]:
### Patch Changes - #1696 `aea31a8` Thanks @swachter! - Fix: encode primitive path parameters
### Patch Changes - #1719 `a8f2253` Thanks @drwpow! - Remove nanoid from dependencies - #1719 `a8f2253` Thanks @drwpow! - Fix "failed to execute fetch
⚠️ Breaking Change: openapi-typescript@7 is needed to work. You’ll get type errors with openapi-typescript@6 and below.
⚠️ Breaking Change: openapi-typescript@7 is needed to work. You’ll get type errors with openapi-typescript@6 and below.
⚠️ Breaking Change: The Middleware API has changed to be an object rather than (request, options) or (response, options). See Middleware docs for updated API.
⚠️ Breaking Change: The Content-Type header is no longer sent by default if a body payload is attached.
⚠️ ~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.~ Edit: this has been reverted due to errors reported in some environments. The 0.9.0 behavior is still present where fetch(input: Request) is called for the final request.
⚠️ Breaking Change: the error type no longer is a union of all possible values; it will take the first it finds (due to some error type in some schemas being missing or incomplete, resulting in an unresolvable union)
id to middleware handlers that create a unique ID per-fetch### Patch Changes - #1697 `e77ce50` Thanks @armandabric! - Expose original request on Middleware.onResponse
e77ce50 Thanks @armandabric! - Expose original request on Middleware.onResponse### Patch Changes - #1672 `64cb619` Thanks @jaredLunde! - Fixes issue where native properties were not excluded from custom properties in the CustomRe
64cb619 Thanks @jaredLunde! - Fixes issue where native properties were not excluded from custom properties in the CustomRequest class### Patch Changes - #1653 `4f4253a` Thanks @FreeAoi! - Let request object have custom properties
### Patch Changes - #1639 `645f436` Thanks @FreeAoi! - fix request option types don't showing optional props correctly
### Patch Changes - #1597 `1f7ad9d` Thanks @armandabric! - Allow to select the response content type - #1585 `4e06f86` Thanks @mikestopcontinues! - Up
#1597 1f7ad9d Thanks @armandabric! - Allow to select the response content type
#1585 4e06f86 Thanks @mikestopcontinues! - Update types for path-methods object
#1610 cc8073b Thanks @illright! - Fix data/error discrimination when there are empty-body errors
### Patch Changes - #1580 `4c0c7fc` Thanks @drwpow! - Fix type errors
### Patch Changes - #1550 `a5a9cc7` Thanks @shirish87! - Fix 'Content-Type' header being removed from requests with multipart/form-data body
a5a9cc7 Thanks @shirish87! - Fix 'Content-Type' header being removed from requests with multipart/form-data body### Patch Changes - #1546 `cc64453` Thanks @drwpow! - Fix JSON consuming body
Updated dependencies [`c6d945b`]:
#1521 fc3a468 Thanks @drwpow! - ⚠️ Breaking change (internal): fetch() is now called with new Request() to support middleware (which may affect test mocking)
#1521 2551e4b Thanks @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!
#1534 2bbeb92 Thanks @drwpow! - ⚠️ Breaking change: no longer supports deeply-nested objects/arrays for query & path serialization.
#1479 c6d945b Thanks @darwish! - Fixed build of openapi-typescript-helpers for CommonJS environments
#1534 2bbeb92 Thanks @drwpow! - Add support for automatic label & matrix path serialization.
#1534 2bbeb92 Thanks @drwpow! - Remove leading question marks from querySerializer
#1530 4765658 Thanks @wydengyre! - Exports the ClientMethod utility type.
Updated dependencies [c6d945b]:
Nothing published for this version
Nothing published for this version
Updated dependencies [`5be2082`]:
### Patch Changes - #1404 `93204e4` Thanks @drwpow! - Fix behavior for empty arrays and objects in default querySerializer
### Minor Changes - #1399 `4fca1e4` Thanks @drwpow! - ⚠️ Breaking: change default querySerializer behavior to produce style: form, explode: true query
4fca1e4 Thanks @drwpow! - ⚠️ Breaking: change default querySerializer behavior to produce style: form, explode: true query params according to the OpenAPI specification. Also adds support for deepObjects (square bracket style).Nothing published for this version
### Patch Changes - #1373 `fd3e96f` Thanks @HugeLetters! - Added the option to provide custom fetch function to individual API calls.
fd3e96f Thanks @HugeLetters! - Added the option to provide custom fetch function to individual API calls.Updated dependencies [`04dbd6d`]:
### Patch Changes - #1360 `b59e431` Thanks @marcomuser! - Fix CJS build for TypeScript
b59e431 Thanks @marcomuser! - Fix CJS build for TypeScript## 0.7.7 ### Patch Changes - #1357 `996e51e` Thanks @muttonchop! - adds 500-511 error status codes
996e51e]:
### Patch Changes - #1332 `8e8ebfd` Thanks @drwpow! - Restore original .d.ts module-resolution behavior
Updated dependencies [`e63a345`]:
e63a345]:
### Patch Changes - #1314 `181c4de` Thanks @drwpow! - Make headers typing friendlier - #1314 `181c4de` Thanks @drwpow! - Allow unsetting headers
### Patch Changes - #1300 `5939e20` Thanks @drwpow! - Use openapi-typescript-helpers package for types
### Patch Changes - #1242 `8d11701` Thanks @drwpow! - Fix impossible body typing
### Patch Changes - #1251 `80717a7` Thanks @drwpow! - Fix 2XX, 4XX, 5XX responses
### Minor Changes - #1243 `541abf4` Thanks @drwpow! - ⚠️ Breaking: rename all methods to UPPERCASE (GET(), POST(), etc.)
Nothing published for this version
### Patch Changes - #1239 `4c93067` Thanks @drwpow! - Fix params.header inference
Your coding agent can read these notes before it upgrades. Set up the MCP server →