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

23 lines (22 loc) 922 B
import type { ReferenceObject, SchemaObject } from "openapi3-ts"; import type { CodeMetaData, ConversionTypeContext } from "./CodeMeta.js"; import { CodeMeta } from "./CodeMeta.js"; import type { TemplateContext } from "./template-context.js"; type ConversionArgs = { schema: SchemaObject | ReferenceObject; ctx?: ConversionTypeContext | undefined; meta?: CodeMetaData | undefined; options?: TemplateContext["options"] | undefined; }; /** * @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#schemaObject * @see https://github.com/colinhacks/zod */ export declare function getZodSchema({ schema, ctx, meta: inheritedMeta, options }: ConversionArgs): CodeMeta; type ZodChainArgs = { schema: SchemaObject; meta?: CodeMetaData; options?: TemplateContext["options"]; }; export declare const getZodChain: ({ schema, meta, options }: ZodChainArgs) => string; export {};