@openapi-qraft/cli 2.4.0 → 2.5.0-beta.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @openapi-qraft/cli
2
2
 
3
+ ## 2.5.0-beta.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [8b7e980]
8
+ - @openapi-qraft/tanstack-query-react-plugin@2.5.0-beta.0
9
+ - @openapi-qraft/plugin@2.5.0-beta.0
10
+ - @openapi-qraft/openapi-typescript-plugin@1.2.15-beta.0
11
+
12
+ ## 2.4.1
13
+
14
+ ### Patch Changes
15
+
16
+ - @openapi-qraft/plugin@2.4.1
17
+ - @openapi-qraft/tanstack-query-react-plugin@2.4.1
18
+ - @openapi-qraft/openapi-typescript-plugin@1.2.14
19
+
3
20
  ## 2.4.0
4
21
 
5
22
  ### Minor Changes
package/README.md CHANGED
@@ -43,6 +43,7 @@ Options:
43
43
  --openapi-types-import-path <path> Path to schema types file (.d.ts), e.g.: "../schema.d.ts"
44
44
  --explicit-import-extensions [extension] All import statements will contain an explicit file extension. Ideal for projects using ECMAScript modules. (choices: ".js", ".ts", preset: ".js")
45
45
  --export-openapi-types [bool] Add an export statement of the generated OpenAPI document types from the `./index.ts' file. Useful for sharing types within your project. (default: true)
46
+ --queryable-write-operations [bool] Enable generation of query hooks (useQuery, useSuspenseQuery, etc.) for writable HTTP methods like POST, PUT, PATCH. By default, only mutation hooks are generated for writable operations.
46
47
  --openapi-types-file-name <path> OpenAPI Schema types file name, e.g.: "schema.d.ts" (default: "schema.ts")
47
48
  --enum Export true TS enums instead of unions
48
49
  --enum-values Export enum values as arrays.
@@ -202,6 +203,8 @@ The following plugins are currently supported:
202
203
 
203
204
  ### `--plugin openapi-typescript` options
204
205
 
206
+ - **`--queryable-write-operations [bool]`**: Enable generation of query hooks (`useQuery`, `useSuspenseQuery`, etc.) for
207
+ writable HTTP methods like _POST_, _PUT_, _PATCH_. By default, only mutation hooks are generated for writable operations.
205
208
  - **`--openapi-types-file-name <path>`**: OpenAPI Schema types file name, e.g., `schema.d.ts` (default: `schema.ts`).
206
209
  - **`--enum`**: Export true TypeScript enums instead of unions.
207
210
  - **`--enum-values`**: Export enum values as arrays.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openapi-qraft/cli",
3
- "version": "2.4.0",
3
+ "version": "2.5.0-beta.0",
4
4
  "description": "CLI for generating typed TanStack Query React Hooks and services from OpenAPI Document, improving type safety in React apps",
5
5
  "scripts": {
6
6
  "build": "tsc --project tsconfig.build.json",
@@ -15,9 +15,9 @@
15
15
  "openapi-qraft": "./bin.mjs"
16
16
  },
17
17
  "dependencies": {
18
- "@openapi-qraft/openapi-typescript-plugin": "1.2.13",
19
- "@openapi-qraft/plugin": "2.4.0",
20
- "@openapi-qraft/tanstack-query-react-plugin": "2.4.0",
18
+ "@openapi-qraft/openapi-typescript-plugin": "1.2.15-beta.0",
19
+ "@openapi-qraft/plugin": "2.5.0-beta.0",
20
+ "@openapi-qraft/tanstack-query-react-plugin": "2.5.0-beta.0",
21
21
  "commander": "^11.1.0"
22
22
  },
23
23
  "devDependencies": {