UNPKG

@alexop/openapi-zod-client

Version:

[![Screenshot 2022-11-12 at 18 52 25](https://user-images.githubusercontent.com/47224540/201487856-ffc4c862-6f31-4de1-8ef1-3981fabf3416.png)](https://openapi-zod-client.vercel.app/)

39 lines (38 loc) 1.52 kB
import type { ZodiosEndpointDefinition } from "@zodios/core"; import type { OpenAPIObject, SchemaObject } from "openapi3-ts"; import type { TemplateContext } from "./template-context.js"; export declare const getZodiosEndpointDefinitionList: (doc: OpenAPIObject, options?: TemplateContext["options"]) => { endpoints: EndpointDefinitionWithRefs[]; issues: { ignoredFallbackResponse: string[]; ignoredGenericError: string[]; }; refsDependencyGraph: Record<string, Set<string>>; deepDependencyGraph: Record<string, Set<string>>; resolver: { getSchemaByRef: (ref: string) => SchemaObject; resolveRef: (ref: string) => { ref: string; name: string; normalized: string; }; resolveSchemaName: (normalized: string) => { ref: string; name: string; normalized: string; }; }; zodSchemaByName: Record<string, string>; schemaByName: Record<string, string>; }; export type EndpointDefinitionWithRefs = Omit<ZodiosEndpointDefinition<any>, "response" | "parameters" | "errors" | "description" | "summary"> & { response: string; description?: string | undefined; summary?: string | undefined; parameters: Array<Omit<Required<ZodiosEndpointDefinition<any>>["parameters"][number], "schema"> & { schema: string; }>; errors: Array<Omit<Required<ZodiosEndpointDefinition<any>>["errors"][number], "schema"> & { schema: string; }>; };