Bug Report Checklist
Description
When using the java generator, and the configOption withXml=true, the generated enum will be annotated with invalid annotations.
Actual:
public enum ExampleUriEnum {
@XmlEnumValue(URI.create("https://github.com/Chrimle/openapi-to-java-records-mustache-templates"))
HTTPS_GITHUB_COM_CHRIMLE_OPENAPI_TO_JAVA_RECORDS_MUSTACHE_TEMPLATES(URI.create("https://github.com/Chrimle/openapi-to-java-records-mustache-templates")),
@XmlEnumValue(URI.create("https://chrimle.github.io/openapi-to-java-records-mustache-templates/"))
HTTPS_CHRIMLE_GITHUB_IO_OPENAPI_TO_JAVA_RECORDS_MUSTACHE_TEMPLATES_(URI.create("https://chrimle.github.io/openapi-to-java-records-mustache-templates/"));
//...
}
The XmlEnumValue-annotation only accepts Strings...
openapi-generator version
2.23.0
OpenAPI declaration file content or url
schema:
ExampleUriEnum:
type: string
format: uri
description: Example of an Enum with URI values
enum:
- "https://github.com/Chrimle/openapi-to-java-records-mustache-templates"
- "https://chrimle.github.io/openapi-to-java-records-mustache-templates/"
Generation Details
configuration:
<generatorName>java</generatorName>
<configOptions>
<withXml>true</withXml>
</configOptions>
Steps to reproduce
See above.
Related issues/PRs
None.
Suggest a fix
Might need intervention in the codegen, since {{{value}}} is currently causing the issue...
Bug Report Checklist
Description
When using the
javagenerator, and the configOptionwithXml=true, the generated enum will be annotated with invalid annotations.Actual:
The
XmlEnumValue-annotation only acceptsStrings...openapi-generator version
2.23.0
OpenAPI declaration file content or url
schema:
Generation Details
configuration:
Steps to reproduce
See above.
Related issues/PRs
None.
Suggest a fix
Might need intervention in the codegen, since
{{{value}}}is currently causing the issue...