@canard/schema-form
Version:
React-based component library that renders forms based on JSON Schema with plugin system support for validators and UI components
13 lines (12 loc) • 590 B
TypeScript
import type { Fn } from '../../../@aileron/declare';
import type { JsonSchema, JsonSchemaWithRef, JsonSchemaWithVirtual } from '../../../types';
/**
* Creates a function to resolve $ref references in JSON Schema.
* @param jsonSchema - Original JSON Schema
* @param maxDepth - Maximum depth for reference resolution (default: 1)
* @returns Function that can resolve references or null
*/
export declare const getResolveSchema: (jsonSchema: JsonSchema, maxDepth?: number) => ResolveSchema | null;
export type ResolveSchema = Fn<[
schema: JsonSchemaWithRef
], JsonSchemaWithVirtual>;