Skip to content
This repository was archived by the owner on May 22, 2023. It is now read-only.

Commit a138f87

Browse files
committed
v0.1.0
1 parent 22197a1 commit a138f87

9 files changed

+16
-29
lines changed

.changeset/honest-mayflies-listen.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/mean-nails-brush.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/rare-adults-wait.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/rotten-coats-dream.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/strange-chefs-mix.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# openapi-fetch
22

3+
## 0.1.0
4+
5+
### Minor Changes
6+
7+
- f878cd3: Add querySerializer
8+
9+
### Patch Changes
10+
11+
- 22197a1: Add missing type defs for minified build
12+
- ff3174a: Fix type inference bugs
13+
- 4ce3828: Skip parsing JSON for empty responses (#23)
14+
- ff3ae1b: Skip parsing JSON for 204 responses (#28)
15+
316
## 0.0.8
417

518
### Patch Changes

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,9 @@ const { data, error } = await post('/create-post', {
147147

148148
Note in the `get()` example, the URL was actually `/post/{post_id}`, _not_ `/post/my-post`. The URL matched the OpenAPI schema definition rather than the final URL. This library will replace the path param correctly for you, automatically.
149149

150-
### Query Parameters
150+
### 🔀 Parameter Serialization
151151

152-
To customise the query parameters serialization pass in a `querySerializer` function to any fetch
153-
method (get, post, etc):
152+
In the spirit of being lightweight, this library only uses [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) to [serialize parameters](https://swagger.io/docs/specification/serialization/). So for complex query param types (e.g. arrays) you’ll need to provide your own `querySerializer()` method that transforms query params into a URL-safe string:
154153

155154
```ts
156155
import createClient from 'openapi-fetch';

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openapi-fetch",
3-
"version": "0.0.8",
3+
"version": "0.1.0",
44
"author": {
55
"name": "Drew Powers",
66
"email": "[email protected]"

schema.ts

Whitespace-only changes.

0 commit comments

Comments
 (0)