diff --git a/swagger-brake/src/main/java/io/redskap/swagger/brake/core/model/Schema.java b/swagger-brake/src/main/java/io/redskap/swagger/brake/core/model/Schema.java index c6d01299..d65342fe 100644 --- a/swagger-brake/src/main/java/io/redskap/swagger/brake/core/model/Schema.java +++ b/swagger-brake/src/main/java/io/redskap/swagger/brake/core/model/Schema.java @@ -12,6 +12,7 @@ import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; +import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.Pair; import org.springframework.util.CollectionUtils; @@ -120,7 +121,7 @@ public Set getRequiredAttributeNames() { StringJoiner stringJoiner = new StringJoiner("."); pieces.subList(0, i + 1).forEach(stringJoiner::add); String attrToSearchFor = stringJoiner.toString(); - Boolean isRequired = attributeRequiredMap.get(attrToSearchFor); + boolean isRequired = BooleanUtils.toBoolean(attributeRequiredMap.get(attrToSearchFor)); if (!isRequired) { hierarchicallyNotRequired = true; break;