import { SchemaObject } from 'openapi3-ts/oas31'; import { ZodObject, ZodType } from 'zod'; import { JSONSchema } from 'zod/v4/core'; import { FieldInfo, FieldMeta } from '../types'; /** * Convert a given Zod schema into an OpenAPI 3.1 `SchemaObject`. * Internally uses `safeToJsonSchema` for tolerant conversion and then maps the JSON Schema * into OpenAPI-compatible format (recursive). */ export declare function convert(schema: ZodType, io?: 'input' | 'output'): SchemaObject; /** * Wrapper for toJSONSchema with overrides */ export declare function safeToJsonSchema(schema: ZodType, io?: 'input' | 'output'): JSONSchema.BaseSchema; /** * Extract high-level field information from a Zod object schema. * Each field is returned with: * - `key`: property name * - `schema`: raw Zod schema * - `required`: whether the field is required (not optional/defaulted) * - `metadata`: description & example metadata */ export declare function extractFields(obj: ZodObject): FieldInfo[]; /** * Resolve metadata (description/example) for any Zod schema. * - For `ZodObject`, recursively collects nested field metadata. * - For leaf schemas, extracts `meta()` values directly. */ export declare function getMetadata(schema: ZodType): FieldMeta;