Skip to content

Commit

Permalink
fixed output path
Browse files Browse the repository at this point in the history
  • Loading branch information
fehguy committed Mar 29, 2016
1 parent 981d2f1 commit f0c3870
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,19 @@ private static String generate(String language, GeneratorInput opts, Type type)
throw new BadRequestException("The swagger specification supplied was not valid");
}

String destPath = null;

if(opts != null && opts.getOptions() != null) {
destPath = opts.getOptions().get("outputFolder");
}
if(destPath == null) {
destPath = language + "-"
+ type.getTypeName();
}

ClientOptInput clientOptInput = new ClientOptInput();
ClientOpts clientOpts = new ClientOpts();
String outputFolder = getTmpFolder().getAbsolutePath() + File.separator + language + "-"
+ type.getTypeName();
String outputFolder = getTmpFolder().getAbsolutePath() + File.separator + destPath;
String outputFilename = outputFolder + "-bundle.zip";

clientOptInput
Expand Down

0 comments on commit f0c3870

Please sign in to comment.