diff --git a/tools/src/_utils/AjvErrorsParser.ts b/tools/src/_utils/AjvErrorsParser.ts index 7085d8230..1a215d3eb 100644 --- a/tools/src/_utils/AjvErrorsParser.ts +++ b/tools/src/_utils/AjvErrorsParser.ts @@ -27,15 +27,17 @@ export default class AjvErrorsParser { } parse(errors: ErrorObject[] | undefined | null): string { - const error_groups = this.#group_errors(errors ?? []) + console.log('Raw errors:', errors); // Логируем все ошибки + const error_groups = this.#group_errors(errors ?? []); const parsed_errors = [ this.#prohibited_property_error(error_groups.prohibited), this.#required_property_error(error_groups.required), this.#enum_error(error_groups.enum), ...error_groups.others - ].filter(e => e != null) as ErrorObject[] - return this.ajv.errorsText(parsed_errors, this.options) - } + ].filter(e => e != null) as ErrorObject[]; + console.log('Parsed errors:', parsed_errors); // Логируем после обработки + return this.ajv.errorsText(parsed_errors, this.options); + } #group_errors(errors: ErrorObject[]): GroupedErrors { const categories = { diff --git a/tools/src/_utils/JsonSchemaValidator.ts b/tools/src/_utils/JsonSchemaValidator.ts index c5091257d..e6b490670 100644 --- a/tools/src/_utils/JsonSchemaValidator.ts +++ b/tools/src/_utils/JsonSchemaValidator.ts @@ -45,7 +45,6 @@ export default class JsonSchemaValidator { } }) this.errors_parser = new AjvErrorsParser(this.ajv, options.errors_text_opts) - console.log("default_schema", JSON.stringify(default_schema)) if (default_schema) this._validate = this.ajv.compile(default_schema) }