jsonsystems / json-schema

JSONSchema.Net Public Repository
Apache License 2.0
663 stars 64 forks source link

Error parsing additional(Properties/Items) when not boolean #24

Closed jackwootton closed 4 years ago

jackwootton commented 6 years ago

additionalItems and additionalProperties may be primitive schema (boolean) or an object. Currently, loading a schema with a non-primitive value for additionalProperties and additionalItems breaks.

http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.

The value of "additionalProperties" MUST be a valid JSON Schema.

This keyword determines how child instances validate for objects, and does not directly validate the immediate instance itself.

Validation with "additionalProperties" applies only to the child values of instance names that do not match any names in "properties", and do not match any regular expression in "patternProperties".

For all such properties, validation succeeds if the child instance validates against the "additionalProperties" schema.

Omitting this keyword has the same behavior as an empty schema.