Skip to content

Fix openapi-fetch reported size (2) #1255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/src/content/docs/openapi-fetch/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Notice **there are no generics, and no manual typing.** Your endpoint’s exact
- ✅ No manual typing of your API
- ✅ Eliminates `any` types that hide bugs
- ✅ Also eliminates `as` type overrides that can also hide bugs
- ✅ All of this in a **1 kB** client package 🎉
- ✅ All of this in a **2 kB** client package 🎉

## Setup

Expand Down
6 changes: 3 additions & 3 deletions packages/openapi-fetch/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<img src="../../docs/public/assets/openapi-fetch.svg" alt="openapi-fetch" width="216" height="40" />

openapi-fetch applies your OpenAPI types to the native fetch API via TypeScript. Weighs **2 kb** and has virtually zero runtime. Works with React, Vue, Svelte, or vanilla JS.
openapi-fetch applies your OpenAPI types to the native fetch API via TypeScript. Weighs **2 kB** and has virtually zero runtime. Works with React, Vue, Svelte, or vanilla JS.

| Library | Size (min) |
| :----------------------------- | ---------: |
| **openapi-fetch** | `2 kB` |
| **openapi-typescript-fetch** | `4 kB` |
| **openapi-typescript-codegen** | `345 kB` |

The syntax is inspired by popular libraries like react-query or Apollo client, but without all the bells and whistles and in a 2 kb package.
The syntax is inspired by popular libraries like react-query or Apollo client, but without all the bells and whistles and in a 2 kB package.

```ts
import createClient from "openapi-fetch";
Expand Down Expand Up @@ -39,7 +39,7 @@ Notice **there are no generics, and no manual typing.** Your endpoint’s exact
- ✅ No manual typing of your API
- ✅ Eliminates `any` types that hide bugs
- ✅ Also eliminates `as` type overrides that can also hide bugs
- ✅ All of this in a **1 kB** client package 🎉
- ✅ All of this in a **2 kB** client package 🎉

## 🔧 Setup

Expand Down