Skip to content

Commit f0c3870

Browse files
committed
fixed output path
1 parent 981d2f1 commit f0c3870

File tree

1 file changed

+11
-2
lines changed
  • modules/swagger-generator/src/main/java/io/swagger/generator/online

1 file changed

+11
-2
lines changed

modules/swagger-generator/src/main/java/io/swagger/generator/online/Generator.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,19 @@ private static String generate(String language, GeneratorInput opts, Type type)
9090
throw new BadRequestException("The swagger specification supplied was not valid");
9191
}
9292

93+
String destPath = null;
94+
95+
if(opts != null && opts.getOptions() != null) {
96+
destPath = opts.getOptions().get("outputFolder");
97+
}
98+
if(destPath == null) {
99+
destPath = language + "-"
100+
+ type.getTypeName();
101+
}
102+
93103
ClientOptInput clientOptInput = new ClientOptInput();
94104
ClientOpts clientOpts = new ClientOpts();
95-
String outputFolder = getTmpFolder().getAbsolutePath() + File.separator + language + "-"
96-
+ type.getTypeName();
105+
String outputFolder = getTmpFolder().getAbsolutePath() + File.separator + destPath;
97106
String outputFilename = outputFolder + "-bundle.zip";
98107

99108
clientOptInput

0 commit comments

Comments
 (0)