strictSchema: "log"
throws on some schema compile errors
#2538
Labels
strictSchema: "log"
throws on some schema compile errors
#2538
Quick description of the issue
In
ajv/lib/vocabularies/format/format.ts
Lines 82 to 87 in 82735a1
strictSchema === false
logs an error, whereasstrictSchema === "log"
throwsBased on the docs in
ajv/docs/options.md
Lines 96 to 104 in 82735a1
I would expect
strictSchema === "log"
to log andstrictSchema === true
to throw.Issue template
What version of Ajv are you using? Does the issue happen if you use the latest version?
8.17.1
Yes
Ajv options object
JSON Schema
Sample data
irrelevant
Your code
Validation result, data AFTER validation, error messages
What results did you expect?
With
{ strictSchema: "log" }
, I would expect this error to be logged (like it is whenstrictSchema
isfalse
), not thrown as an exception.Are you going to resolve the issue?
I have not contributed before, but I would be happy to try and submit a PR if you agree this is a bug.
The text was updated successfully, but these errors were encountered: