Skip to content

Parsing of boolean additonalProperties inconsistent with OpenAPI 3.0.0 specification #499

@mbeko

Description

@mbeko

I'm used to setting "additionalProperties": false from JsonSchema, hence did so in an OpenAPI 3.0.0 file, especially as it's allowed by the specification.

Using version 2.0.0-SNAPSHOT of swagger-parser-v3 as found on oss.sonatype.org for OpenAPI file validation, I get a parse result message saying that additonalProperties is not of type object.

I'm aware of issue #366, but I think either

  • the parser should accept boolean values for additionalProperties as well
    or
  • it must be clearly stated in the specification if the parser is supposed to frown upon such values.

In addition, the message is a bit misleading because it is reported only once and only for the top level of the object definiton, even though there were several occurences of "additonalProperties": false on deeper levels of this definition. Providing a more precise location would have helped a lot with debugging this issue.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions