@kubb/plugin-zod
Version:
Zod schema generator plugin for Kubb, creating type-safe validation schemas from OpenAPI specifications for runtime data validation.
33 lines (29 loc) • 1.07 kB
text/typescript
import { SchemaNames } from '@kubb/plugin-oas/hooks';
import { Operation, SchemaObject } from '@kubb/oas';
import { Schema } from '@kubb/plugin-oas';
import { P as PluginZod } from './types-BOF1ntMm.cjs';
import '@kubb/core';
type Props$1 = {
name: string;
operations: Array<{
operation: Operation;
data: SchemaNames;
}>;
};
declare function Operations({ name, operations }: Props$1): any;
type Props = {
name: string;
typeName?: string;
inferTypeName?: string;
tree: Array<Schema>;
rawSchema: SchemaObject;
description?: string;
coercion: PluginZod['resolvedOptions']['coercion'];
mapper: PluginZod['resolvedOptions']['mapper'];
keysToOmit?: string[];
wrapOutput?: PluginZod['resolvedOptions']['wrapOutput'];
version: '3' | '4';
emptySchemaType: PluginZod['resolvedOptions']['emptySchemaType'];
};
declare function Zod({ name, typeName, tree, rawSchema, inferTypeName, mapper, coercion, keysToOmit, description, wrapOutput, version, emptySchemaType, }: Props): any;
export { Operations, Zod };