Skip to content

Commit

Permalink
debug: added more logs in JsonSchemaValidator
Browse files Browse the repository at this point in the history
Signed-off-by: Tokesh <tokesh789@gmail.com>
  • Loading branch information
Tokesh committed Jan 17, 2025
1 parent 82c900b commit 48a3506
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/src/_utils/JsonSchemaValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export default class JsonSchemaValidator {

constructor(default_schema?: Record<any, any>, options: JsonSchemaValidatorOpts = {}) {
this.ajv = new AJV({ ...DEFAULT_AJV_OPTS, ...options.ajv_opts })
console.log("ajv configs", this.ajv)
addFormats(this.ajv);
if (options.ajv_errors_opts != null) ajv_errors(this.ajv, options.ajv_errors_opts)
for (const keyword of options.additional_keywords ?? []) this.ajv.addKeyword(keyword)
Expand All @@ -46,6 +47,7 @@ export default class JsonSchemaValidator {
}
})
this.errors_parser = new AjvErrorsParser(this.ajv, options.errors_text_opts)
console.log("default_schema", default_schema);
if (default_schema) this._validate = this.ajv.compile(default_schema)
}

Expand Down

0 comments on commit 48a3506

Please sign in to comment.