@kubb/plugin-fetch 6.0.1 → 6.0.3
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 +3 -3
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -15,6 +15,8 @@ const { data } = await getPetById({ path: { petId: 1 } })
|
|
|
15
15
|
|
|
16
16
|
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`.
|
|
17
17
|
|
|
18
|
+
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.
|
|
19
|
+
|
|
18
20
|
Query, header, and cookie parameters sit under their own keys, and a request body goes under
|
|
19
21
|
`body`:
|
|
20
22
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-fetch",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.3",
|
|
4
4
|
"description": "Generate a slim, type-safe HTTP client with Kubb based on the native Fetch api.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api-client",
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
"registry": "https://registry.npmjs.org/"
|
|
84
84
|
},
|
|
85
85
|
"dependencies": {
|
|
86
|
-
"@kubb/kit": "^5.
|
|
87
|
-
"@kubb/plugin-client": "^6.0.
|
|
86
|
+
"@kubb/kit": "^5.20.1",
|
|
87
|
+
"@kubb/plugin-client": "^6.0.3"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
90
|
"typescript": "^7.0.2"
|