@openapi-qraft/cli 2.0.0-next.13 → 2.0.0-next.14
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 +16 -0
- package/README.md +3 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @openapi-qraft/cli
|
|
2
2
|
|
|
3
|
+
## 2.0.0-next.14
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 54fd011: Changed the exports from the schema file to include only the essential types: `$defs`, `paths`, `components`, `operations`, `webhooks`. This adjustment improves the development experience by preventing the export of all schema types, which could result in an excessive number of exported types, complicating development and reducing clarity.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 7ab718b: Enhanced the `--explicit-import-extensions` option to support `.ts` in addition to `.js`, making it easier for projects using TypeScript to explicitly specify import extensions.
|
|
12
|
+
- Updated dependencies [7ab718b]
|
|
13
|
+
- Updated dependencies [54fd011]
|
|
14
|
+
- Updated dependencies [34ff132]
|
|
15
|
+
- @openapi-qraft/tanstack-query-react-plugin@2.0.0-next.14
|
|
16
|
+
- @openapi-qraft/openapi-typescript-plugin@1.2.0-next.14
|
|
17
|
+
- @openapi-qraft/plugin@2.0.0-next.14
|
|
18
|
+
|
|
3
19
|
## 2.0.0-next.13
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ Options:
|
|
|
38
38
|
--service-name-base <endpoint[<index>] | tags> Use OpenAPI Operation `endpoint[<index>]` path part (e.g.: "/0/1/2") or `tags` as the base name of the service. (default: "endpoint[0]")
|
|
39
39
|
--file-header <string> Header to be added to the generated file (eg: /* eslint-disable */)
|
|
40
40
|
--openapi-types-import-path <path> Path to schema types file (.d.ts), eg: "../schema.d.ts"
|
|
41
|
-
--explicit-import-extensions
|
|
41
|
+
--explicit-import-extensions [extension] All import statements will contain an explicit file extension. Ideal for projects using ECMAScript modules. (choices: ".js", ".ts", preset: ".js")
|
|
42
42
|
--export-openapi-types [bool] Export the OpenAPI schema types from the generated `./index.ts` file (default: true)
|
|
43
43
|
--operation-generics-import-path <path> Path to operation generics file (default: "@openapi-qraft/react")
|
|
44
44
|
--openapi-types-file-name <path> OpenAPI Schema types file name, eg: "schema.d.ts" (default: "schema.ts")
|
|
@@ -145,7 +145,8 @@ npx openapi-qraft --plugin tanstack-query-react --plugin openapi-typescript http
|
|
|
145
145
|
- `--service-name-base tags` will generate services based on the OpenAPI Operation tags instead of the endpoint.
|
|
146
146
|
- If multiple tags are present for the operation, similar services will be created for each tag. Operation with `tags: [Foo, Bar]` will generate `services/FooService.ts` and `services/BarService.ts`.
|
|
147
147
|
- If there are no tags for the operation, the services will be created under the `default` tag. Operation with empty `tags: []` will generate `services/DefaultService.ts`.
|
|
148
|
-
- **`--explicit-import-extensions
|
|
148
|
+
- **`--explicit-import-extensions [extension]`**: All import statements will contain an explicit file extension. Ideal for projects using ECMAScript modules
|
|
149
|
+
when TypeScript's _--moduleResolution_ is `node16` or `nodenext`. Choices: `.js`, `.ts`, preset: `.js`. _(optional)_
|
|
149
150
|
- **`--file-header <string>`:** Add a custom header to each generated file, useful for disabling linting rules or adding file
|
|
150
151
|
comments _(optional)_.
|
|
151
152
|
- Example: `--file-header '/* eslint-disable */'`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openapi-qraft/cli",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.14",
|
|
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.0-next.
|
|
19
|
-
"@openapi-qraft/plugin": "2.0.0-next.
|
|
20
|
-
"@openapi-qraft/tanstack-query-react-plugin": "2.0.0-next.
|
|
18
|
+
"@openapi-qraft/openapi-typescript-plugin": "1.2.0-next.14",
|
|
19
|
+
"@openapi-qraft/plugin": "2.0.0-next.14",
|
|
20
|
+
"@openapi-qraft/tanstack-query-react-plugin": "2.0.0-next.14",
|
|
21
21
|
"commander": "^11.1.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|