fix top-level enum class checking (#1120)

This commit is contained in:
Yuen-Kuei Hsueh 2018-09-28 22:04:41 +08:00 committed by William Cheng
parent bd71e629a3
commit 8e57e0d44f

View File

@ -652,7 +652,7 @@ public class ModelUtils {
if (ref == null) {
LOGGER.warn("{} is not defined", schema.get$ref());
return schema;
} else if (isStringSchema(ref) && (ref.getEnum() != null && !ref.getEnum().isEmpty())) {
} else if (ref.getEnum() != null && !ref.getEnum().isEmpty()) {
// top-level enum class
return schema;
} else if (isArraySchema(ref) || isComposedSchema(ref)) { // array def should be created as models