Skip to content

Commit

Permalink
Merge pull request payara#5146 from AlanRoth/FISH-1158
Browse files Browse the repository at this point in the history
FISH-1158 OpenAPI document creation failed when using @Schema annotation with Enum missing a nullcheck
  • Loading branch information
Alan committed Mar 3, 2021
1 parent f148dff commit 820fd43
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ private void vistEnumClass(AnnotationModel schemaAnnotation, EnumType enumType,
if (schema != null) {
SchemaImpl.merge(schema, newSchema, true, context);
}
if (schema == null || schema.getEnumeration().isEmpty()) {
if (schema == null || schema.getEnumeration() == null || schema.getEnumeration().isEmpty()) {
//if the schema annotation does not specify enums, then all enum fields will be added
for (FieldModel enumField : enumType.getStaticFields()) {
final String enumValue = enumField.getName();
Expand Down

0 comments on commit 820fd43

Please sign in to comment.