From a9e2e7add5ebf8248c0ba4cd5ccb2135442f0914 Mon Sep 17 00:00:00 2001 From: Hugo Mercado Date: Sat, 26 Aug 2023 18:00:01 -0500 Subject: [PATCH] add xml annotation to nested enums when withXml option is enable --- .../handlebars/JavaJaxRS/cxf/modelInnerEnum.mustache | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/resources/handlebars/JavaJaxRS/cxf/modelInnerEnum.mustache b/src/main/resources/handlebars/JavaJaxRS/cxf/modelInnerEnum.mustache index bd397a1208..384db158f5 100644 --- a/src/main/resources/handlebars/JavaJaxRS/cxf/modelInnerEnum.mustache +++ b/src/main/resources/handlebars/JavaJaxRS/cxf/modelInnerEnum.mustache @@ -1,6 +1,13 @@ + {{#withXml}} + @XmlType(name="{{datatypeWithEnum}}") + @XmlEnum({{datatypeWithEnum}}.class) + {{/withXml}} public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { {{#allowableValues}} {{#enumVars}} + {{#withXml}} + @XmlEnumValue({{#value}}{{{value}}}{{/value}}{{^value}}""{{/value}}) + {{/withXml}} {{{name}}}({{#value}}{{{value}}}{{/value}}{{^value}}null{{/value}}){{^@last}},{{/@last}}{{#@last}};{{/@last}} {{/enumVars}} {{/allowableValues}}