Skip to content

Commit 7b7eaa8

Browse files
authored
Merge pull request #9345 from chris-prop/fix-for-9337
Add hasModel property to support file bundle
2 parents caea9f7 + 1b5f72f commit 7b7eaa8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/swagger-codegen/src/main/java/io/swagger/codegen/v3/DefaultGenerator.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,11 @@ private Map<String, Object> buildSupportFileBundle(List<Object> allOperations, L
682682
bundle.put("contextPath", contextPath);
683683
bundle.put("apiInfo", apis);
684684
bundle.put("models", allModels);
685+
boolean hasModel = true;
686+
if (allModels == null || allModels.isEmpty()) {
687+
hasModel = false;
688+
}
689+
bundle.put("hasModel", hasModel);
685690
bundle.put("apiFolder", config.apiPackage().replace('.', File.separatorChar));
686691
bundle.put("modelPackage", config.modelPackage());
687692

0 commit comments

Comments
 (0)