You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
Activity
add tests for additionalProperties false/true (#370)