Skip to content

Commit

Permalink
skip setting output folder in online service (#18652)
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 committed May 14, 2024
1 parent 4a872a8 commit edbb021
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,9 @@ private static String generate(String language, GeneratorInput opts, Type type)
throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The OpenAPI specification supplied was not valid");
}

String destPath = null;

if (opts.getOptions() != null) {
destPath = opts.getOptions().get("outputFolder");
}
if (destPath == null) {
destPath = language + "-" + type.getTypeName();
}
// do not use opts.getOptions().get("outputFolder") as the input can contain ../../
// to access other folders in the server
String destPath = language + "-" + type.getTypeName();

ClientOptInput clientOptInput = new ClientOptInput();
String outputFolder = getTmpFolder().getAbsolutePath() + File.separator + destPath;
Expand Down

0 comments on commit edbb021

Please sign in to comment.