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

24 lines (23 loc) 884 B
import type { ReferenceObject, SchemaObject } from "openapi3-ts"; import { ts } from "tanu"; import type { TypeDefinitionObject } from "tanu/dist/type"; import type { DocumentResolver } from "./makeSchemaResolver"; import type { TemplateContext } from "./template-context"; type TsConversionArgs = { schema: SchemaObject | ReferenceObject; ctx?: TsConversionContext | undefined; meta?: { name?: string; $ref?: string; isInline?: boolean; } | undefined; options?: TemplateContext["options"]; }; export type TsConversionContext = { nodeByRef: Record<string, ts.Node>; resolver: DocumentResolver; rootRef?: string; visitedsRefs?: Record<string, boolean>; }; export declare const getTypescriptFromOpenApi: ({ schema, meta: inheritedMeta, ctx, options, }: TsConversionArgs) => ts.Node | TypeDefinitionObject | string; export {};