1 | export type JSONSchema4 = import("json-schema").JSONSchema4;
|
---|
2 | export type JSONSchema6 = import("json-schema").JSONSchema6;
|
---|
3 | export type JSONSchema7 = import("json-schema").JSONSchema7;
|
---|
4 | export type ErrorObject = import("ajv").ErrorObject;
|
---|
5 | export type Extend = {
|
---|
6 | formatMinimum?: number | undefined;
|
---|
7 | formatMaximum?: number | undefined;
|
---|
8 | formatExclusiveMinimum?: boolean | undefined;
|
---|
9 | formatExclusiveMaximum?: boolean | undefined;
|
---|
10 | link?: string | undefined;
|
---|
11 | };
|
---|
12 | export type Schema = (JSONSchema4 | JSONSchema6 | JSONSchema7) & Extend;
|
---|
13 | export type SchemaUtilErrorObject = ErrorObject & {
|
---|
14 | children?: Array<ErrorObject>;
|
---|
15 | };
|
---|
16 | export type PostFormatter = (
|
---|
17 | formattedError: string,
|
---|
18 | error: SchemaUtilErrorObject
|
---|
19 | ) => string;
|
---|
20 | export type ValidationErrorConfiguration = {
|
---|
21 | name?: string | undefined;
|
---|
22 | baseDataPath?: string | undefined;
|
---|
23 | postFormatter?: PostFormatter | undefined;
|
---|
24 | };
|
---|
25 | /**
|
---|
26 | * @param {Schema} schema
|
---|
27 | * @param {Array<object> | object} options
|
---|
28 | * @param {ValidationErrorConfiguration=} configuration
|
---|
29 | * @returns {void}
|
---|
30 | */
|
---|
31 | export function validate(
|
---|
32 | schema: Schema,
|
---|
33 | options: Array<object> | object,
|
---|
34 | configuration?: ValidationErrorConfiguration | undefined
|
---|
35 | ): void;
|
---|
36 | import ValidationError from "./ValidationError";
|
---|
37 | export { ValidationError };
|
---|