I don't think it's a bug - at least if it is it's also a bug in the processor which http://www.jsonschemavalidator.net/ uses.
What is weird is that there are other instances where additionalProperties:false
has been specified where the validator is honouring it. There are four properties in the packageInfo section which are being caught eg:
Property 'documentation_en' has not been defined and the schema does
not allow additional properties. Schema path:
http://standard.open-contracting.org/schema/1__1__0/release-schema.json#/properties/packageInfo/properties/publisher/additionalProperties
If I remove the excess properties from the packageInfo section then the entire payload validates fine.
I then removed the patternProperties
property from the Identity
definition and the validator started working. So something about the presence or value of patternProperties in a definition is preventing additionalProperties validation from working, is all I can surmise.
Furthermore, it's not just the existence of patternProperties which acts as the switch. I added a patternProperties property to the packageInfo definition to see if it stopped the validator from validating the 4 excess properties, but it still worked. So it must be something else. Very mysterious.