@povio/openapi-codegen-cli 0.3.4 → 0.3.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 CHANGED
@@ -30,6 +30,7 @@ yarn openapi-codegen generate --input http://localhost:3001/docs-json
30
30
  --defaultTag Default tag name for code shared accross multiple tags (default: 'Common')
31
31
  --excludeTags Comma separated list of tags excluded from the output
32
32
  --removeOperationPrefixEndingWith Removes prefix that ends with value from operation names (default: 'Controller_')
33
+ --importPath Import path (default: 'ts', possible: 'ts' | 'relative' | 'absolute')
33
34
  --prettier Run prettier command on output after code generation (default: true)
34
35
  --verbose Show log messages during execution
35
36
  ```
@@ -1,13 +1,8 @@
1
+ import { GenerateOptions } from "src/generators/types/options";
1
2
  export type GenerateParams = {
2
3
  input: string;
3
- output: string;
4
- includeNamespaces: boolean;
5
- useRelativeImports: boolean;
6
- splitByTags: boolean;
7
- defaultTag: string;
8
4
  excludeTags: string;
9
- removeOperationPrefixEndingWith: string;
10
5
  prettier: boolean;
11
6
  verbose: boolean;
12
- };
13
- export declare function generate({ input, output, includeNamespaces, useRelativeImports, splitByTags, defaultTag, excludeTags, removeOperationPrefixEndingWith, prettier, verbose, }: GenerateParams): Promise<void>;
7
+ } & Pick<GenerateOptions, "output" | "includeNamespaces" | "splitByTags" | "defaultTag" | "removeOperationPrefixEndingWith" | "importPath">;
8
+ export declare function generate({ input, excludeTags, prettier, verbose, ...params }: GenerateParams): Promise<void>;
@@ -24,6 +24,7 @@ export declare class SchemaResolver {
24
24
  getSchemaByCompositeZodSchemaName(compositeZodSchemaName: string): OpenAPIV3.SchemaObject | undefined;
25
25
  getZodSchemas(): {};
26
26
  resolveObject<T>(obj: OpenAPIV3.ReferenceObject | T): T;
27
+ isSchemaCircular(ref: string): boolean;
27
28
  private intializeSchemaInfo;
28
29
  private initializeSchemaTags;
29
30
  private getOperationSchemaRefs;
@@ -17,10 +17,7 @@ export declare function mapEndpointParamsToFunctionParams({ resolver, endpoint,
17
17
  required: boolean;
18
18
  }[];
19
19
  export declare function getEndpointConfig(endpoint: Endpoint): {
20
- headers?: {
21
- Accept?: string | undefined;
22
- "Content-Type"?: string | undefined;
23
- } | undefined;
20
+ headers?: Record<string, string> | undefined;
24
21
  params?: {
25
22
  name: string;
26
23
  value: string;
@@ -14,4 +14,4 @@ export declare function getEndpointsImports({ tag, endpoints, options, }: {
14
14
  endpoints: Endpoint[];
15
15
  options: GenerateOptions;
16
16
  }): Import[];
17
- export declare function getImportPath(options: Pick<GenerateOptions, "output" | "useRelativeImports">): string;
17
+ export declare function getImportPath(options: Pick<GenerateOptions, "output" | "importPath">): string;
@@ -1,2 +1,7 @@
1
1
  import { Endpoint } from "../../types/endpoint";
2
2
  export declare const getQueryName: (endpoint: Endpoint) => string;
3
+ export declare const getAllQueryKeys: (endpoints: Endpoint[]) => {
4
+ path: string;
5
+ name: string;
6
+ }[];
7
+ export declare const getEndpointPathQueryKeys: (endpoint: Endpoint, endpoints: Endpoint[]) => string[];