heyile commented on a change in pull request #1157:  [SCB-1225][WIP][WEAK] 
swagger generator core not depend on dynamic class
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/1157#discussion_r270618414
 
 

 ##########
 File path: 
swagger/swagger-generator/generator-core/src/main/java/org/apache/servicecomb/swagger/extend/ModelResolverExt.java
 ##########
 @@ -148,10 +151,14 @@ public Property resolveProperty(JavaType propType, 
ModelConverterContext context
 
     Property property = super.resolveProperty(propType, context, annotations, 
next);
     if (StringProperty.class.isInstance(property)) {
-      if (StringPropertyConverter.isEnum((StringProperty) property)) {
+      if (isEnum(((StringProperty) property).getEnum())) {
         setType(propType, property.getVendorExtensions());
       }
     }
     return property;
   }
+
+  private boolean isEnum(List<String> enums) {
 
 Review comment:
   can be replaced with CollectionUtils.isEmpty(enums);

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to