Rich Ashworth
Rich Ashworth

Reputation: 2015

What is the difference between additionalItems and additionalProperties in JSON Schema?

In JSON Schema, what is the difference between additionalProperties and additionalItems, as I see examples of both used to specify whether a document containing elements not defined in the schema should be considered valid.

Upvotes: 6

Views: 7219

Answers (1)

jruizaranguren
jruizaranguren

Reputation: 13605

As of 2019-09 json-schema specification version, additionalProperties is a validation keyword for objects/documents, and additionalItems is a validation keyword for arrays.

Upvotes: 8

Related Questions