Skip to content

Commit c9a7a04

Browse files
committed
docs
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 1c260a3 commit c9a7a04

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

tools/src/test/js/json-schema-lint-tests.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,15 @@ function getAjv(strict) {
3636
strictNumbers: strict,
3737
strictTypes: strict,
3838
strictTuples: strict,
39-
// this parser has issues with the oneOf-required in
40-
// `{ type: 'object', oneOf:[{required:['a']},{required:['b']}], properties:{a:{...},b:{...}} }`
41-
// so lets simply log them, do not throw errors on them.
39+
/* This parser has issues with the oneOf-required in
40+
* `{ type: 'object', oneOf:[{required:['a']},{required:['b']}], properties:{a:{...},b:{...}} }`
41+
* So `strictRequired` must be `false` tor our schema files.
42+
*
43+
* This is a known and expected behaviour.
44+
* see https://ajv.js.org/strict-mode.html#defined-required-properties
45+
* > Property defined in parent schema
46+
* > There are cases when property defined in the parent schema will not be taken into account.
47+
*/
4248
strictRequired: false,
4349
validateFormats: true,
4450
allowMatchingProperties: true,

0 commit comments

Comments
 (0)