@kubb/plugin-client 6.0.1 → 6.0.2
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/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/docs/guides/calling-operations.md +2 -0
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -13,6 +13,8 @@ const pet = await getPetById({ path: { petId: 1 } })
|
|
|
13
13
|
|
|
14
14
|
The examples set [`integerType: 'number'`](https://kubb.dev/extensions/kubb-labs/adapter-oas/options#integertype) on the adapter, so an `int64` id such as `petId` is a `number`. With the default it is a `bigint` and the call takes `1n`.
|
|
15
15
|
|
|
16
|
+
Path keys keep the names from the spec, so a `{pet-id}` placeholder is passed as `path: { 'pet-id': 1 }`. Set [`pathParamsCasing: 'camelcase'`](https://kubb.dev/extensions/kubb-labs/adapter-oas/options#pathparamscasing) on the adapter (`@kubb/adapter-oas` 5.20.0 or later) to pass `path: { petId: 1 }` instead, the name MSW handlers and query keys already use. The HTTP request stays the same.
|
|
17
|
+
|
|
16
18
|
The keys are `path`, `query`, `headers`, `cookies`, and `body`. Kubb types each from the spec, so a wrong key or value fails at compile time.
|
|
17
19
|
|
|
18
20
|
## Errors
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-client",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.2",
|
|
4
4
|
"description": "Generate typed API operations against your own client module.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api-client",
|
|
@@ -61,10 +61,10 @@
|
|
|
61
61
|
"registry": "https://registry.npmjs.org/"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@kubb/kit": "^5.
|
|
65
|
-
"@kubb/plugin-ts": "^5.5.
|
|
66
|
-
"@kubb/plugin-zod": "^5.9.
|
|
67
|
-
"@kubb/renderer-jsx": "^5.
|
|
64
|
+
"@kubb/kit": "^5.19.0",
|
|
65
|
+
"@kubb/plugin-ts": "^5.5.2",
|
|
66
|
+
"@kubb/plugin-zod": "^5.9.2",
|
|
67
|
+
"@kubb/renderer-jsx": "^5.19.0"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@internals/client": "0.0.0",
|