wol-soft / php-json-schema-model-generator

Creates (immutable) PHP model classes from JSON-Schema files including all validation rules as PHP code
MIT License
61 stars 13 forks source link

Add an option to set additionalProperties to false by default #31

Closed wol-soft closed 3 years ago

wol-soft commented 3 years ago

By default a JSON schema enforces the user to define "additionalProperties": false for each object which should accept only the defined properties. To generate strict models an option should be available to default additionalProperties to false. If the additionalProperties keyword is defined for an object the option is ignored.