@asteasolutions/zod-to-openapi
Version:
Builds OpenAPI schemas from Zod schemas
10 lines (9 loc) • 505 B
TypeScript
import { ZodEnum } from 'zod';
import { MapNullableType } from '../types';
export declare class EnumTransformer {
transform(zodSchema: ZodEnum, mapNullableType: MapNullableType): {
enum: (string | number | undefined)[];
type?: ((import("openapi3-ts/oas30").SchemaObjectType | import("openapi3-ts/oas30").SchemaObjectType[]) & (import("openapi3-ts/oas31").SchemaObjectType | import("openapi3-ts/oas31").SchemaObjectType[])) | undefined;
nullable?: boolean | undefined;
};
}