@povio/openapi-codegen-cli 0.1.0 → 0.1.2
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OpenAPIV3 } from "openapi-types";
|
|
2
|
-
import { GenerateMetadata } from "../types/
|
|
2
|
+
import { GenerateMetadata } from "../types/metadata";
|
|
3
3
|
import { GenerateOptions } from "../types/options";
|
|
4
4
|
export declare function getMetadataFromOpenAPIDoc({ openApiDoc, options, }: {
|
|
5
5
|
openApiDoc: OpenAPIV3.Document;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { OpenAPIV3 } from "openapi-types";
|
|
2
1
|
import { Endpoint } from "./endpoint";
|
|
3
2
|
export type Import = {
|
|
4
3
|
bindings: string[];
|
|
@@ -13,19 +12,3 @@ export type GenerateData = Map<string, {
|
|
|
13
12
|
endpoints: Endpoint[];
|
|
14
13
|
zodSchemas: Record<string, string>;
|
|
15
14
|
}>;
|
|
16
|
-
export interface ModelMetadata {
|
|
17
|
-
name: string;
|
|
18
|
-
zodSchemaName: string;
|
|
19
|
-
filePath: string;
|
|
20
|
-
namespace?: string;
|
|
21
|
-
openApiSchema?: OpenAPIV3.SchemaObject;
|
|
22
|
-
}
|
|
23
|
-
export interface QueryMetadata {
|
|
24
|
-
name: string;
|
|
25
|
-
filePath: string;
|
|
26
|
-
namespace?: string;
|
|
27
|
-
}
|
|
28
|
-
export interface GenerateMetadata {
|
|
29
|
-
models: ModelMetadata[];
|
|
30
|
-
queries: QueryMetadata[];
|
|
31
|
-
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { OpenAPIV3 } from "openapi-types";
|
|
2
|
+
import { GenerateOptions } from "./options";
|
|
3
|
+
export interface GenerateMetadataParams {
|
|
4
|
+
input: string;
|
|
5
|
+
options?: Partial<GenerateOptions>;
|
|
6
|
+
}
|
|
7
|
+
export interface ModelMetadata {
|
|
8
|
+
name: string;
|
|
9
|
+
zodSchemaName: string;
|
|
10
|
+
filePath: string;
|
|
11
|
+
namespace?: string;
|
|
12
|
+
openApiSchema?: OpenAPIV3.SchemaObject;
|
|
13
|
+
}
|
|
14
|
+
export interface QueryMetadata {
|
|
15
|
+
name: string;
|
|
16
|
+
filePath: string;
|
|
17
|
+
namespace?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface GenerateMetadata {
|
|
20
|
+
openApiDoc: OpenAPIV3.Document;
|
|
21
|
+
models: ModelMetadata[];
|
|
22
|
+
queries: QueryMetadata[];
|
|
23
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function
|
|
3
|
-
|
|
4
|
-
options?: Partial<GenerateOptions>;
|
|
5
|
-
}): Promise<import("./generators/types/generate").GenerateMetadata>;
|
|
1
|
+
import { GenerateMetadataParams } from "./generators/types/metadata";
|
|
2
|
+
export declare function getGenerateMetadata({ input, options: genOptions }: GenerateMetadataParams): Promise<import("./generators/types/metadata").GenerateMetadata>;
|
|
3
|
+
export * from "./generators/types/metadata";
|