UNPKG

hey-api-builders

Version:

A custom plugin for @hey-api/openapi-ts that generates mock data builders with a lightweight custom runtime, Zod integration, or static mock generation.

30 lines 1.31 kB
import type { IR } from '@hey-api/openapi-ts'; import type { Schema } from '../types'; import type { ExtendedSchema, NormalizedSchemaNode, GeneratedSchemaMeta } from '../types'; /** * Converts IR schema to JSON Schema format * @param ir - IR schema object * @param all - All schemas for reference resolution * @param seen - Set of already processed schemas to avoid cycles * @returns JSON Schema */ export declare function irToSchema(ir: IR.SchemaObject, all: Record<string, IR.SchemaObject>, seen?: Set<IR.SchemaObject>): Schema; /** * Normalizes a schema node for consistent processing * @param node - Schema node to normalize * @returns Normalized schema node */ export declare function normalizeSchema(node: NormalizedSchemaNode | ExtendedSchema | Schema): NormalizedSchemaNode; /** * Sanitizes a schema by removing invalid properties * @param node - Schema node to sanitize * @returns Sanitized schema */ export declare function sanitizeSchema(node: NormalizedSchemaNode): Schema; /** * Collects and processes all schemas from IR * @param all - All IR schemas * @returns Array of schema metadata */ export declare function collectSchemas(all: Record<string, IR.SchemaObject>, normalize?: (name: string) => string): GeneratedSchemaMeta[]; //# sourceMappingURL=schema-transformer.d.ts.map