botbook/node_modules/json-schema-library/dist/lib/features/anyOf.d.ts
Rodrigo Rodriguez 6ae15fe3e5 Updated.
2024-09-04 13:13:15 -03:00

19 lines
814 B
TypeScript

import { JsonSchema, JsonPointer, JsonValidator, JsonError } from "../types";
import { Draft } from "../draft";
/**
* returns merged schema of all valid anyOf subschemas for the given input data.
* Does not merge with rest input schema.
*
* @returns merged anyOf subschemas which are valid to the given input data.
*/
export declare function mergeValidAnyOfSchema(draft: Draft, schema: JsonSchema, data: unknown): JsonSchema;
/**
* @returns extended input schema with valid anyOf subschemas or JsonError if
* no anyOf schema matches input data
*/
export declare function resolveAnyOf(draft: Draft, data: any, schema?: JsonSchema, pointer?: JsonPointer): JsonSchema | JsonError;
/**
* validate anyOf definition for given input data
*/
declare const validateAnyOf: JsonValidator;
export { validateAnyOf };