The problem here is that JSON-schema validators like ajv infer if there is no additionalProperties: false then additional properties are allowed. This conflicts with the implementation of the ObjectValidator because if you want to allow additional properties you are required to chain .additional({ ... }) which should imply to the developer that when .additional({...}) is not used then to expect _additionalProperties: false_ in the json-schema output.
This validator:
Will produce this json-schema:
The problem here is that JSON-schema validators like ajv infer if there is no
additionalProperties: false
then additional properties are allowed. This conflicts with the implementation of theObjectValidator
because if you want to allow additional properties you are required to chain.additional({ ... })
which should imply to the developer that when.additional({...})
is not used then to expect_additionalProperties: false_
in the json-schema output.