UNPKG

openapi-axios

Version:

OpenAPI(2.0/3.0/3.1) Schema → Type-safe Axios

35 lines (34 loc) 2.25 kB
import { OpenAPILatest } from '../types/openapi'; export type OpenApiLatest_Schema = OpenAPILatest.SchemaObject | OpenAPILatest.ReferenceObject; export declare function isRefSchema(schema: OpenApiLatest_Schema): schema is OpenAPILatest.ReferenceObject; export type OpenApiLatest_Parameter = OpenAPILatest.ReferenceObject | OpenAPILatest.ParameterObject; export declare function isRefParameter(parameter: OpenApiLatest_Parameter): parameter is OpenAPILatest.ReferenceObject; export type OpenApiLatest_Request = OpenAPILatest.ReferenceObject | OpenAPILatest.RequestBodyObject; export declare function isRefRequest(request: OpenApiLatest_Request): request is OpenAPILatest.ReferenceObject; export type OpenApiLatest_Media = OpenAPILatest.ReferenceObject | OpenAPILatest.MediaTypeObject; export declare function isRefMedia(request: OpenApiLatest_Media): request is OpenAPILatest.ReferenceObject; export type OpenApiLatest_PathItem = OpenAPILatest.PathItemObject | OpenAPILatest.ReferenceObject; export declare function isRefPathItem(pathItem: OpenApiLatest_PathItem): pathItem is OpenAPILatest.ReferenceObject; export type OpenApiLatest_Operation = OpenAPILatest.OperationObject | OpenAPILatest.ReferenceObject; export declare function isRefOperation(operation: OpenApiLatest_Operation): operation is OpenAPILatest.ReferenceObject; export type OpenApiLatest_Response = OpenAPILatest.ResponseObject | OpenAPILatest.ReferenceObject; export declare function isRefResponse(response: OpenApiLatest_Response): response is OpenAPILatest.ReferenceObject; export declare function requiredTypeStringify(required?: boolean): ":" | "?:"; export declare function requiredKeyStringify(key: string, required: boolean): string; export declare function toImportString(id: string, name: string, path: string, isType?: boolean): string; export declare function toZodName(typeName: string): string; export interface OrderlyItem { name: string; deps: string[]; } /** * 根据依赖进行排序 * @param depList * @returns */ export declare function sortingByDeps<T extends OrderlyItem>(depList: T[]): T[]; export declare function withGroup(texts: string[], options?: { sep?: string; wrap?: [start: string, end: string]; always?: boolean; }): string;