additionalProperties does not have to be "either a Boolean or a Schema instance"
See original GitHub issueCurrently, the code enforces that “additionalProperties must be either a Boolean or a Schema instance”.
According to https://swagger.io/docs/specification/data-models/dictionaries/ and https://github.com/OAI/OpenAPI-Specification/issues/668#issuecomment-755415337, the following structure is also valid:
type: object
additionalProperties:
type: string
This is the openapi that represents (and is generated) when the model is a Map of string and string (Map<String, String>).
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Swagger schema with additionalProperties fails - Stack Overflow
I think your revised schema won't work correctly, because additionalProperties boolean values of true or false are ignored by swagger-core. Apparently this was ......
Read more >Additional Properties - Liquid Technologies
The value of "additionalProperties" MUST be a boolean or an object. If it is an object, it MUST also be a valid JSON...
Read more >juniper - npm
Juniper is a JSON Schema generator that focuses on solving two problems: ... Juniper primarily supports Draft 2020-12 JSON Schema, but also ...
Read more >A Media Type for Describing JSON Documents - JSON Schema
Either this vocabulary or one very much like it is required to write schemas for non-trivial JSON instances, whether those schemas are intended...
Read more >JSight Schema 0.3 Specification
The PROPERTY KEY essentially is not the VALUE of an object PROPERTY; ... In the RULE additionalProperties , you can specify either a...
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
I am not sure how you are deserializing and in which scenario, but from your logs it looks like you’re using some possibly not configured
ObjectMapper;swagger-coreprovides helper class Json (and similar Yaml) giving access to a correctly configured mapper which - depending on scenario - you would use e.g. like:Json.mapper().readValue(openApiAsString, OpenAPI.class);Please close ticket if this answers your question
good