diff --git a/components/openapi/src/test/resources/swagger/swagger-20.json b/components/openapi/src/test/resources/swagger/swagger-20.json index 9679551a45a..50b933c9001 100644 --- a/components/openapi/src/test/resources/swagger/swagger-20.json +++ b/components/openapi/src/test/resources/swagger/swagger-20.json @@ -78,8 +78,9 @@ "type": "integer", "format": "int32" } - } - } + }, + "additionalProperties": false + } }, "400": { "description": "Problem with request" diff --git a/utils/json-utils/src/main/scala/pl/touk/nussknacker/engine/json/swagger/SwaggerTyped.scala b/utils/json-utils/src/main/scala/pl/touk/nussknacker/engine/json/swagger/SwaggerTyped.scala index 8a1d67928f6..60a4d175ac5 100644 --- a/utils/json-utils/src/main/scala/pl/touk/nussknacker/engine/json/swagger/SwaggerTyped.scala +++ b/utils/json-utils/src/main/scala/pl/touk/nussknacker/engine/json/swagger/SwaggerTyped.scala @@ -232,6 +232,8 @@ object SwaggerObject { case null => AdditionalPropertiesEnabled(SwaggerAny) case schema: Schema[_] if schema.getBooleanSchemaValue == false => AdditionalPropertiesDisabled case schema: Schema[_] => AdditionalPropertiesEnabled(SwaggerTyped(schema, swaggerRefSchemas, usedRefs)) + case additionalPropertyEnabled if additionalPropertyEnabled == true => AdditionalPropertiesEnabled(SwaggerAny) + case additionalPropertyEnabled if additionalPropertyEnabled == false => AdditionalPropertiesDisabled } SwaggerObject(properties, additionalProperties, patternProperties) }