@povio/openapi-codegen-cli 0.5.4 → 0.5.6
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/README.md +1 -0
- package/dist/commands/generate.d.ts +1 -1
- package/dist/generators/utils/openapi.utils.d.ts +5 -3
- package/dist/generators/utils/string.utils.d.ts +1 -0
- package/dist/index.js +41 -41
- package/dist/sh.js +57 -57
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,6 +42,7 @@ yarn openapi-codegen generate --input http://localhost:3001/docs-json --standalo
|
|
|
42
42
|
--verbose Show log messages during execution
|
|
43
43
|
--standalone Add any missing classes or types—e.g., REST client class, React Query type extensions, etc. (default: false)
|
|
44
44
|
--baseUrl (Standalone mode only) Base URL for the REST client; falls back to the one defined in the OpenAPI spec
|
|
45
|
+
--replaceOptionalWithNullish Replace all `.optional()` zod chains wtih `.nullish()`
|
|
45
46
|
```
|
|
46
47
|
|
|
47
48
|
#### Check command (checks if OpenAPI spec is compliant)
|
|
@@ -3,5 +3,5 @@ export type GenerateParams = {
|
|
|
3
3
|
excludeTags: string;
|
|
4
4
|
prettier: boolean;
|
|
5
5
|
verbose: boolean;
|
|
6
|
-
} & Pick<GenerateOptions, "input" | "output" | "includeNamespaces" | "splitByTags" | "defaultTag" | "removeOperationPrefixEndingWith" | "importPath" | "extractEnums" | "standalone" | "baseUrl">;
|
|
6
|
+
} & Pick<GenerateOptions, "input" | "output" | "includeNamespaces" | "splitByTags" | "defaultTag" | "removeOperationPrefixEndingWith" | "importPath" | "extractEnums" | "standalone" | "baseUrl" | "replaceOptionalWithNullish">;
|
|
7
7
|
export declare function generate({ input, excludeTags, prettier, verbose, ...params }: GenerateParams): Promise<void>;
|
|
@@ -17,14 +17,16 @@ export declare function isParamMediaTypeAllowed(mediaType: string): mediaType is
|
|
|
17
17
|
export declare function isMainResponseStatus(status: number): boolean;
|
|
18
18
|
export declare function isErrorStatus(status: number): boolean;
|
|
19
19
|
export declare function isMediaTypeAllowed(mediaType: string): boolean;
|
|
20
|
-
export declare function getOperationName({ path, method, operation, options,
|
|
20
|
+
export declare function getOperationName({ path, method, operation, options, tag, keepOperationTag, keepOperationPrefix, }: {
|
|
21
21
|
path: string;
|
|
22
22
|
method: string;
|
|
23
23
|
operation: OperationObject;
|
|
24
24
|
options: GenerateOptions;
|
|
25
|
-
|
|
25
|
+
tag: string;
|
|
26
|
+
keepOperationTag?: boolean;
|
|
27
|
+
keepOperationPrefix?: boolean;
|
|
26
28
|
}): string;
|
|
27
|
-
export declare function getUniqueOperationName({
|
|
29
|
+
export declare function getUniqueOperationName({ operationsByTag, ...params }: {
|
|
28
30
|
path: string;
|
|
29
31
|
method: string;
|
|
30
32
|
operation: OperationObject;
|
|
@@ -10,3 +10,4 @@ export declare const getMostCommonAdjacentCombinationSplit: (strs: string[]) =>
|
|
|
10
10
|
export declare const splitByUppercase: (str: string) => string[];
|
|
11
11
|
export declare const camelToSpaceSeparated: (text: string) => string;
|
|
12
12
|
export declare const getAdjacentStringCombinations: (strs: string[], ignoreStrs?: string[]) => string[];
|
|
13
|
+
export declare const removeWord: (source: string, wordToRemove: string) => string;
|