Skip to content

Commit

Permalink
Fix additionalProperty when true/false
Browse files Browse the repository at this point in the history
  • Loading branch information
philemone committed May 5, 2023
1 parent 0900036 commit 6f56a7e
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 6f56a7e

Please sign in to comment.