UNPKG

@kubb/plugin-zod

Version:

Zod schema generator plugin for Kubb, creating type-safe validation schemas from OpenAPI specifications for runtime data validation.

66 lines (64 loc) 1.59 kB
import { c as __name, i as Schema, n as PluginZod, o as Operation, s as SchemaObject } from "./types-B5e4IaUY.cjs"; import { KubbFile } from "@kubb/fabric-core/types"; import { KubbNode } from "@kubb/react-fabric/types"; //#region ../plugin-oas/src/hooks/useOperationManager.d.ts type SchemaNames = { request: string | undefined; parameters: { path: string | undefined; query: string | undefined; header: string | undefined; }; responses: { default?: string; } & Record<number | string, string>; errors: Record<number | string, string>; }; //#endregion //#region src/components/Operations.d.ts type Props$1 = { name: string; operations: Array<{ operation: Operation; data: SchemaNames; }>; }; declare function Operations({ name, operations }: Props$1): KubbNode; //#endregion //#region src/components/Zod.d.ts type Props = { name: string; typeName?: string; inferTypeName?: string; tree: Array<Schema>; schema: SchemaObject; description?: string; coercion: PluginZod['resolvedOptions']['coercion']; mapper: PluginZod['resolvedOptions']['mapper']; keysToOmit?: string[]; wrapOutput?: PluginZod['resolvedOptions']['wrapOutput']; version: '3' | '4'; emptySchemaType: PluginZod['resolvedOptions']['emptySchemaType']; mini?: boolean; }; declare function Zod({ name, typeName, tree, schema, inferTypeName, mapper, coercion, keysToOmit, description, wrapOutput, version, emptySchemaType, mini }: Props): KubbNode; //#endregion export { Operations, Zod }; //# sourceMappingURL=components.d.cts.map