-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query 2020-10-05, Query 2020-10-19, Query 2020-11-02
Suppose the validator expression {$jsonSchema: {properties: {a: {type: 'string', minLength: 2}}} fails to match against the document {a: 1}. The generated error will report that there is a type mismatch twice: once for the 'type' keyword and once for the 'minLength' keyword. Ideally, the 'minLength' keyword (or generally speaking, any such scalar keyword) should not produce a type mismatch error since the semantics of these jsonSchema scalar keywords is to fail to match if the instance matches the expected type.
- is related to
-
SERVER-49446 Implement validation error generation for jsonSchema object keywords
- Closed