@povio/openapi-codegen-cli 0.5.7 → 0.5.8
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/dist/generators/core/SchemaResolver.class.d.ts +12 -4
- package/dist/generators/core/zod/getZodSchemasFromOpenAPIDoc.d.ts +6 -2
- package/dist/generators/core/zod/{updateEnumZodSchemaData.d.ts → updateExtractedEnumZodSchemaData.d.ts} +3 -3
- package/dist/index.js +43 -43
- package/dist/sh.js +60 -60
- package/package.json +1 -1
|
@@ -11,6 +11,11 @@ interface SchemaData {
|
|
|
11
11
|
tags: string[];
|
|
12
12
|
}
|
|
13
13
|
export interface EnumZodSchemaData {
|
|
14
|
+
code: string;
|
|
15
|
+
zodSchemaName: string;
|
|
16
|
+
tag?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ExtractedEnumZodSchemaData {
|
|
14
19
|
code: string;
|
|
15
20
|
zodSchemaName?: string;
|
|
16
21
|
tag?: string;
|
|
@@ -27,10 +32,11 @@ export declare class SchemaResolver {
|
|
|
27
32
|
private readonly schemaData;
|
|
28
33
|
private readonly zodSchemaData;
|
|
29
34
|
private readonly compositeZodSchemaData;
|
|
30
|
-
readonly enumZodSchemaData: EnumZodSchemaData[];
|
|
31
35
|
readonly dependencyGraph: DependencyGraph;
|
|
36
|
+
readonly enumZodSchemas: EnumZodSchemaData[];
|
|
32
37
|
readonly operationsByTag: Record<string, OperationObject[]>;
|
|
33
38
|
readonly operationNames: string[];
|
|
39
|
+
extractedEnumZodSchemaData: ExtractedEnumZodSchemaData[];
|
|
34
40
|
readonly validationErrors: ValidationError[];
|
|
35
41
|
private get docSchemas();
|
|
36
42
|
private get schemaRefs();
|
|
@@ -47,15 +53,17 @@ export declare class SchemaResolver {
|
|
|
47
53
|
getCompositeZodSchemaByZodSchemaName(zodSchemaName: string): ZodSchema | undefined;
|
|
48
54
|
getSchemaByCompositeZodSchemaName(compositeZodSchemaName: string): OpenAPIV3.SchemaObject | undefined;
|
|
49
55
|
getEnumZodSchemaDataByCode(code: string): EnumZodSchemaData | undefined;
|
|
50
|
-
|
|
51
|
-
|
|
56
|
+
getExtractedEnumZodSchemaDataByCode(code: string): ExtractedEnumZodSchemaData | undefined;
|
|
57
|
+
getExtractedEnumZodSchemaDataByName(enumZodSchemaName: string): ExtractedEnumZodSchemaData | undefined;
|
|
58
|
+
getExtractedEnumZodSchemaNamesReferencedBySchemaRef(schemaRef: string): string[];
|
|
52
59
|
getZodSchemas(): {};
|
|
53
|
-
|
|
60
|
+
getExtractedEnumZodSchemas(): {};
|
|
54
61
|
resolveObject<T>(obj: OpenAPIV3.ReferenceObject | T): T;
|
|
55
62
|
isSchemaCircular(ref: string): boolean;
|
|
56
63
|
getCircularSchemaChain(ref: string, currentRef?: string, chain?: never[]): string[];
|
|
57
64
|
getBaseUrl(): string;
|
|
58
65
|
getZodSchemaObj(zodSchemaName: string): OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject | undefined;
|
|
59
66
|
private initialize;
|
|
67
|
+
private handleDuplicateEnumZodSchemas;
|
|
60
68
|
}
|
|
61
69
|
export {};
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import { SchemaResolver } from "../SchemaResolver.class";
|
|
2
|
-
export declare function getZodSchemasFromOpenAPIDoc(resolver: SchemaResolver):
|
|
1
|
+
import { EnumZodSchemaData, SchemaResolver } from "../SchemaResolver.class";
|
|
2
|
+
export declare function getZodSchemasFromOpenAPIDoc(resolver: SchemaResolver): {
|
|
3
|
+
zodSchemas: Record<string, string>;
|
|
4
|
+
enumZodSchemas: Record<string, string>;
|
|
5
|
+
};
|
|
6
|
+
export declare function getEnumZodSchemasFromOpenAPIDoc(resolver: SchemaResolver): EnumZodSchemaData[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OpenAPIV3 } from "openapi-types";
|
|
2
2
|
import { SchemaResolver } from "../SchemaResolver.class";
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function updateExtractedEnumZodSchemaData({ schema, nameSegments, includeSelf, ...params }: {
|
|
4
4
|
resolver: SchemaResolver;
|
|
5
5
|
schema: OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject | undefined;
|
|
6
6
|
schemaRef?: string;
|
|
@@ -9,5 +9,5 @@ export declare function updateEnumZodSchemaData({ schema, nameSegments, includeS
|
|
|
9
9
|
nameSegments?: string[];
|
|
10
10
|
includeSelf?: boolean;
|
|
11
11
|
}): void;
|
|
12
|
-
export declare function
|
|
13
|
-
export declare function
|
|
12
|
+
export declare function resolveExtractedEnumZodSchemaNames(resolver: SchemaResolver): void;
|
|
13
|
+
export declare function resolveExtractedEnumZodSchemaTags(resolver: SchemaResolver): void;
|