12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- export default ValidationError;
- export type JSONSchema6 = import('json-schema').JSONSchema6;
- export type JSONSchema7 = import('json-schema').JSONSchema7;
- export type Schema =
- | (import('json-schema').JSONSchema4 & import('./validate').Extend)
- | (import('json-schema').JSONSchema6 & import('./validate').Extend)
- | (import('json-schema').JSONSchema7 & import('./validate').Extend);
- export type ValidationErrorConfiguration = {
- name?: string | undefined;
- baseDataPath?: string | undefined;
- postFormatter?: import('./validate').PostFormatter | undefined;
- };
- export type PostFormatter = (
- formattedError: string,
- error: import('ajv').ErrorObject & {
- children?: import('ajv').ErrorObject[] | undefined;
- }
- ) => string;
- export type SchemaUtilErrorObject = import('ajv').ErrorObject & {
- children?: import('ajv').ErrorObject[] | undefined;
- };
- export type SPECIFICITY = number;
- declare class ValidationError extends Error {
-
- constructor(
- errors: Array<SchemaUtilErrorObject>,
- schema: Schema,
- configuration?: ValidationErrorConfiguration
- );
-
- errors: Array<SchemaUtilErrorObject>;
-
- schema: Schema;
-
- headerName: string;
-
- baseDataPath: string;
-
- postFormatter: PostFormatter | null;
-
- getSchemaPart(path: string): Schema;
-
- formatSchema(
- schema: Schema,
- logic?: boolean,
- prevSchemas?: Array<Object>
- ): string;
-
- getSchemaPartText(
- schemaPart?: Schema | undefined,
- additionalPath?: (boolean | Array<string>) | undefined,
- needDot?: boolean | undefined,
- logic?: boolean | undefined
- ): string;
-
- getSchemaPartDescription(schemaPart?: Schema | undefined): string;
-
- formatValidationError(error: SchemaUtilErrorObject): string;
-
- formatValidationErrors(errors: Array<SchemaUtilErrorObject>): string;
- }
|