forked from loafle/openapi-generator-original
dateLibrary java8 does works now with xml (#8444)
Co-authored-by: v.bychkov <v.bychkov@betterbits.de>
This commit is contained in:
committed by
GitHub
parent
153cfeb7ae
commit
434464c898
@@ -239,6 +239,11 @@
|
||||
<artifactId>jackson-dataformat-xml</artifactId>
|
||||
<version>${jackson-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.github.threeten-jaxb</groupId>
|
||||
<artifactId>threeten-jaxb-core</artifactId>
|
||||
<version>1.2</version>
|
||||
</dependency>
|
||||
|
||||
{{/withXml}}
|
||||
<dependency>
|
||||
|
||||
@@ -26,6 +26,8 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
{{/jackson}}
|
||||
{{#withXml}}
|
||||
import javax.xml.bind.annotation.*;
|
||||
import javax.xml.bind.annotation.adapters.*;
|
||||
import io.github.threetenjaxb.core.*;
|
||||
{{/withXml}}
|
||||
{{#jsonb}}
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
@@ -59,6 +59,9 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
|
||||
@XmlElementWrapper({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}")
|
||||
{{/isXmlWrapped}}
|
||||
{{/isContainer}}
|
||||
{{#isDateTime}}
|
||||
@XmlJavaTypeAdapter(OffsetDateTimeXmlAdapter.class)
|
||||
{{/isDateTime}}
|
||||
{{/isXmlAttribute}}
|
||||
{{/withXml}}
|
||||
{{#gson}}
|
||||
|
||||
Reference in New Issue
Block a user