@kubb/plugin-react-query 5.0.0-beta.31 → 5.0.0-beta.33

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.
Files changed (2) hide show
  1. package/extension.yaml +6 -29
  2. package/package.json +8 -8
package/extension.yaml CHANGED
@@ -317,31 +317,6 @@ options:
317
317
  }),
318
318
  ],
319
319
  })
320
- - name: contentType
321
- type: "'application/json' | (string & {})"
322
- required: false
323
- description: |
324
- Selects which request/response media type the generator reads from the OpenAPI spec.
325
-
326
- When omitted, Kubb picks the first JSON-compatible media type it finds (`application/json`, `application/vnd.api+json`, anything ending in `+json`). Set this when your spec defines multiple media types for the same operation and you want a non-default one.
327
- examples:
328
- - name: JSON API media type
329
- files:
330
- - lang: typescript
331
- twoslash: false
332
- code: |
333
- import { defineConfig } from 'kubb'
334
- import { pluginTs } from '@kubb/plugin-ts'
335
-
336
- export default defineConfig({
337
- input: { path: './petStore.yaml' },
338
- output: { path: './src/gen' },
339
- plugins: [
340
- pluginTs({
341
- contentType: 'application/vnd.api+json',
342
- }),
343
- ],
344
- })
345
320
  - name: group
346
321
  type: Group
347
322
  required: false
@@ -1046,13 +1021,13 @@ options:
1046
1021
  - name: methods
1047
1022
  type: Array<HttpMethod>
1048
1023
  required: false
1049
- default: "['post', 'put', 'delete']"
1024
+ default: "['post', 'put', 'patch', 'delete']"
1050
1025
  description: |
1051
1026
  HTTP methods treated as mutations. Operations using one of these methods generate a `useMutation`-style hook instead of a query.
1052
1027
 
1053
- Defaults to `['post', 'put', 'delete']`. Add `'patch'` if your API uses it for partial updates.
1028
+ Defaults to `['post', 'put', 'patch', 'delete']`. Narrow the list if your API uses one of these methods for reads.
1054
1029
  examples:
1055
- - name: Include PATCH as a mutation
1030
+ - name: Treat only POST and PUT as mutations
1056
1031
  files:
1057
1032
  - lang: typescript
1058
1033
  twoslash: false
@@ -1065,7 +1040,7 @@ options:
1065
1040
  output: { path: './src/gen' },
1066
1041
  plugins: [
1067
1042
  pluginReactQuery({
1068
- mutation: { methods: ['post', 'put', 'patch', 'delete'] },
1043
+ mutation: { methods: ['post', 'put'] },
1069
1044
  }),
1070
1045
  ],
1071
1046
  })
@@ -1385,7 +1360,9 @@ options:
1385
1360
  | --- | --- |
1386
1361
  | `@kubb/plugin-ts` | `resolverTs` |
1387
1362
  | `@kubb/plugin-zod` | `resolverZod` |
1363
+ | `@kubb/plugin-faker` | `resolverFaker` |
1388
1364
  | `@kubb/plugin-cypress` | `resolverCypress` |
1365
+ | `@kubb/plugin-msw` | `resolverMsw` |
1389
1366
  | `@kubb/plugin-mcp` | `resolverMcp` |
1390
1367
  | `@kubb/plugin-client` | `resolverClient` |
1391
1368
  codeBlock:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-react-query",
3
- "version": "5.0.0-beta.31",
3
+ "version": "5.0.0-beta.33",
4
4
  "description": "Generate type-safe TanStack Query (React Query) hooks from your OpenAPI specification. Covers useQuery, useMutation, useInfiniteQuery, and queryOptions with full TypeScript support.",
5
5
  "keywords": [
6
6
  "code-generation",
@@ -68,12 +68,12 @@
68
68
  "registry": "https://registry.npmjs.org/"
69
69
  },
70
70
  "dependencies": {
71
- "@kubb/core": "5.0.0-beta.31",
72
- "@kubb/renderer-jsx": "5.0.0-beta.31",
73
- "remeda": "^2.34.1",
74
- "@kubb/plugin-client": "5.0.0-beta.31",
75
- "@kubb/plugin-ts": "5.0.0-beta.31",
76
- "@kubb/plugin-zod": "5.0.0-beta.31"
71
+ "@kubb/core": "5.0.0-beta.33",
72
+ "@kubb/renderer-jsx": "5.0.0-beta.33",
73
+ "remeda": "^2.36.0",
74
+ "@kubb/plugin-client": "5.0.0-beta.33",
75
+ "@kubb/plugin-ts": "5.0.0-beta.33",
76
+ "@kubb/plugin-zod": "5.0.0-beta.33"
77
77
  },
78
78
  "devDependencies": {
79
79
  "@internals/shared": "0.0.0",
@@ -81,7 +81,7 @@
81
81
  "@internals/utils": "0.0.0"
82
82
  },
83
83
  "peerDependencies": {
84
- "@kubb/renderer-jsx": "5.0.0-beta.31"
84
+ "@kubb/renderer-jsx": "5.0.0-beta.33"
85
85
  },
86
86
  "size-limit": [
87
87
  {