UNPKG

openapi-zod-client-yohoji

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/)

44 lines (43 loc) 1.63 kB
import type { ZodiosEndpointDefinition } from "@zodios/core"; import type { OpenAPIObject, SchemaObject } from "openapi3-ts"; import type { TemplateContext } from "./template-context"; 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>; schemasByName: Record<string, string[]>; }; export type EndpointDefinitionWithRefs = Omit<ZodiosEndpointDefinition<any>, "response" | "parameters" | "errors" | "description"> & { response: string; description?: string | undefined; parameters: Array<Omit<Required<ZodiosEndpointDefinition<any>>["parameters"][number], "schema"> & { schema: string; }>; errors: Array<Omit<Required<ZodiosEndpointDefinition<any>>["errors"][number], "schema"> & { schema: string; }>; responses?: Array<{ statusCode: string; schema: string; description?: string; }>; };