Hi,

I've been using Swagger-Codegen maven plugin to generate java Server stubs. 
Below is a code snippet of the configuration from a pom.xml file. By 
default all the fields in date-time format are being converted to DateTime 
java type. How can I configure this plugin to convert date-time fields to a 
different date type like XMLGregorianCalendar? the documentation suggests 
using type-mappings, but I can't get it to work: in what format should I 
pass parameters to <type-mappings> option? Your help will be appreciated. 

<plugin>
   <groupId>io.swagger</groupId>
   <artifactId>swagger-codegen-maven-plugin</artifactId>
   <version>2.1.6</version>
   <executions>
      <execution>
         <id>supplyItemIRO-v1</id>
         <goals>
            <goal>generate</goal>
         </goals>
         <configuration>
            
<inputSpec>src/main/resources/json/SupplyItemIROCanonicalAPI.json</inputSpec>
            <language>jaxrs-cxf</language>
            <configOptions>
               <sourceFolder>src/java/main</sourceFolder>
               <serializableModel>true</serializableModel>
               <dateLibrary>joda</dateLibrary>
               <type-mappings></type-mappings>
            </configOptions>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to