UNPKG

@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.

51 lines (50 loc) 1.41 kB
import { OpenAPIV3 } from "openapi-types"; import { OperationAclInfo, ParameterObject } from "./openapi"; export interface EndpointParameter { name: string; description?: string; type: "Query" | "Body" | "Header" | "Path"; zodSchema: string; parameterObject?: ParameterObject; parameterSortingEnumSchemaName?: string; bodyObject?: OpenAPIV3.RequestBodyObject; } interface EndpointError { status: number | "default"; description?: string; zodSchema: string; } export interface AclConditionsPropertyType { name: string; type?: string; zodSchemaName?: string; required?: boolean; info?: string; } export type EndpointAclInfo = OperationAclInfo & { conditionsTypes?: AclConditionsPropertyType[]; }; export interface Endpoint { method: OpenAPIV3.HttpMethods; path: string; operationName: string; description?: string; summary?: string; tags?: string[]; requestFormat: string; responseFormat?: string; parameters: Array<EndpointParameter>; status?: number; response: string; responseObject?: OpenAPIV3.ResponseObject; responseDescription?: string; errors: Array<EndpointError>; responseStatusCodes: string[]; acl?: EndpointAclInfo[]; mediaUpload?: boolean; mediaDownload?: boolean; } export interface ExtendedEndpoint extends Endpoint { pathSegments: string[]; } export {};