Skip setting output folder in online service by wing328 · Pull Request #18652 · OpenAPITools/openapi-generator (original) (raw)

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