json-schema-describes-subset
Version:
Tools for static JSON schema analysis, including functions to determine if one schema describes a subset of another or if a schema describes the empty set or to convert a schema to its disjunctive normal form (DNF).
16 lines (15 loc) • 643 B
TypeScript
import type { JSONSchema } from '../../json-schema/index.js';
import { type LogicalCombination } from '../atomic-schema.js';
import { type RawDNF } from '../to-raw-dnf/index.js';
import type { InternalOptions } from '../../options/index.js';
/**
* Converts the provided schema to an `allOf`-schema containing only logical
* combinations of atomic subschemas.
*
*/
export declare function split({ schema, options, }: {
schema: JSONSchema;
options: InternalOptions;
}): LogicalCombination;
export declare function splitToRawDNF(schema: JSONSchema, options: InternalOptions): RawDNF;
export type SplitToRawDNF = typeof splitToRawDNF;