Skip to content

Commit 653630d

Browse files
authored
Merge pull request #560 from swagger-api/ticket-76
refs #76 - fix modelPackage and apiPackage in jaxrs-spec
2 parents 08a7523 + 069db3e commit 653630d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main/java/io/swagger/codegen/v3/generators/java/JavaJAXRSSpecServerCodegen.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,13 @@ public void processOpts() {
8282

8383
modelTemplateFiles.put("model.mustache", ".java");
8484
apiTemplateFiles.put("api.mustache", ".java");
85-
apiPackage = "io.swagger.api";
86-
modelPackage = "io.swagger.model";
85+
86+
if (StringUtils.isEmpty(apiPackage)) {
87+
apiPackage = "io.swagger.api";
88+
}
89+
if (StringUtils.isEmpty(modelPackage)) {
90+
modelPackage = "io.swagger.model";
91+
}
8792

8893
apiTestTemplateFiles.clear(); // TODO: add api test template
8994
modelTestTemplateFiles.clear(); // TODO: add model test template

0 commit comments

Comments
 (0)