Description
I used generatorName java with a simple Swagger 3.0 spec file.
I noticed that the withXml option of the Maven plugin is not used. After issuing mvn clean generate-sources the sources are not annotated with @Xml* annotations.
This can be verified with verbose maven pluging configuration option set to true where at the very end of execution I noticed:
"modelDocPath" : "docs/",
"withXml" : false,
"scmDeveloperConnection" : "scm:git:[email protected]:openapitools/openapi-generator.git",
"feignVersion" : "9.x",
"licenseUrl" : "http://unlicense.org",
"jsr310" : "true",
To get generated model with @Xml* annotations, I used additionalProperties.
openapi-generator version
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>4.1.1</version>
Seems to be working with
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>3.0.11</version>
OpenAPI declaration file content or url
Complete Maven example project: https://github.com/RockyMM/openapi-modelgen-test
Command line used for generation
mvn clean generate-sources
Suggest a fix
After 10 minute search (without cloning openapi-generator) I would start looking in AbstractJavaCodegen class, as the maven plugin class seems to be working correctly. But then again, I am really not not not familiar with the project.
Description
I used
generatorNamejava with a simple Swagger 3.0 spec file.I noticed that the
withXmloption of the Maven plugin is not used. After issuingmvn clean generate-sourcesthe sources are not annotated with@Xml*annotations.This can be verified with
verbosemaven pluging configuration option set totruewhere at the very end of execution I noticed:To get generated model with
@Xml*annotations, I usedadditionalProperties.openapi-generator version
Seems to be working with
OpenAPI declaration file content or url
Complete Maven example project: https://github.com/RockyMM/openapi-modelgen-test
Command line used for generation
mvn clean generate-sourcesSuggest a fix
After 10 minute search (without cloning openapi-generator) I would start looking in AbstractJavaCodegen class, as the maven plugin class seems to be working correctly. But then again, I am really not not not familiar with the project.