forked from loafle/openapi-generator-original
Merge pull request #1807 from wing328/java_fix_import
[Java] To fix missing imports in inline models
This commit is contained in:
@@ -476,11 +476,13 @@ public class JavaClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
model.imports.add("JsonSerialize");
|
||||
}
|
||||
}
|
||||
|
||||
if(model.isEnum == null || model.isEnum) {
|
||||
// needed by all pojos, but not enums
|
||||
model.imports.add("ApiModelProperty");
|
||||
model.imports.add("ApiModel");
|
||||
model.imports.add("Objects");
|
||||
// comment out below as it's in the model template
|
||||
//model.imports.add("Objects");
|
||||
|
||||
final String lib = getLibrary();
|
||||
if(StringUtils.isEmpty(lib) || "feign".equals(lib) || "jersey2".equals(lib)) {
|
||||
|
||||
Reference in New Issue
Block a user