[JAVA] Compilation error on DatasetApi ( defaultValue=""*:*"" )
Created by: staaouat
Description
An error (defaultValue="":"") occured on the gerated class DatasetApi from generating the server jaxrs-resteasy-eap.
In general all languges that generate defaultValue, has the same problem(the value of the defaultValue is generated with unnecessary double quotes ).
openapi-generator version
openapi-generator-cli-4.0.0-20190204
OpenAPI declaration file content or url
Command line used for generation
The following code is used for generation: private static String generate(String language, OpenAPI openAPI, Type type, String apiFileName) {
LOGGER.debug(String.format("generate %s for %s", type.getTypeName(), language));
if (openAPI == null) {
throw new IllegalArgumentException("No openAPI were supplied");
}
String destPath = language + "-" + type.getTypeName();
ClientOptInput clientOptInput = new ClientOptInput();
ClientOpts clientOpts = new ClientOpts();
String outputFolder = new File(Files.getGeneratedFilesFolder().getLocationURI().getPath(),
new File(apiFileName, destPath).getPath()).getAbsolutePath();
clientOptInput.opts(clientOpts).setOpenAPI(openAPI);
CodegenConfig codegenConfig = null;
try {
codegenConfig = CodegenConfigLoader.forName(language);
} catch (RuntimeException e) {
throw new IllegalArgumentException("Could not find codegen configuration for language " + language, e);
}
codegenConfig.additionalProperties().put("openAPI", openAPI);//$NON-NLS-1$
codegenConfig.setOutputDir(outputFolder);
LOGGER.debug(Json.pretty(clientOpts));
clientOptInput.setConfig(codegenConfig);
new DefaultGenerator().opts(clientOptInput).generate();
....
Steps to reproduce
Generate the server jaxrs-resteasy-eap using the uspto json file.
Related issues/PRs
[Java] Default values for string-type query parameters are generated with two sets of quotes #540 (closed)