You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
java client generator, without any particular option
JavaClientCodegen config = new org.openapitools.codegen.languages.JavaClientCodegen();
config.setArtifactId(artifactId);
config.setJava8Mode(true);
Path outputDirPath = Paths.get(outputDir);
config.setHideGenerationTimestamp(true);
config.setOutputDir(outputDir);
final OpenAPIParser openApiParser = new OpenAPIParser();
final ParseOptions options = new ParseOptions();
final OpenAPI openAPI = openApiParser.readLocation(inputSpec, null, options).getOpenAPI();
final ClientOptInput opts = new ClientOptInput();
opts.setConfig(config);
opts.setOpenAPI(openAPI);
opts.setOpts(new ClientOpts());
new DefaultGenerator().opts(opts).generate();
resulting in < and > symbols instead of < and >
@andymoody : there is easy to fix in the templates:
instead of using {{type}} you need to use {{{type}}} or the other way around (one notation is creating < and > the other one is creating the < and > brackets).
Description
When an model is an array of enums, the type is not the correct one.
openapi-generator version
3.0.0-SNAPSHOT
OpenAPI declaration file content or url
Command line used for generation
java client generator, without any particular option
Suggest a fix/enhancement
Model class is:
Should be a
ArrayList
of the enum type (maybe an inner enum) instead ofString
Work around:
Use an indirection over
$ref
:The text was updated successfully, but these errors were encountered: