Skip to content

Commit

Permalink
Merge pull request #4274 from TouK/fix_additionalProperty
Browse files Browse the repository at this point in the history
Fix additionalProperty when true/false
  • Loading branch information
philemone authored May 5, 2023
2 parents 0900036 + 6f56a7e commit 55e2ada
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/openapi/src/test/resources/swagger/swagger-20.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@
"type": "integer",
"format": "int32"
}
}
}
},
"additionalProperties": false
}
},
"400": {
"description": "Problem with request"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 55e2ada

Please sign in to comment.