Parsing of boolean `additonalProperties` inconsistent with OpenAPI 3.0.0 specification
See original GitHub issueI’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
additionalPropertiesas 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.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Inconsistent validaton of boolean parameters - Bitbucket
Handling of invalid parameters of boolean type is inconsistent - if a parameter is passed with a string value (other than “true“ or...
Read more >OpenAPI Specification - Version 3.0.3 - Swagger
properties - Property definitions MUST be a Schema Object and not a standard JSON Schema (inline or referenced). additionalProperties - Value can be...
Read more >Using OpenAPI 3.0 is there a way to link a boolean query ...
I'm mocking this in swagger.com so the frontend dudes I'm working with have a mocked api they can send queries to while I...
Read more >OpenAPI Specification v3.0.3 | Introduction, Definitions, & More
additionalProperties - Value can be boolean or object. Inline or referenced schema MUST be of a Schema Object and not a standard JSON...
Read more >Thesis Hamza Ed-Douibi PDF | PDF | Representational State ...
vendor-neutral, portable, and open specification for describing REST APIs. OAI has succeeded in attracting major companies and the OpenAPI specifi-.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

There’s a chance to get this fix on upstream before end January? 😄
Sorry about this - just got lost in the mass emails. We’ll try to take a look shortly.