@povio/openapi-codegen-cli
Version:
**NOTE:** This CLI tool is primarily designed for use within our organization. The generated code output aligns with our internal template. If you are using this tool without our internal template, make sure to use it in **standalone** mode.
40 lines (39 loc) • 2.01 kB
TypeScript
import { OpenAPIV3 } from "openapi-types";
import { SchemaResolver } from "src/generators/core/SchemaResolver.class";
import { Endpoint } from "src/generators/types/endpoint";
import { GenerateOptions } from "src/generators/types/options";
export declare const getEndpointName: (endpoint: Endpoint) => string;
export declare function getImportedEndpointName(endpoint: Endpoint, options: GenerateOptions): string;
export declare const requiresBody: (endpoint: Endpoint) => boolean;
export declare const getEndpointBody: (endpoint: Endpoint) => import("src/generators/types/endpoint").EndpointParameter | undefined;
export declare const hasEndpointConfig: (endpoint: Endpoint, resolver: SchemaResolver) => boolean | undefined;
export declare const getEndpointPath: (endpoint: Endpoint) => string;
export declare function mapEndpointParamsToFunctionParams(resolver: SchemaResolver, endpoint: Endpoint, options?: {
excludeBodyParam?: boolean;
excludePageParam?: boolean;
replacePageParam?: boolean;
includeFileParam?: boolean;
includeOnlyRequiredParams?: boolean;
pathParamsRequiredOnly?: boolean;
}): {
name: string;
required: boolean;
type: string;
paramType: "Query" | "Body" | "Header" | "Path";
parameterObject: import("../../types/openapi").ParameterObject | undefined;
bodyObject: OpenAPIV3.RequestBodyObject | undefined;
}[];
export declare function getEndpointConfig(endpoint: Endpoint): {
headers?: Record<string, string> | undefined;
params?: {
name: string;
value: string;
description?: string | undefined;
type: "Query" | "Body" | "Header" | "Path";
zodSchema: string;
parameterObject?: import("../../types/openapi").ParameterObject | undefined;
parameterSortingEnumSchemaName?: string | undefined;
bodyObject?: OpenAPIV3.RequestBodyObject | undefined;
}[] | undefined;
};
export declare function getUpdateQueryEndpoints(endpoint: Endpoint, endpoints: Endpoint[]): Endpoint[];