Skip to content

Commit d5a8eed

Browse files
committed
Update bench docs
1 parent d533e8f commit d5a8eed

File tree

4 files changed

+263
-12
lines changed

4 files changed

+263
-12
lines changed

docs/openapi-fetch/index.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ openapi-fetch is a type-safe fetch client that pulls in your OpenAPI schema. Wei
88

99
| Library | Size (min) | “GET” request\* |
1010
| :------------------------- | ---------: | :------------------------- |
11-
| openapi-fetch | `5 kB` | `300k` ops/s (fastest) |
12-
| openapi-typescript-fetch | `4 kB` | `150k` ops/s (2× slower) |
13-
| feature-fetch | `15 kB` | `300k` ops/s (not slower) |
11+
| openapi-fetch | `6 kB` | `300k` ops/s (fastest) |
12+
| openapi-typescript-fetch | `3 kB` | `300k` ops/s (fastest) |
13+
| feature-fetch | `15 kB` | `300k` ops/s (fastest) |
1414
| axios | `32 kB` | `225k` ops/s (1.3× slower) |
1515
| superagent | `55 kB` | `50k` ops/s (6× slower) |
1616
| openapi-typescript-codegen | `367 kB` | `100k` ops/s (3× slower) |
@@ -178,7 +178,9 @@ If you prefer selecting the path as a property, you can create a path based clie
178178
import { createPathBasedClient } from "openapi-fetch";
179179
import type { paths } from "./my-openapi-3-schema"; // generated by openapi-typescript
180180

181-
const client = createPathBasedClient<paths>({ baseUrl: "https://myapi.dev/v1" });
181+
const client = createPathBasedClient<paths>({
182+
baseUrl: "https://myapi.dev/v1",
183+
});
182184

183185
client["/blogposts/{post_id}"].GET({
184186
params: { post_id: "my-post" },

packages/openapi-fetch/README.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ openapi-fetch is a type-safe fetch client that pulls in your OpenAPI schema. Wei
44

55
| Library | Size (min) | “GET” request\* |
66
| :------------------------- | ---------: | :------------------------- |
7-
| openapi-fetch | `5 kB` | `300k` ops/s (fastest) |
8-
| openapi-typescript-fetch | `4 kB` | `150k` ops/s (2× slower) |
7+
| openapi-fetch | `6 kB` | `300k` ops/s (fastest) |
8+
| openapi-typescript-fetch | `3 kB` | `300k` ops/s (fastest) |
9+
| feature-fetch | `15 kB` | `300k` ops/s (fastest) |
910
| axios | `32 kB` | `225k` ops/s (1.3× slower) |
1011
| superagent | `55 kB` | `50k` ops/s (6× slower) |
1112
| openapi-typescript-codegen | `367 kB` | `100k` ops/s (3× slower) |
@@ -59,7 +60,7 @@ npm i -D openapi-typescript typescript
5960
```
6061

6162
> **Highly recommended**
62-
>
63+
>
6364
> Enable [noUncheckedIndexedAccess](https://www.typescriptlang.org/tsconfig#noUncheckedIndexedAccess) in your `tsconfig.json` ([docs](/advanced#enable-nouncheckedindexaccess-in-your-tsconfigjson))
6465
6566
Next, generate TypeScript types from your OpenAPI schema using openapi-typescript:
@@ -81,7 +82,7 @@ Lastly, be sure to **run typechecking** in your project. This can be done by add
8182
And run `npm run test:ts` in your CI to catch type errors.
8283

8384
> **TIP:**
84-
>
85+
>
8586
> Use `tsc --noEmit` to check for type errors rather than relying on your linter or your build command. Nothing will typecheck as accurately as the TypeScript compiler itself.
8687
8788
## Basic usage
@@ -118,4 +119,4 @@ const { data, error } = await client.PUT("/blogposts", {
118119

119120
## 📓 Docs
120121

121-
[View Docs](https://openapi-ts.dev/openapi-fetch/)
122+
[View Docs](https://openapi-ts.dev/openapi-fetch/)

packages/openapi-fetch/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"devDependencies": {
7373
"axios": "^1.7.4",
7474
"del-cli": "^5.1.0",
75-
"esbuild": "^0.20.2",
75+
"esbuild": "^0.23.0",
7676
"execa": "^8.0.1",
7777
"feature-fetch": "^0.0.15",
7878
"msw": "^2.3.1",

0 commit comments

Comments
 (0)