You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'@openapi-qraft/tanstack-query-react-plugin': minor
3
+
---
4
+
5
+
Added an optional `--root-security` flag that applies the OpenAPI document’s top-level `security` as the default for operations that omit their own `security`, while any operation-level `security` still overrides it as defined by the specification.
--explicit-import-extensions [extension] All import statements will contain an explicit file extension. Ideal for projects using ECMAScript modules. (choices: ".js", ".ts", preset: ".js")
118
118
--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 when --plugin openapi-typescript is used.
119
119
--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.
120
+
--root-security Use root-level OpenAPI security as the default for operations without their own security. Operation-level security overrides it according to OpenAPI semantics.
120
121
--create-api-client-fn <functionName> [options...] Configure API client creation function. Allows specifying the function name, included services, and callbacks. Can be specified multiple times to generate several different API client functions from a single OpenAPI document. (default: null)
121
122
--override-import-type <pathname overrides...> Override import paths for specific types in generated files. This allows using custom type implementations instead of the default ones. Expected format: filepath originalModule:importTypeName:customImportPath
122
123
--operation-parameters-type-wrapper <parameters wrappers...> Configure ParametersWrapper types for specific operation patterns. Expected format: pattern type:TypeName import:ImportPath. Can be specified multiple times for different patterns.
--explicit-import-extensions [extension] All import statements will contain an explicit file extension. Ideal for projects using ECMAScript modules. (choices: ".js", ".ts", preset: ".js")
215
216
--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 when --plugin openapi-typescript is used. (default: true)
216
217
--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.
218
+
--root-security Use root-level OpenAPI security as the default for operations without their own security. Operation-level security overrides it according to OpenAPI semantics.
217
219
--create-api-client-fn <functionName> [options...] Configure API client creation function. Allows specifying the function name, included services, and callbacks. Can be specified multiple times to generate several different API client functions from a single OpenAPI document. (default: null)
218
220
--override-import-type <pathname overrides...> Override import paths for specific types in generated files. This allows using custom type implementations instead of the default ones. Expected format: filepath originalModule:importTypeName:customImportPath
219
221
--operation-parameters-type-wrapper <parameters wrappers...> Configure ParametersWrapper types for specific operation patterns. Expected format: pattern type:TypeName import:ImportPath. Can be specified multiple times for different patterns.
Copy file name to clipboardExpand all lines: packages/openapi-cli/README.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,7 @@ Options:
36
36
example: "post /**:[A-Za-z]+Id ==> createOne"
37
37
--postfix-services <string> Postfix to be added to the generated service name (eg: Service)
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
+
--root-security Use root-level OpenAPI security as the default for operations without their own security. Operation-level security overrides it according to OpenAPI semantics.
39
40
--file-header <string> Header to be added to the generated file (eg: /* eslint-disable */)
40
41
--redocly [config] Use the Redocly configuration to generate multiple API clients
41
42
If the [config] parameter is not specified, the default Redocly configuration will be used: [redocly.yaml | redocly.yml | .redocly.yaml |
@@ -210,6 +211,9 @@ The following plugins are currently supported:
-**`--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. _(optional, default: `true`, if `--plugin openapi-typescript` is used)_
214
+
-**`--root-security`**: Use root-level OpenAPI `security` as the default for operations that do not define their own `security`. Operation-level `security` overrides it according to OpenAPI semantics. _(optional, disabled by default)_
215
+
- Use this option when your OpenAPI document defines `security` on the top level and you want generated operation schemas to include those security requirements automatically.
216
+
- Without this option, only operation-level `security` is emitted into generated schemas.
0 commit comments