When you want to add additionalProperties using object notation, it works fine. We can even explicitly state that they are allowed, even though that is the default by setting additionalProperties: {}.
If we want to block allowing unknown properties in a request, the convention is additionalProperties: false. However if we set it to a boolean, the following exception is thrown during generation:
io.openapiprocessor.jsonschema.converter.TypeMismatchException: property '/components/schemas/Movie/additionalProperties' is not a java.util.Map
at io.openapiprocessor.jsonschema.schema.Bucket.getBucket (Bucket.java:163)
at io.openapiparser.Properties.getObjectOrNull (Properties.java:204)
at io.openapiparser.Properties.getObjectOrNull (Properties.java:132)
at io.openapiparser.model.v31.Schema.getAdditionalProperties (Schema.java:160)
at io.openapiprocessor.core.parser.openapi.v31.Schema.getAdditionalProperties (Schema.kt:77)
at io.openapiprocessor.core.parser.openapi.v31.Schema.getAdditionalProperties (Schema.kt:15)
at io.openapiprocessor.core.converter.SchemaInfo.buildForAdditionalProperties (SchemaInfo.kt:368)
We can see an example of false being set here: https://spec.openapis.org/oas/3.0/schema/2024-10-18.html. or here https://www.apimatic.io/openapi/additionalproperties
When you want to add additionalProperties using object notation, it works fine. We can even explicitly state that they are allowed, even though that is the default by setting
additionalProperties: {}.If we want to block allowing unknown properties in a request, the convention is
additionalProperties: false. However if we set it to a boolean, the following exception is thrown during generation:We can see an example of false being set here: https://spec.openapis.org/oas/3.0/schema/2024-10-18.html. or here https://www.apimatic.io/openapi/additionalproperties