From bf7e4e7df78d64063050ac2f40b98b5547923a5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Bresson?= Date: Sun, 13 May 2018 13:58:46 +0200 Subject: [PATCH] Java gson: add @SerializedName value as constant (#22) * Java gson: add @SerializedName value as constant Fix #21 * Run bin/java-petstore-all.sh --- .../src/main/resources/Java/pojo.mustache | 3 +- .../client/petstore/java/jersey1/build.gradle | 17 +++++++- .../model/AdditionalPropertiesClass.java | 6 ++- .../org/openapitools/client/model/Animal.java | 6 ++- .../model/ArrayOfArrayOfNumberOnly.java | 3 +- .../client/model/ArrayOfNumberOnly.java | 3 +- .../openapitools/client/model/ArrayTest.java | 9 +++-- .../client/model/Capitalization.java | 18 ++++++--- .../org/openapitools/client/model/Cat.java | 3 +- .../openapitools/client/model/Category.java | 6 ++- .../openapitools/client/model/ClassModel.java | 3 +- .../org/openapitools/client/model/Client.java | 3 +- .../org/openapitools/client/model/Dog.java | 3 +- .../openapitools/client/model/EnumArrays.java | 6 ++- .../openapitools/client/model/EnumTest.java | 15 ++++--- .../openapitools/client/model/FormatTest.java | 39 ++++++++++++------- .../client/model/HasOnlyReadOnly.java | 6 ++- .../openapitools/client/model/MapTest.java | 6 ++- ...ropertiesAndAdditionalPropertiesClass.java | 9 +++-- .../client/model/Model200Response.java | 6 ++- .../client/model/ModelApiResponse.java | 9 +++-- .../client/model/ModelReturn.java | 3 +- .../org/openapitools/client/model/Name.java | 12 ++++-- .../openapitools/client/model/NumberOnly.java | 3 +- .../org/openapitools/client/model/Order.java | 18 ++++++--- .../client/model/OuterComposite.java | 9 +++-- .../org/openapitools/client/model/Pet.java | 18 ++++++--- .../client/model/ReadOnlyFirst.java | 6 ++- .../client/model/SpecialModelName.java | 3 +- .../org/openapitools/client/model/Tag.java | 6 ++- .../org/openapitools/client/model/User.java | 24 ++++++++---- .../model/AdditionalPropertiesClass.java | 6 ++- .../org/openapitools/client/model/Animal.java | 6 ++- .../model/ArrayOfArrayOfNumberOnly.java | 3 +- .../client/model/ArrayOfNumberOnly.java | 3 +- .../openapitools/client/model/ArrayTest.java | 9 +++-- .../client/model/Capitalization.java | 18 ++++++--- .../org/openapitools/client/model/Cat.java | 3 +- .../openapitools/client/model/Category.java | 6 ++- .../openapitools/client/model/ClassModel.java | 3 +- .../org/openapitools/client/model/Client.java | 3 +- .../org/openapitools/client/model/Dog.java | 3 +- .../openapitools/client/model/EnumArrays.java | 6 ++- .../openapitools/client/model/EnumTest.java | 15 ++++--- .../openapitools/client/model/FormatTest.java | 39 ++++++++++++------- .../client/model/HasOnlyReadOnly.java | 6 ++- .../openapitools/client/model/MapTest.java | 6 ++- ...ropertiesAndAdditionalPropertiesClass.java | 9 +++-- .../client/model/Model200Response.java | 6 ++- .../client/model/ModelApiResponse.java | 9 +++-- .../client/model/ModelReturn.java | 3 +- .../org/openapitools/client/model/Name.java | 12 ++++-- .../openapitools/client/model/NumberOnly.java | 3 +- .../org/openapitools/client/model/Order.java | 18 ++++++--- .../client/model/OuterComposite.java | 9 +++-- .../org/openapitools/client/model/Pet.java | 18 ++++++--- .../client/model/ReadOnlyFirst.java | 6 ++- .../client/model/SpecialModelName.java | 3 +- .../org/openapitools/client/model/Tag.java | 6 ++- .../org/openapitools/client/model/User.java | 24 ++++++++---- .../model/AdditionalPropertiesClass.java | 6 ++- .../org/openapitools/client/model/Animal.java | 6 ++- .../model/ArrayOfArrayOfNumberOnly.java | 3 +- .../client/model/ArrayOfNumberOnly.java | 3 +- .../openapitools/client/model/ArrayTest.java | 9 +++-- .../client/model/Capitalization.java | 18 ++++++--- .../org/openapitools/client/model/Cat.java | 3 +- .../openapitools/client/model/Category.java | 6 ++- .../openapitools/client/model/ClassModel.java | 3 +- .../org/openapitools/client/model/Client.java | 3 +- .../org/openapitools/client/model/Dog.java | 3 +- .../openapitools/client/model/EnumArrays.java | 6 ++- .../openapitools/client/model/EnumTest.java | 15 ++++--- .../openapitools/client/model/FormatTest.java | 39 ++++++++++++------- .../client/model/HasOnlyReadOnly.java | 6 ++- .../openapitools/client/model/MapTest.java | 6 ++- ...ropertiesAndAdditionalPropertiesClass.java | 9 +++-- .../client/model/Model200Response.java | 6 ++- .../client/model/ModelApiResponse.java | 9 +++-- .../client/model/ModelReturn.java | 3 +- .../org/openapitools/client/model/Name.java | 12 ++++-- .../openapitools/client/model/NumberOnly.java | 3 +- .../org/openapitools/client/model/Order.java | 18 ++++++--- .../client/model/OuterComposite.java | 9 +++-- .../org/openapitools/client/model/Pet.java | 18 ++++++--- .../client/model/ReadOnlyFirst.java | 6 ++- .../client/model/SpecialModelName.java | 3 +- .../org/openapitools/client/model/Tag.java | 6 ++- .../org/openapitools/client/model/User.java | 24 ++++++++---- .../model/AdditionalPropertiesClass.java | 6 ++- .../org/openapitools/client/model/Animal.java | 6 ++- .../model/ArrayOfArrayOfNumberOnly.java | 3 +- .../client/model/ArrayOfNumberOnly.java | 3 +- .../openapitools/client/model/ArrayTest.java | 9 +++-- .../client/model/Capitalization.java | 18 ++++++--- .../org/openapitools/client/model/Cat.java | 3 +- .../openapitools/client/model/Category.java | 6 ++- .../openapitools/client/model/ClassModel.java | 3 +- .../org/openapitools/client/model/Client.java | 3 +- .../org/openapitools/client/model/Dog.java | 3 +- .../openapitools/client/model/EnumArrays.java | 6 ++- .../openapitools/client/model/EnumTest.java | 15 ++++--- .../openapitools/client/model/FormatTest.java | 39 ++++++++++++------- .../client/model/HasOnlyReadOnly.java | 6 ++- .../openapitools/client/model/MapTest.java | 6 ++- ...ropertiesAndAdditionalPropertiesClass.java | 9 +++-- .../client/model/Model200Response.java | 6 ++- .../client/model/ModelApiResponse.java | 9 +++-- .../client/model/ModelReturn.java | 3 +- .../org/openapitools/client/model/Name.java | 12 ++++-- .../openapitools/client/model/NumberOnly.java | 3 +- .../org/openapitools/client/model/Order.java | 18 ++++++--- .../client/model/OuterComposite.java | 9 +++-- .../org/openapitools/client/model/Pet.java | 18 ++++++--- .../client/model/ReadOnlyFirst.java | 6 ++- .../client/model/SpecialModelName.java | 3 +- .../org/openapitools/client/model/Tag.java | 6 ++- .../org/openapitools/client/model/User.java | 24 ++++++++---- .../model/AdditionalPropertiesClass.java | 6 ++- .../org/openapitools/client/model/Animal.java | 6 ++- .../model/ArrayOfArrayOfNumberOnly.java | 3 +- .../client/model/ArrayOfNumberOnly.java | 3 +- .../openapitools/client/model/ArrayTest.java | 9 +++-- .../client/model/Capitalization.java | 18 ++++++--- .../org/openapitools/client/model/Cat.java | 3 +- .../openapitools/client/model/Category.java | 6 ++- .../openapitools/client/model/ClassModel.java | 3 +- .../org/openapitools/client/model/Client.java | 3 +- .../org/openapitools/client/model/Dog.java | 3 +- .../openapitools/client/model/EnumArrays.java | 6 ++- .../openapitools/client/model/EnumTest.java | 15 ++++--- .../openapitools/client/model/FormatTest.java | 39 ++++++++++++------- .../client/model/HasOnlyReadOnly.java | 6 ++- .../openapitools/client/model/MapTest.java | 6 ++- ...ropertiesAndAdditionalPropertiesClass.java | 9 +++-- .../client/model/Model200Response.java | 6 ++- .../client/model/ModelApiResponse.java | 9 +++-- .../client/model/ModelReturn.java | 3 +- .../org/openapitools/client/model/Name.java | 12 ++++-- .../openapitools/client/model/NumberOnly.java | 3 +- .../org/openapitools/client/model/Order.java | 18 ++++++--- .../client/model/OuterComposite.java | 9 +++-- .../org/openapitools/client/model/Pet.java | 18 ++++++--- .../client/model/ReadOnlyFirst.java | 6 ++- .../client/model/SpecialModelName.java | 3 +- .../org/openapitools/client/model/Tag.java | 6 ++- .../org/openapitools/client/model/User.java | 24 ++++++++---- .../model/AdditionalPropertiesClass.java | 6 ++- .../org/openapitools/client/model/Animal.java | 6 ++- .../model/ArrayOfArrayOfNumberOnly.java | 3 +- .../client/model/ArrayOfNumberOnly.java | 3 +- .../openapitools/client/model/ArrayTest.java | 9 +++-- .../client/model/Capitalization.java | 18 ++++++--- .../org/openapitools/client/model/Cat.java | 3 +- .../openapitools/client/model/Category.java | 6 ++- .../openapitools/client/model/ClassModel.java | 3 +- .../org/openapitools/client/model/Client.java | 3 +- .../org/openapitools/client/model/Dog.java | 3 +- .../openapitools/client/model/EnumArrays.java | 6 ++- .../openapitools/client/model/EnumTest.java | 15 ++++--- .../openapitools/client/model/FormatTest.java | 39 ++++++++++++------- .../client/model/HasOnlyReadOnly.java | 6 ++- .../openapitools/client/model/MapTest.java | 6 ++- ...ropertiesAndAdditionalPropertiesClass.java | 9 +++-- .../client/model/Model200Response.java | 6 ++- .../client/model/ModelApiResponse.java | 9 +++-- .../client/model/ModelReturn.java | 3 +- .../org/openapitools/client/model/Name.java | 12 ++++-- .../openapitools/client/model/NumberOnly.java | 3 +- .../org/openapitools/client/model/Order.java | 18 ++++++--- .../client/model/OuterComposite.java | 9 +++-- .../org/openapitools/client/model/Pet.java | 18 ++++++--- .../client/model/ReadOnlyFirst.java | 6 ++- .../client/model/SpecialModelName.java | 3 +- .../org/openapitools/client/model/Tag.java | 6 ++- .../org/openapitools/client/model/User.java | 24 ++++++++---- .../model/AdditionalPropertiesClass.java | 6 ++- .../org/openapitools/client/model/Animal.java | 6 ++- .../model/ArrayOfArrayOfNumberOnly.java | 3 +- .../client/model/ArrayOfNumberOnly.java | 3 +- .../openapitools/client/model/ArrayTest.java | 9 +++-- .../client/model/Capitalization.java | 18 ++++++--- .../org/openapitools/client/model/Cat.java | 3 +- .../openapitools/client/model/Category.java | 6 ++- .../openapitools/client/model/ClassModel.java | 3 +- .../org/openapitools/client/model/Client.java | 3 +- .../org/openapitools/client/model/Dog.java | 3 +- .../openapitools/client/model/EnumArrays.java | 6 ++- .../openapitools/client/model/EnumTest.java | 15 ++++--- .../openapitools/client/model/FormatTest.java | 39 ++++++++++++------- .../client/model/HasOnlyReadOnly.java | 6 ++- .../openapitools/client/model/MapTest.java | 6 ++- ...ropertiesAndAdditionalPropertiesClass.java | 9 +++-- .../client/model/Model200Response.java | 6 ++- .../client/model/ModelApiResponse.java | 9 +++-- .../client/model/ModelReturn.java | 3 +- .../org/openapitools/client/model/Name.java | 12 ++++-- .../openapitools/client/model/NumberOnly.java | 3 +- .../org/openapitools/client/model/Order.java | 18 ++++++--- .../client/model/OuterComposite.java | 9 +++-- .../org/openapitools/client/model/Pet.java | 18 ++++++--- .../client/model/ReadOnlyFirst.java | 6 ++- .../client/model/SpecialModelName.java | 3 +- .../org/openapitools/client/model/Tag.java | 6 ++- .../org/openapitools/client/model/User.java | 24 ++++++++---- 205 files changed, 1236 insertions(+), 611 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/pojo.mustache b/modules/openapi-generator/src/main/resources/Java/pojo.mustache index 3224cb256dd1..52dccb3c0951 100644 --- a/modules/openapi-generator/src/main/resources/Java/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/Java/pojo.mustache @@ -57,7 +57,8 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#parcela {{/isXmlAttribute}} {{/withXml}} {{#gson}} - @SerializedName("{{baseName}}") + public static final String SERIALIZED_NAME_{{nameInCamelCase}} = "{{baseName}}"; + @SerializedName(SERIALIZED_NAME_{{nameInCamelCase}}) {{/gson}} {{#isContainer}} private {{{datatypeWithEnum}}} {{name}}{{#required}} = {{{defaultValue}}}{{/required}}{{^required}} = null{{/required}}; diff --git a/samples/client/petstore/java/jersey1/build.gradle b/samples/client/petstore/java/jersey1/build.gradle index 92175ba04f83..54a5f0626a53 100644 --- a/samples/client/petstore/java/jersey1/build.gradle +++ b/samples/client/petstore/java/jersey1/build.gradle @@ -18,7 +18,6 @@ repositories { jcenter() } - if(hasProperty('target') && target == 'android') { apply plugin: 'com.android.library' @@ -91,6 +90,21 @@ if(hasProperty('target') && target == 'android') { main = System.getProperty('mainClass') classpath = sourceSets.main.runtimeClasspath } + + task sourcesJar(type: Jar, dependsOn: classes) { + classifier = 'sources' + from sourceSets.main.allSource + } + + task javadocJar(type: Jar, dependsOn: javadoc) { + classifier = 'javadoc' + from javadoc.destinationDir + } + + artifacts { + archives sourcesJar + archives javadocJar + } } ext { @@ -113,3 +127,4 @@ dependencies { compile "com.brsanthu:migbase64:2.2" testCompile "junit:junit:$junit_version" } + diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 2da92bafbdf8..ecd8740f7a8f 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -34,10 +34,12 @@ */ public class AdditionalPropertiesClass implements Parcelable { - @SerializedName("map_property") + public static final String SERIALIZED_NAME_MapProperty = "map_property"; + @SerializedName(SERIALIZED_NAME_MapProperty) private Map mapProperty = null; - @SerializedName("map_of_map_property") + public static final String SERIALIZED_NAME_MapOfMapProperty = "map_of_map_property"; + @SerializedName(SERIALIZED_NAME_MapOfMapProperty) private Map> mapOfMapProperty = null; public AdditionalPropertiesClass() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Animal.java index 53601d46b1a2..4e4e71c7efcb 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Animal.java @@ -32,10 +32,12 @@ public class Animal implements Parcelable { - @SerializedName("className") + public static final String SERIALIZED_NAME_ClassName = "className"; + @SerializedName(SERIALIZED_NAME_ClassName) private String className = null; - @SerializedName("color") + public static final String SERIALIZED_NAME_Color = "color"; + @SerializedName(SERIALIZED_NAME_Color) private String color = "red"; public Animal() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index d7c53d6696c3..4239586bdd0f 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -34,7 +34,8 @@ */ public class ArrayOfArrayOfNumberOnly implements Parcelable { - @SerializedName("ArrayArrayNumber") + public static final String SERIALIZED_NAME_ArrayArrayNumber = "ArrayArrayNumber"; + @SerializedName(SERIALIZED_NAME_ArrayArrayNumber) private List> arrayArrayNumber = null; public ArrayOfArrayOfNumberOnly() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 94a7cd5be793..fe22d975e866 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -34,7 +34,8 @@ */ public class ArrayOfNumberOnly implements Parcelable { - @SerializedName("ArrayNumber") + public static final String SERIALIZED_NAME_ArrayNumber = "ArrayNumber"; + @SerializedName(SERIALIZED_NAME_ArrayNumber) private List arrayNumber = null; public ArrayOfNumberOnly() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayTest.java index e02f4eceb340..198ccfdced5c 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -34,13 +34,16 @@ */ public class ArrayTest implements Parcelable { - @SerializedName("array_of_string") + public static final String SERIALIZED_NAME_ArrayOfString = "array_of_string"; + @SerializedName(SERIALIZED_NAME_ArrayOfString) private List arrayOfString = null; - @SerializedName("array_array_of_integer") + public static final String SERIALIZED_NAME_ArrayArrayOfInteger = "array_array_of_integer"; + @SerializedName(SERIALIZED_NAME_ArrayArrayOfInteger) private List> arrayArrayOfInteger = null; - @SerializedName("array_array_of_model") + public static final String SERIALIZED_NAME_ArrayArrayOfModel = "array_array_of_model"; + @SerializedName(SERIALIZED_NAME_ArrayArrayOfModel) private List> arrayArrayOfModel = null; public ArrayTest() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Capitalization.java index 242309a6b31a..039295595f10 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Capitalization.java @@ -31,22 +31,28 @@ */ public class Capitalization implements Parcelable { - @SerializedName("smallCamel") + public static final String SERIALIZED_NAME_SmallCamel = "smallCamel"; + @SerializedName(SERIALIZED_NAME_SmallCamel) private String smallCamel = null; - @SerializedName("CapitalCamel") + public static final String SERIALIZED_NAME_CapitalCamel = "CapitalCamel"; + @SerializedName(SERIALIZED_NAME_CapitalCamel) private String capitalCamel = null; - @SerializedName("small_Snake") + public static final String SERIALIZED_NAME_SmallSnake = "small_Snake"; + @SerializedName(SERIALIZED_NAME_SmallSnake) private String smallSnake = null; - @SerializedName("Capital_Snake") + public static final String SERIALIZED_NAME_CapitalSnake = "Capital_Snake"; + @SerializedName(SERIALIZED_NAME_CapitalSnake) private String capitalSnake = null; - @SerializedName("SCA_ETH_Flow_Points") + public static final String SERIALIZED_NAME_ScAETHFlowPoints = "SCA_ETH_Flow_Points"; + @SerializedName(SERIALIZED_NAME_ScAETHFlowPoints) private String scAETHFlowPoints = null; - @SerializedName("ATT_NAME") + public static final String SERIALIZED_NAME_ATTNAME = "ATT_NAME"; + @SerializedName(SERIALIZED_NAME_ATTNAME) private String ATT_NAME = null; public Capitalization() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Cat.java index 108dcb430327..7646d3633179 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Cat.java @@ -32,7 +32,8 @@ */ public class Cat extends Animal implements Parcelable { - @SerializedName("declawed") + public static final String SERIALIZED_NAME_Declawed = "declawed"; + @SerializedName(SERIALIZED_NAME_Declawed) private Boolean declawed = null; public Cat() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Category.java index 869447653bda..e56a24b31e81 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Category.java @@ -31,10 +31,12 @@ */ public class Category implements Parcelable { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private String name = null; public Category() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ClassModel.java index 3ad17265ebd3..5530626fcf50 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ClassModel.java @@ -32,7 +32,8 @@ @ApiModel(description = "Model for testing model with \"_class\" property") public class ClassModel implements Parcelable { - @SerializedName("_class") + public static final String SERIALIZED_NAME_PropertyClass = "_class"; + @SerializedName(SERIALIZED_NAME_PropertyClass) private String propertyClass = null; public ClassModel() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Client.java index 447cd688af3e..551d2e405143 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Client.java @@ -31,7 +31,8 @@ */ public class Client implements Parcelable { - @SerializedName("client") + public static final String SERIALIZED_NAME_Client = "client"; + @SerializedName(SERIALIZED_NAME_Client) private String client = null; public Client() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Dog.java index 996cd52c3da7..6761f9b195ba 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Dog.java @@ -32,7 +32,8 @@ */ public class Dog extends Animal implements Parcelable { - @SerializedName("breed") + public static final String SERIALIZED_NAME_Breed = "breed"; + @SerializedName(SERIALIZED_NAME_Breed) private String breed = null; public Dog() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumArrays.java index ce5386696001..acfb063c1ca3 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -80,7 +80,8 @@ public JustSymbolEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("just_symbol") + public static final String SERIALIZED_NAME_JustSymbol = "just_symbol"; + @SerializedName(SERIALIZED_NAME_JustSymbol) private JustSymbolEnum justSymbol = null; /** @@ -130,7 +131,8 @@ public ArrayEnumEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("array_enum") + public static final String SERIALIZED_NAME_ArrayEnum = "array_enum"; + @SerializedName(SERIALIZED_NAME_ArrayEnum) private List arrayEnum = null; public EnumArrays() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumTest.java index bfff55e0ae5b..1f429a645195 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/EnumTest.java @@ -81,7 +81,8 @@ public EnumStringEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("enum_string") + public static final String SERIALIZED_NAME_EnumString = "enum_string"; + @SerializedName(SERIALIZED_NAME_EnumString) private EnumStringEnum enumString = null; /** @@ -133,7 +134,8 @@ public EnumStringRequiredEnum read(final JsonReader jsonReader) throws IOExcepti } } - @SerializedName("enum_string_required") + public static final String SERIALIZED_NAME_EnumStringRequired = "enum_string_required"; + @SerializedName(SERIALIZED_NAME_EnumStringRequired) private EnumStringRequiredEnum enumStringRequired = null; /** @@ -183,7 +185,8 @@ public EnumIntegerEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("enum_integer") + public static final String SERIALIZED_NAME_EnumInteger = "enum_integer"; + @SerializedName(SERIALIZED_NAME_EnumInteger) private EnumIntegerEnum enumInteger = null; /** @@ -233,10 +236,12 @@ public EnumNumberEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("enum_number") + public static final String SERIALIZED_NAME_EnumNumber = "enum_number"; + @SerializedName(SERIALIZED_NAME_EnumNumber) private EnumNumberEnum enumNumber = null; - @SerializedName("outerEnum") + public static final String SERIALIZED_NAME_OuterEnum = "outerEnum"; + @SerializedName(SERIALIZED_NAME_OuterEnum) private OuterEnum outerEnum = null; public EnumTest() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FormatTest.java index 0ebf9ad3766d..9a43acb6b44c 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/FormatTest.java @@ -36,43 +36,56 @@ */ public class FormatTest implements Parcelable { - @SerializedName("integer") + public static final String SERIALIZED_NAME_Integer = "integer"; + @SerializedName(SERIALIZED_NAME_Integer) private Integer integer = null; - @SerializedName("int32") + public static final String SERIALIZED_NAME_Int32 = "int32"; + @SerializedName(SERIALIZED_NAME_Int32) private Integer int32 = null; - @SerializedName("int64") + public static final String SERIALIZED_NAME_Int64 = "int64"; + @SerializedName(SERIALIZED_NAME_Int64) private Long int64 = null; - @SerializedName("number") + public static final String SERIALIZED_NAME_Number = "number"; + @SerializedName(SERIALIZED_NAME_Number) private BigDecimal number = null; - @SerializedName("float") + public static final String SERIALIZED_NAME_Float = "float"; + @SerializedName(SERIALIZED_NAME_Float) private Float _float = null; - @SerializedName("double") + public static final String SERIALIZED_NAME_Double = "double"; + @SerializedName(SERIALIZED_NAME_Double) private Double _double = null; - @SerializedName("string") + public static final String SERIALIZED_NAME_String = "string"; + @SerializedName(SERIALIZED_NAME_String) private String string = null; - @SerializedName("byte") + public static final String SERIALIZED_NAME_Byte = "byte"; + @SerializedName(SERIALIZED_NAME_Byte) private byte[] _byte = null; - @SerializedName("binary") + public static final String SERIALIZED_NAME_Binary = "binary"; + @SerializedName(SERIALIZED_NAME_Binary) private File binary = null; - @SerializedName("date") + public static final String SERIALIZED_NAME_Date = "date"; + @SerializedName(SERIALIZED_NAME_Date) private LocalDate date = null; - @SerializedName("dateTime") + public static final String SERIALIZED_NAME_DateTime = "dateTime"; + @SerializedName(SERIALIZED_NAME_DateTime) private OffsetDateTime dateTime = null; - @SerializedName("uuid") + public static final String SERIALIZED_NAME_Uuid = "uuid"; + @SerializedName(SERIALIZED_NAME_Uuid) private UUID uuid = null; - @SerializedName("password") + public static final String SERIALIZED_NAME_Password = "password"; + @SerializedName(SERIALIZED_NAME_Password) private String password = null; public FormatTest() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index cc2f45030758..c4ec66086144 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -31,10 +31,12 @@ */ public class HasOnlyReadOnly implements Parcelable { - @SerializedName("bar") + public static final String SERIALIZED_NAME_Bar = "bar"; + @SerializedName(SERIALIZED_NAME_Bar) private String bar = null; - @SerializedName("foo") + public static final String SERIALIZED_NAME_Foo = "foo"; + @SerializedName(SERIALIZED_NAME_Foo) private String foo = null; public HasOnlyReadOnly() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MapTest.java index e48754853420..ea1665f91b3c 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MapTest.java @@ -34,7 +34,8 @@ */ public class MapTest implements Parcelable { - @SerializedName("map_map_of_string") + public static final String SERIALIZED_NAME_MapMapOfString = "map_map_of_string"; + @SerializedName(SERIALIZED_NAME_MapMapOfString) private Map> mapMapOfString = null; /** @@ -84,7 +85,8 @@ public InnerEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("map_of_enum_string") + public static final String SERIALIZED_NAME_MapOfEnumString = "map_of_enum_string"; + @SerializedName(SERIALIZED_NAME_MapOfEnumString) private Map mapOfEnumString = null; public MapTest() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 045a2c5968e6..25b348b1ff17 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -37,13 +37,16 @@ */ public class MixedPropertiesAndAdditionalPropertiesClass implements Parcelable { - @SerializedName("uuid") + public static final String SERIALIZED_NAME_Uuid = "uuid"; + @SerializedName(SERIALIZED_NAME_Uuid) private UUID uuid = null; - @SerializedName("dateTime") + public static final String SERIALIZED_NAME_DateTime = "dateTime"; + @SerializedName(SERIALIZED_NAME_DateTime) private OffsetDateTime dateTime = null; - @SerializedName("map") + public static final String SERIALIZED_NAME_Map = "map"; + @SerializedName(SERIALIZED_NAME_Map) private Map map = null; public MixedPropertiesAndAdditionalPropertiesClass() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Model200Response.java index 4744d3f08a43..cca7330cbb60 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Model200Response.java @@ -32,10 +32,12 @@ @ApiModel(description = "Model for testing model name starting with number") public class Model200Response implements Parcelable { - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private Integer name = null; - @SerializedName("class") + public static final String SERIALIZED_NAME_PropertyClass = "class"; + @SerializedName(SERIALIZED_NAME_PropertyClass) private String propertyClass = null; public Model200Response() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 25f4e70469f0..be6e137551a9 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -31,13 +31,16 @@ */ public class ModelApiResponse implements Parcelable { - @SerializedName("code") + public static final String SERIALIZED_NAME_Code = "code"; + @SerializedName(SERIALIZED_NAME_Code) private Integer code = null; - @SerializedName("type") + public static final String SERIALIZED_NAME_Type = "type"; + @SerializedName(SERIALIZED_NAME_Type) private String type = null; - @SerializedName("message") + public static final String SERIALIZED_NAME_Message = "message"; + @SerializedName(SERIALIZED_NAME_Message) private String message = null; public ModelApiResponse() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelReturn.java index bb87ca3a43cd..4d165ac25109 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -32,7 +32,8 @@ @ApiModel(description = "Model for testing reserved words") public class ModelReturn implements Parcelable { - @SerializedName("return") + public static final String SERIALIZED_NAME_Return = "return"; + @SerializedName(SERIALIZED_NAME_Return) private Integer _return = null; public ModelReturn() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Name.java index a4a78852bdb4..814c4c9a34b1 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Name.java @@ -32,16 +32,20 @@ @ApiModel(description = "Model for testing model name same as property name") public class Name implements Parcelable { - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private Integer name = null; - @SerializedName("snake_case") + public static final String SERIALIZED_NAME_SnakeCase = "snake_case"; + @SerializedName(SERIALIZED_NAME_SnakeCase) private Integer snakeCase = null; - @SerializedName("property") + public static final String SERIALIZED_NAME_Property = "property"; + @SerializedName(SERIALIZED_NAME_Property) private String property = null; - @SerializedName("123Number") + public static final String SERIALIZED_NAME_123number = "123Number"; + @SerializedName(SERIALIZED_NAME_123number) private Integer _123number = null; public Name() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/NumberOnly.java index 64fcaed76dfd..e0f21f2f1c40 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -32,7 +32,8 @@ */ public class NumberOnly implements Parcelable { - @SerializedName("JustNumber") + public static final String SERIALIZED_NAME_JustNumber = "JustNumber"; + @SerializedName(SERIALIZED_NAME_JustNumber) private BigDecimal justNumber = null; public NumberOnly() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Order.java index 2dbf4f43ff7b..9b6fefbce89e 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Order.java @@ -32,16 +32,20 @@ */ public class Order implements Parcelable { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("petId") + public static final String SERIALIZED_NAME_PetId = "petId"; + @SerializedName(SERIALIZED_NAME_PetId) private Long petId = null; - @SerializedName("quantity") + public static final String SERIALIZED_NAME_Quantity = "quantity"; + @SerializedName(SERIALIZED_NAME_Quantity) private Integer quantity = null; - @SerializedName("shipDate") + public static final String SERIALIZED_NAME_ShipDate = "shipDate"; + @SerializedName(SERIALIZED_NAME_ShipDate) private OffsetDateTime shipDate = null; /** @@ -93,10 +97,12 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("status") + public static final String SERIALIZED_NAME_Status = "status"; + @SerializedName(SERIALIZED_NAME_Status) private StatusEnum status = null; - @SerializedName("complete") + public static final String SERIALIZED_NAME_Complete = "complete"; + @SerializedName(SERIALIZED_NAME_Complete) private Boolean complete = false; public Order() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/OuterComposite.java index 003d374d9a9b..589176b758f1 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -32,13 +32,16 @@ */ public class OuterComposite implements Parcelable { - @SerializedName("my_number") + public static final String SERIALIZED_NAME_MyNumber = "my_number"; + @SerializedName(SERIALIZED_NAME_MyNumber) private BigDecimal myNumber = null; - @SerializedName("my_string") + public static final String SERIALIZED_NAME_MyString = "my_string"; + @SerializedName(SERIALIZED_NAME_MyString) private String myString = null; - @SerializedName("my_boolean") + public static final String SERIALIZED_NAME_MyBoolean = "my_boolean"; + @SerializedName(SERIALIZED_NAME_MyBoolean) private Boolean myBoolean = null; public OuterComposite() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Pet.java index 1fb66c3a61ea..2feb5837e461 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Pet.java @@ -35,19 +35,24 @@ */ public class Pet implements Parcelable { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("category") + public static final String SERIALIZED_NAME_Category = "category"; + @SerializedName(SERIALIZED_NAME_Category) private Category category = null; - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private String name = null; - @SerializedName("photoUrls") + public static final String SERIALIZED_NAME_PhotoUrls = "photoUrls"; + @SerializedName(SERIALIZED_NAME_PhotoUrls) private List photoUrls = new ArrayList(); - @SerializedName("tags") + public static final String SERIALIZED_NAME_Tags = "tags"; + @SerializedName(SERIALIZED_NAME_Tags) private List tags = null; /** @@ -99,7 +104,8 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("status") + public static final String SERIALIZED_NAME_Status = "status"; + @SerializedName(SERIALIZED_NAME_Status) private StatusEnum status = null; public Pet() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index cf9244b43e39..9a51d319c04c 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -31,10 +31,12 @@ */ public class ReadOnlyFirst implements Parcelable { - @SerializedName("bar") + public static final String SERIALIZED_NAME_Bar = "bar"; + @SerializedName(SERIALIZED_NAME_Bar) private String bar = null; - @SerializedName("baz") + public static final String SERIALIZED_NAME_Baz = "baz"; + @SerializedName(SERIALIZED_NAME_Baz) private String baz = null; public ReadOnlyFirst() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/SpecialModelName.java index 300cf3f59901..6ccdf655a0cd 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -31,7 +31,8 @@ */ public class SpecialModelName implements Parcelable { - @SerializedName("$special[property.name]") + public static final String SERIALIZED_NAME_$SpecialPropertyName = "$special[property.name]"; + @SerializedName(SERIALIZED_NAME_$SpecialPropertyName) private Long $specialPropertyName = null; public SpecialModelName() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Tag.java index d3e7e62246ca..5b993f72c899 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/Tag.java @@ -31,10 +31,12 @@ */ public class Tag implements Parcelable { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private String name = null; public Tag() { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/User.java index 57745199ab3b..e2758ecff677 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/User.java @@ -31,28 +31,36 @@ */ public class User implements Parcelable { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("username") + public static final String SERIALIZED_NAME_Username = "username"; + @SerializedName(SERIALIZED_NAME_Username) private String username = null; - @SerializedName("firstName") + public static final String SERIALIZED_NAME_FirstName = "firstName"; + @SerializedName(SERIALIZED_NAME_FirstName) private String firstName = null; - @SerializedName("lastName") + public static final String SERIALIZED_NAME_LastName = "lastName"; + @SerializedName(SERIALIZED_NAME_LastName) private String lastName = null; - @SerializedName("email") + public static final String SERIALIZED_NAME_Email = "email"; + @SerializedName(SERIALIZED_NAME_Email) private String email = null; - @SerializedName("password") + public static final String SERIALIZED_NAME_Password = "password"; + @SerializedName(SERIALIZED_NAME_Password) private String password = null; - @SerializedName("phone") + public static final String SERIALIZED_NAME_Phone = "phone"; + @SerializedName(SERIALIZED_NAME_Phone) private String phone = null; - @SerializedName("userStatus") + public static final String SERIALIZED_NAME_UserStatus = "userStatus"; + @SerializedName(SERIALIZED_NAME_UserStatus) private Integer userStatus = null; public User() { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index e8f10d21bd0b..c3ee6d14e6b9 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -32,10 +32,12 @@ */ public class AdditionalPropertiesClass { - @SerializedName("map_property") + public static final String SERIALIZED_NAME_MapProperty = "map_property"; + @SerializedName(SERIALIZED_NAME_MapProperty) private Map mapProperty = null; - @SerializedName("map_of_map_property") + public static final String SERIALIZED_NAME_MapOfMapProperty = "map_of_map_property"; + @SerializedName(SERIALIZED_NAME_MapOfMapProperty) private Map> mapOfMapProperty = null; public AdditionalPropertiesClass mapProperty(Map mapProperty) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Animal.java index f02b1133e226..921305a27856 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Animal.java @@ -30,10 +30,12 @@ public class Animal { - @SerializedName("className") + public static final String SERIALIZED_NAME_ClassName = "className"; + @SerializedName(SERIALIZED_NAME_ClassName) private String className = null; - @SerializedName("color") + public static final String SERIALIZED_NAME_Color = "color"; + @SerializedName(SERIALIZED_NAME_Color) private String color = "red"; public Animal() { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index efaeb0bedd9b..231b2332ba3f 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -32,7 +32,8 @@ */ public class ArrayOfArrayOfNumberOnly { - @SerializedName("ArrayArrayNumber") + public static final String SERIALIZED_NAME_ArrayArrayNumber = "ArrayArrayNumber"; + @SerializedName(SERIALIZED_NAME_ArrayArrayNumber) private List> arrayArrayNumber = null; public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 40b62c085451..87446e7ce5b7 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -32,7 +32,8 @@ */ public class ArrayOfNumberOnly { - @SerializedName("ArrayNumber") + public static final String SERIALIZED_NAME_ArrayNumber = "ArrayNumber"; + @SerializedName(SERIALIZED_NAME_ArrayNumber) private List arrayNumber = null; public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayTest.java index 1c8edb287cf2..39d2bce3d8b2 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -32,13 +32,16 @@ */ public class ArrayTest { - @SerializedName("array_of_string") + public static final String SERIALIZED_NAME_ArrayOfString = "array_of_string"; + @SerializedName(SERIALIZED_NAME_ArrayOfString) private List arrayOfString = null; - @SerializedName("array_array_of_integer") + public static final String SERIALIZED_NAME_ArrayArrayOfInteger = "array_array_of_integer"; + @SerializedName(SERIALIZED_NAME_ArrayArrayOfInteger) private List> arrayArrayOfInteger = null; - @SerializedName("array_array_of_model") + public static final String SERIALIZED_NAME_ArrayArrayOfModel = "array_array_of_model"; + @SerializedName(SERIALIZED_NAME_ArrayArrayOfModel) private List> arrayArrayOfModel = null; public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Capitalization.java index 678e7d31b8a5..4158d604a1db 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Capitalization.java @@ -29,22 +29,28 @@ */ public class Capitalization { - @SerializedName("smallCamel") + public static final String SERIALIZED_NAME_SmallCamel = "smallCamel"; + @SerializedName(SERIALIZED_NAME_SmallCamel) private String smallCamel = null; - @SerializedName("CapitalCamel") + public static final String SERIALIZED_NAME_CapitalCamel = "CapitalCamel"; + @SerializedName(SERIALIZED_NAME_CapitalCamel) private String capitalCamel = null; - @SerializedName("small_Snake") + public static final String SERIALIZED_NAME_SmallSnake = "small_Snake"; + @SerializedName(SERIALIZED_NAME_SmallSnake) private String smallSnake = null; - @SerializedName("Capital_Snake") + public static final String SERIALIZED_NAME_CapitalSnake = "Capital_Snake"; + @SerializedName(SERIALIZED_NAME_CapitalSnake) private String capitalSnake = null; - @SerializedName("SCA_ETH_Flow_Points") + public static final String SERIALIZED_NAME_ScAETHFlowPoints = "SCA_ETH_Flow_Points"; + @SerializedName(SERIALIZED_NAME_ScAETHFlowPoints) private String scAETHFlowPoints = null; - @SerializedName("ATT_NAME") + public static final String SERIALIZED_NAME_ATTNAME = "ATT_NAME"; + @SerializedName(SERIALIZED_NAME_ATTNAME) private String ATT_NAME = null; public Capitalization smallCamel(String smallCamel) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Cat.java index 346c5727fc6a..504fab5f20e7 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Cat.java @@ -30,7 +30,8 @@ */ public class Cat extends Animal { - @SerializedName("declawed") + public static final String SERIALIZED_NAME_Declawed = "declawed"; + @SerializedName(SERIALIZED_NAME_Declawed) private Boolean declawed = null; public Cat declawed(Boolean declawed) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java index 5fec485136fb..063c56fda010 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java @@ -29,10 +29,12 @@ */ public class Category { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private String name = null; public Category id(Long id) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ClassModel.java index 811b27ab0057..0f1b83287839 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ClassModel.java @@ -30,7 +30,8 @@ @ApiModel(description = "Model for testing model with \"_class\" property") public class ClassModel { - @SerializedName("_class") + public static final String SERIALIZED_NAME_PropertyClass = "_class"; + @SerializedName(SERIALIZED_NAME_PropertyClass) private String propertyClass = null; public ClassModel propertyClass(String propertyClass) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Client.java index ef83dc12f2fa..3084f329a469 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Client.java @@ -29,7 +29,8 @@ */ public class Client { - @SerializedName("client") + public static final String SERIALIZED_NAME_Client = "client"; + @SerializedName(SERIALIZED_NAME_Client) private String client = null; public Client client(String client) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Dog.java index f5c442375bb6..0610e11ea035 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Dog.java @@ -30,7 +30,8 @@ */ public class Dog extends Animal { - @SerializedName("breed") + public static final String SERIALIZED_NAME_Breed = "breed"; + @SerializedName(SERIALIZED_NAME_Breed) private String breed = null; public Dog breed(String breed) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumArrays.java index 9428d3477275..a6c2db762bc3 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -78,7 +78,8 @@ public JustSymbolEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("just_symbol") + public static final String SERIALIZED_NAME_JustSymbol = "just_symbol"; + @SerializedName(SERIALIZED_NAME_JustSymbol) private JustSymbolEnum justSymbol = null; /** @@ -128,7 +129,8 @@ public ArrayEnumEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("array_enum") + public static final String SERIALIZED_NAME_ArrayEnum = "array_enum"; + @SerializedName(SERIALIZED_NAME_ArrayEnum) private List arrayEnum = null; public EnumArrays justSymbol(JustSymbolEnum justSymbol) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java index fa140cc46aad..21f8bc13eb16 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java @@ -79,7 +79,8 @@ public EnumStringEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("enum_string") + public static final String SERIALIZED_NAME_EnumString = "enum_string"; + @SerializedName(SERIALIZED_NAME_EnumString) private EnumStringEnum enumString = null; /** @@ -131,7 +132,8 @@ public EnumStringRequiredEnum read(final JsonReader jsonReader) throws IOExcepti } } - @SerializedName("enum_string_required") + public static final String SERIALIZED_NAME_EnumStringRequired = "enum_string_required"; + @SerializedName(SERIALIZED_NAME_EnumStringRequired) private EnumStringRequiredEnum enumStringRequired = null; /** @@ -181,7 +183,8 @@ public EnumIntegerEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("enum_integer") + public static final String SERIALIZED_NAME_EnumInteger = "enum_integer"; + @SerializedName(SERIALIZED_NAME_EnumInteger) private EnumIntegerEnum enumInteger = null; /** @@ -231,10 +234,12 @@ public EnumNumberEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("enum_number") + public static final String SERIALIZED_NAME_EnumNumber = "enum_number"; + @SerializedName(SERIALIZED_NAME_EnumNumber) private EnumNumberEnum enumNumber = null; - @SerializedName("outerEnum") + public static final String SERIALIZED_NAME_OuterEnum = "outerEnum"; + @SerializedName(SERIALIZED_NAME_OuterEnum) private OuterEnum outerEnum = null; public EnumTest enumString(EnumStringEnum enumString) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FormatTest.java index 7616bf0d798a..5a6709bd4f19 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FormatTest.java @@ -34,43 +34,56 @@ */ public class FormatTest { - @SerializedName("integer") + public static final String SERIALIZED_NAME_Integer = "integer"; + @SerializedName(SERIALIZED_NAME_Integer) private Integer integer = null; - @SerializedName("int32") + public static final String SERIALIZED_NAME_Int32 = "int32"; + @SerializedName(SERIALIZED_NAME_Int32) private Integer int32 = null; - @SerializedName("int64") + public static final String SERIALIZED_NAME_Int64 = "int64"; + @SerializedName(SERIALIZED_NAME_Int64) private Long int64 = null; - @SerializedName("number") + public static final String SERIALIZED_NAME_Number = "number"; + @SerializedName(SERIALIZED_NAME_Number) private BigDecimal number = null; - @SerializedName("float") + public static final String SERIALIZED_NAME_Float = "float"; + @SerializedName(SERIALIZED_NAME_Float) private Float _float = null; - @SerializedName("double") + public static final String SERIALIZED_NAME_Double = "double"; + @SerializedName(SERIALIZED_NAME_Double) private Double _double = null; - @SerializedName("string") + public static final String SERIALIZED_NAME_String = "string"; + @SerializedName(SERIALIZED_NAME_String) private String string = null; - @SerializedName("byte") + public static final String SERIALIZED_NAME_Byte = "byte"; + @SerializedName(SERIALIZED_NAME_Byte) private byte[] _byte = null; - @SerializedName("binary") + public static final String SERIALIZED_NAME_Binary = "binary"; + @SerializedName(SERIALIZED_NAME_Binary) private File binary = null; - @SerializedName("date") + public static final String SERIALIZED_NAME_Date = "date"; + @SerializedName(SERIALIZED_NAME_Date) private LocalDate date = null; - @SerializedName("dateTime") + public static final String SERIALIZED_NAME_DateTime = "dateTime"; + @SerializedName(SERIALIZED_NAME_DateTime) private OffsetDateTime dateTime = null; - @SerializedName("uuid") + public static final String SERIALIZED_NAME_Uuid = "uuid"; + @SerializedName(SERIALIZED_NAME_Uuid) private UUID uuid = null; - @SerializedName("password") + public static final String SERIALIZED_NAME_Password = "password"; + @SerializedName(SERIALIZED_NAME_Password) private String password = null; public FormatTest integer(Integer integer) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 0acd07c4cd34..479456ef4601 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -29,10 +29,12 @@ */ public class HasOnlyReadOnly { - @SerializedName("bar") + public static final String SERIALIZED_NAME_Bar = "bar"; + @SerializedName(SERIALIZED_NAME_Bar) private String bar = null; - @SerializedName("foo") + public static final String SERIALIZED_NAME_Foo = "foo"; + @SerializedName(SERIALIZED_NAME_Foo) private String foo = null; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java index dacfe98d36f9..30c1847f9e17 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java @@ -32,7 +32,8 @@ */ public class MapTest { - @SerializedName("map_map_of_string") + public static final String SERIALIZED_NAME_MapMapOfString = "map_map_of_string"; + @SerializedName(SERIALIZED_NAME_MapMapOfString) private Map> mapMapOfString = null; /** @@ -82,7 +83,8 @@ public InnerEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("map_of_enum_string") + public static final String SERIALIZED_NAME_MapOfEnumString = "map_of_enum_string"; + @SerializedName(SERIALIZED_NAME_MapOfEnumString) private Map mapOfEnumString = null; public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 16209d72de3f..0d81089435bb 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -35,13 +35,16 @@ */ public class MixedPropertiesAndAdditionalPropertiesClass { - @SerializedName("uuid") + public static final String SERIALIZED_NAME_Uuid = "uuid"; + @SerializedName(SERIALIZED_NAME_Uuid) private UUID uuid = null; - @SerializedName("dateTime") + public static final String SERIALIZED_NAME_DateTime = "dateTime"; + @SerializedName(SERIALIZED_NAME_DateTime) private OffsetDateTime dateTime = null; - @SerializedName("map") + public static final String SERIALIZED_NAME_Map = "map"; + @SerializedName(SERIALIZED_NAME_Map) private Map map = null; public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Model200Response.java index 63d57e6116e7..d84e624a363b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Model200Response.java @@ -30,10 +30,12 @@ @ApiModel(description = "Model for testing model name starting with number") public class Model200Response { - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private Integer name = null; - @SerializedName("class") + public static final String SERIALIZED_NAME_PropertyClass = "class"; + @SerializedName(SERIALIZED_NAME_PropertyClass) private String propertyClass = null; public Model200Response name(Integer name) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 691edae1950d..f328296e9486 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -29,13 +29,16 @@ */ public class ModelApiResponse { - @SerializedName("code") + public static final String SERIALIZED_NAME_Code = "code"; + @SerializedName(SERIALIZED_NAME_Code) private Integer code = null; - @SerializedName("type") + public static final String SERIALIZED_NAME_Type = "type"; + @SerializedName(SERIALIZED_NAME_Type) private String type = null; - @SerializedName("message") + public static final String SERIALIZED_NAME_Message = "message"; + @SerializedName(SERIALIZED_NAME_Message) private String message = null; public ModelApiResponse code(Integer code) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java index 60b5dd4fc694..876b7099e56e 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -30,7 +30,8 @@ @ApiModel(description = "Model for testing reserved words") public class ModelReturn { - @SerializedName("return") + public static final String SERIALIZED_NAME_Return = "return"; + @SerializedName(SERIALIZED_NAME_Return) private Integer _return = null; public ModelReturn _return(Integer _return) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Name.java index 2778e36c7d16..5035d8d618cb 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Name.java @@ -30,16 +30,20 @@ @ApiModel(description = "Model for testing model name same as property name") public class Name { - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private Integer name = null; - @SerializedName("snake_case") + public static final String SERIALIZED_NAME_SnakeCase = "snake_case"; + @SerializedName(SERIALIZED_NAME_SnakeCase) private Integer snakeCase = null; - @SerializedName("property") + public static final String SERIALIZED_NAME_Property = "property"; + @SerializedName(SERIALIZED_NAME_Property) private String property = null; - @SerializedName("123Number") + public static final String SERIALIZED_NAME_123number = "123Number"; + @SerializedName(SERIALIZED_NAME_123number) private Integer _123number = null; public Name name(Integer name) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberOnly.java index f3adad8c8251..b2507f5469f8 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -30,7 +30,8 @@ */ public class NumberOnly { - @SerializedName("JustNumber") + public static final String SERIALIZED_NAME_JustNumber = "JustNumber"; + @SerializedName(SERIALIZED_NAME_JustNumber) private BigDecimal justNumber = null; public NumberOnly justNumber(BigDecimal justNumber) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Order.java index f0b57234f6ac..324382429d95 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Order.java @@ -30,16 +30,20 @@ */ public class Order { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("petId") + public static final String SERIALIZED_NAME_PetId = "petId"; + @SerializedName(SERIALIZED_NAME_PetId) private Long petId = null; - @SerializedName("quantity") + public static final String SERIALIZED_NAME_Quantity = "quantity"; + @SerializedName(SERIALIZED_NAME_Quantity) private Integer quantity = null; - @SerializedName("shipDate") + public static final String SERIALIZED_NAME_ShipDate = "shipDate"; + @SerializedName(SERIALIZED_NAME_ShipDate) private OffsetDateTime shipDate = null; /** @@ -91,10 +95,12 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("status") + public static final String SERIALIZED_NAME_Status = "status"; + @SerializedName(SERIALIZED_NAME_Status) private StatusEnum status = null; - @SerializedName("complete") + public static final String SERIALIZED_NAME_Complete = "complete"; + @SerializedName(SERIALIZED_NAME_Complete) private Boolean complete = false; public Order id(Long id) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java index 1faef824dc37..25489f4ce420 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -30,13 +30,16 @@ */ public class OuterComposite { - @SerializedName("my_number") + public static final String SERIALIZED_NAME_MyNumber = "my_number"; + @SerializedName(SERIALIZED_NAME_MyNumber) private BigDecimal myNumber = null; - @SerializedName("my_string") + public static final String SERIALIZED_NAME_MyString = "my_string"; + @SerializedName(SERIALIZED_NAME_MyString) private String myString = null; - @SerializedName("my_boolean") + public static final String SERIALIZED_NAME_MyBoolean = "my_boolean"; + @SerializedName(SERIALIZED_NAME_MyBoolean) private Boolean myBoolean = null; public OuterComposite myNumber(BigDecimal myNumber) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java index f41a4c2f4837..29d941716368 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java @@ -33,19 +33,24 @@ */ public class Pet { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("category") + public static final String SERIALIZED_NAME_Category = "category"; + @SerializedName(SERIALIZED_NAME_Category) private Category category = null; - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private String name = null; - @SerializedName("photoUrls") + public static final String SERIALIZED_NAME_PhotoUrls = "photoUrls"; + @SerializedName(SERIALIZED_NAME_PhotoUrls) private List photoUrls = new ArrayList(); - @SerializedName("tags") + public static final String SERIALIZED_NAME_Tags = "tags"; + @SerializedName(SERIALIZED_NAME_Tags) private List tags = null; /** @@ -97,7 +102,8 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("status") + public static final String SERIALIZED_NAME_Status = "status"; + @SerializedName(SERIALIZED_NAME_Status) private StatusEnum status = null; public Pet id(Long id) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index b7ec375a37af..cfde51d8a9d7 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -29,10 +29,12 @@ */ public class ReadOnlyFirst { - @SerializedName("bar") + public static final String SERIALIZED_NAME_Bar = "bar"; + @SerializedName(SERIALIZED_NAME_Bar) private String bar = null; - @SerializedName("baz") + public static final String SERIALIZED_NAME_Baz = "baz"; + @SerializedName(SERIALIZED_NAME_Baz) private String baz = null; /** diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SpecialModelName.java index e5619cdd7ca3..78be75ca241b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -29,7 +29,8 @@ */ public class SpecialModelName { - @SerializedName("$special[property.name]") + public static final String SERIALIZED_NAME_$SpecialPropertyName = "$special[property.name]"; + @SerializedName(SERIALIZED_NAME_$SpecialPropertyName) private Long $specialPropertyName = null; public SpecialModelName $specialPropertyName(Long $specialPropertyName) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java index 068cb92fbf58..dd24b1895555 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java @@ -29,10 +29,12 @@ */ public class Tag { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private String name = null; public Tag id(Long id) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/User.java index 7810db7cf801..1cb4b8a89a80 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/User.java @@ -29,28 +29,36 @@ */ public class User { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("username") + public static final String SERIALIZED_NAME_Username = "username"; + @SerializedName(SERIALIZED_NAME_Username) private String username = null; - @SerializedName("firstName") + public static final String SERIALIZED_NAME_FirstName = "firstName"; + @SerializedName(SERIALIZED_NAME_FirstName) private String firstName = null; - @SerializedName("lastName") + public static final String SERIALIZED_NAME_LastName = "lastName"; + @SerializedName(SERIALIZED_NAME_LastName) private String lastName = null; - @SerializedName("email") + public static final String SERIALIZED_NAME_Email = "email"; + @SerializedName(SERIALIZED_NAME_Email) private String email = null; - @SerializedName("password") + public static final String SERIALIZED_NAME_Password = "password"; + @SerializedName(SERIALIZED_NAME_Password) private String password = null; - @SerializedName("phone") + public static final String SERIALIZED_NAME_Phone = "phone"; + @SerializedName(SERIALIZED_NAME_Phone) private String phone = null; - @SerializedName("userStatus") + public static final String SERIALIZED_NAME_UserStatus = "userStatus"; + @SerializedName(SERIALIZED_NAME_UserStatus) private Integer userStatus = null; public User id(Long id) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index e8f10d21bd0b..c3ee6d14e6b9 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -32,10 +32,12 @@ */ public class AdditionalPropertiesClass { - @SerializedName("map_property") + public static final String SERIALIZED_NAME_MapProperty = "map_property"; + @SerializedName(SERIALIZED_NAME_MapProperty) private Map mapProperty = null; - @SerializedName("map_of_map_property") + public static final String SERIALIZED_NAME_MapOfMapProperty = "map_of_map_property"; + @SerializedName(SERIALIZED_NAME_MapOfMapProperty) private Map> mapOfMapProperty = null; public AdditionalPropertiesClass mapProperty(Map mapProperty) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Animal.java index f02b1133e226..921305a27856 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Animal.java @@ -30,10 +30,12 @@ public class Animal { - @SerializedName("className") + public static final String SERIALIZED_NAME_ClassName = "className"; + @SerializedName(SERIALIZED_NAME_ClassName) private String className = null; - @SerializedName("color") + public static final String SERIALIZED_NAME_Color = "color"; + @SerializedName(SERIALIZED_NAME_Color) private String color = "red"; public Animal() { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index efaeb0bedd9b..231b2332ba3f 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -32,7 +32,8 @@ */ public class ArrayOfArrayOfNumberOnly { - @SerializedName("ArrayArrayNumber") + public static final String SERIALIZED_NAME_ArrayArrayNumber = "ArrayArrayNumber"; + @SerializedName(SERIALIZED_NAME_ArrayArrayNumber) private List> arrayArrayNumber = null; public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 40b62c085451..87446e7ce5b7 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -32,7 +32,8 @@ */ public class ArrayOfNumberOnly { - @SerializedName("ArrayNumber") + public static final String SERIALIZED_NAME_ArrayNumber = "ArrayNumber"; + @SerializedName(SERIALIZED_NAME_ArrayNumber) private List arrayNumber = null; public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayTest.java index 1c8edb287cf2..39d2bce3d8b2 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -32,13 +32,16 @@ */ public class ArrayTest { - @SerializedName("array_of_string") + public static final String SERIALIZED_NAME_ArrayOfString = "array_of_string"; + @SerializedName(SERIALIZED_NAME_ArrayOfString) private List arrayOfString = null; - @SerializedName("array_array_of_integer") + public static final String SERIALIZED_NAME_ArrayArrayOfInteger = "array_array_of_integer"; + @SerializedName(SERIALIZED_NAME_ArrayArrayOfInteger) private List> arrayArrayOfInteger = null; - @SerializedName("array_array_of_model") + public static final String SERIALIZED_NAME_ArrayArrayOfModel = "array_array_of_model"; + @SerializedName(SERIALIZED_NAME_ArrayArrayOfModel) private List> arrayArrayOfModel = null; public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Capitalization.java index 678e7d31b8a5..4158d604a1db 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Capitalization.java @@ -29,22 +29,28 @@ */ public class Capitalization { - @SerializedName("smallCamel") + public static final String SERIALIZED_NAME_SmallCamel = "smallCamel"; + @SerializedName(SERIALIZED_NAME_SmallCamel) private String smallCamel = null; - @SerializedName("CapitalCamel") + public static final String SERIALIZED_NAME_CapitalCamel = "CapitalCamel"; + @SerializedName(SERIALIZED_NAME_CapitalCamel) private String capitalCamel = null; - @SerializedName("small_Snake") + public static final String SERIALIZED_NAME_SmallSnake = "small_Snake"; + @SerializedName(SERIALIZED_NAME_SmallSnake) private String smallSnake = null; - @SerializedName("Capital_Snake") + public static final String SERIALIZED_NAME_CapitalSnake = "Capital_Snake"; + @SerializedName(SERIALIZED_NAME_CapitalSnake) private String capitalSnake = null; - @SerializedName("SCA_ETH_Flow_Points") + public static final String SERIALIZED_NAME_ScAETHFlowPoints = "SCA_ETH_Flow_Points"; + @SerializedName(SERIALIZED_NAME_ScAETHFlowPoints) private String scAETHFlowPoints = null; - @SerializedName("ATT_NAME") + public static final String SERIALIZED_NAME_ATTNAME = "ATT_NAME"; + @SerializedName(SERIALIZED_NAME_ATTNAME) private String ATT_NAME = null; public Capitalization smallCamel(String smallCamel) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Cat.java index 346c5727fc6a..504fab5f20e7 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Cat.java @@ -30,7 +30,8 @@ */ public class Cat extends Animal { - @SerializedName("declawed") + public static final String SERIALIZED_NAME_Declawed = "declawed"; + @SerializedName(SERIALIZED_NAME_Declawed) private Boolean declawed = null; public Cat declawed(Boolean declawed) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Category.java index 5fec485136fb..063c56fda010 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Category.java @@ -29,10 +29,12 @@ */ public class Category { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private String name = null; public Category id(Long id) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ClassModel.java index 811b27ab0057..0f1b83287839 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ClassModel.java @@ -30,7 +30,8 @@ @ApiModel(description = "Model for testing model with \"_class\" property") public class ClassModel { - @SerializedName("_class") + public static final String SERIALIZED_NAME_PropertyClass = "_class"; + @SerializedName(SERIALIZED_NAME_PropertyClass) private String propertyClass = null; public ClassModel propertyClass(String propertyClass) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Client.java index ef83dc12f2fa..3084f329a469 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Client.java @@ -29,7 +29,8 @@ */ public class Client { - @SerializedName("client") + public static final String SERIALIZED_NAME_Client = "client"; + @SerializedName(SERIALIZED_NAME_Client) private String client = null; public Client client(String client) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Dog.java index f5c442375bb6..0610e11ea035 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Dog.java @@ -30,7 +30,8 @@ */ public class Dog extends Animal { - @SerializedName("breed") + public static final String SERIALIZED_NAME_Breed = "breed"; + @SerializedName(SERIALIZED_NAME_Breed) private String breed = null; public Dog breed(String breed) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/EnumArrays.java index 9428d3477275..a6c2db762bc3 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -78,7 +78,8 @@ public JustSymbolEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("just_symbol") + public static final String SERIALIZED_NAME_JustSymbol = "just_symbol"; + @SerializedName(SERIALIZED_NAME_JustSymbol) private JustSymbolEnum justSymbol = null; /** @@ -128,7 +129,8 @@ public ArrayEnumEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("array_enum") + public static final String SERIALIZED_NAME_ArrayEnum = "array_enum"; + @SerializedName(SERIALIZED_NAME_ArrayEnum) private List arrayEnum = null; public EnumArrays justSymbol(JustSymbolEnum justSymbol) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/EnumTest.java index fa140cc46aad..21f8bc13eb16 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/EnumTest.java @@ -79,7 +79,8 @@ public EnumStringEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("enum_string") + public static final String SERIALIZED_NAME_EnumString = "enum_string"; + @SerializedName(SERIALIZED_NAME_EnumString) private EnumStringEnum enumString = null; /** @@ -131,7 +132,8 @@ public EnumStringRequiredEnum read(final JsonReader jsonReader) throws IOExcepti } } - @SerializedName("enum_string_required") + public static final String SERIALIZED_NAME_EnumStringRequired = "enum_string_required"; + @SerializedName(SERIALIZED_NAME_EnumStringRequired) private EnumStringRequiredEnum enumStringRequired = null; /** @@ -181,7 +183,8 @@ public EnumIntegerEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("enum_integer") + public static final String SERIALIZED_NAME_EnumInteger = "enum_integer"; + @SerializedName(SERIALIZED_NAME_EnumInteger) private EnumIntegerEnum enumInteger = null; /** @@ -231,10 +234,12 @@ public EnumNumberEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("enum_number") + public static final String SERIALIZED_NAME_EnumNumber = "enum_number"; + @SerializedName(SERIALIZED_NAME_EnumNumber) private EnumNumberEnum enumNumber = null; - @SerializedName("outerEnum") + public static final String SERIALIZED_NAME_OuterEnum = "outerEnum"; + @SerializedName(SERIALIZED_NAME_OuterEnum) private OuterEnum outerEnum = null; public EnumTest enumString(EnumStringEnum enumString) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/FormatTest.java index 7616bf0d798a..5a6709bd4f19 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/FormatTest.java @@ -34,43 +34,56 @@ */ public class FormatTest { - @SerializedName("integer") + public static final String SERIALIZED_NAME_Integer = "integer"; + @SerializedName(SERIALIZED_NAME_Integer) private Integer integer = null; - @SerializedName("int32") + public static final String SERIALIZED_NAME_Int32 = "int32"; + @SerializedName(SERIALIZED_NAME_Int32) private Integer int32 = null; - @SerializedName("int64") + public static final String SERIALIZED_NAME_Int64 = "int64"; + @SerializedName(SERIALIZED_NAME_Int64) private Long int64 = null; - @SerializedName("number") + public static final String SERIALIZED_NAME_Number = "number"; + @SerializedName(SERIALIZED_NAME_Number) private BigDecimal number = null; - @SerializedName("float") + public static final String SERIALIZED_NAME_Float = "float"; + @SerializedName(SERIALIZED_NAME_Float) private Float _float = null; - @SerializedName("double") + public static final String SERIALIZED_NAME_Double = "double"; + @SerializedName(SERIALIZED_NAME_Double) private Double _double = null; - @SerializedName("string") + public static final String SERIALIZED_NAME_String = "string"; + @SerializedName(SERIALIZED_NAME_String) private String string = null; - @SerializedName("byte") + public static final String SERIALIZED_NAME_Byte = "byte"; + @SerializedName(SERIALIZED_NAME_Byte) private byte[] _byte = null; - @SerializedName("binary") + public static final String SERIALIZED_NAME_Binary = "binary"; + @SerializedName(SERIALIZED_NAME_Binary) private File binary = null; - @SerializedName("date") + public static final String SERIALIZED_NAME_Date = "date"; + @SerializedName(SERIALIZED_NAME_Date) private LocalDate date = null; - @SerializedName("dateTime") + public static final String SERIALIZED_NAME_DateTime = "dateTime"; + @SerializedName(SERIALIZED_NAME_DateTime) private OffsetDateTime dateTime = null; - @SerializedName("uuid") + public static final String SERIALIZED_NAME_Uuid = "uuid"; + @SerializedName(SERIALIZED_NAME_Uuid) private UUID uuid = null; - @SerializedName("password") + public static final String SERIALIZED_NAME_Password = "password"; + @SerializedName(SERIALIZED_NAME_Password) private String password = null; public FormatTest integer(Integer integer) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 0acd07c4cd34..479456ef4601 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -29,10 +29,12 @@ */ public class HasOnlyReadOnly { - @SerializedName("bar") + public static final String SERIALIZED_NAME_Bar = "bar"; + @SerializedName(SERIALIZED_NAME_Bar) private String bar = null; - @SerializedName("foo") + public static final String SERIALIZED_NAME_Foo = "foo"; + @SerializedName(SERIALIZED_NAME_Foo) private String foo = null; /** diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MapTest.java index dacfe98d36f9..30c1847f9e17 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MapTest.java @@ -32,7 +32,8 @@ */ public class MapTest { - @SerializedName("map_map_of_string") + public static final String SERIALIZED_NAME_MapMapOfString = "map_map_of_string"; + @SerializedName(SERIALIZED_NAME_MapMapOfString) private Map> mapMapOfString = null; /** @@ -82,7 +83,8 @@ public InnerEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("map_of_enum_string") + public static final String SERIALIZED_NAME_MapOfEnumString = "map_of_enum_string"; + @SerializedName(SERIALIZED_NAME_MapOfEnumString) private Map mapOfEnumString = null; public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 16209d72de3f..0d81089435bb 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -35,13 +35,16 @@ */ public class MixedPropertiesAndAdditionalPropertiesClass { - @SerializedName("uuid") + public static final String SERIALIZED_NAME_Uuid = "uuid"; + @SerializedName(SERIALIZED_NAME_Uuid) private UUID uuid = null; - @SerializedName("dateTime") + public static final String SERIALIZED_NAME_DateTime = "dateTime"; + @SerializedName(SERIALIZED_NAME_DateTime) private OffsetDateTime dateTime = null; - @SerializedName("map") + public static final String SERIALIZED_NAME_Map = "map"; + @SerializedName(SERIALIZED_NAME_Map) private Map map = null; public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Model200Response.java index 63d57e6116e7..d84e624a363b 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Model200Response.java @@ -30,10 +30,12 @@ @ApiModel(description = "Model for testing model name starting with number") public class Model200Response { - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private Integer name = null; - @SerializedName("class") + public static final String SERIALIZED_NAME_PropertyClass = "class"; + @SerializedName(SERIALIZED_NAME_PropertyClass) private String propertyClass = null; public Model200Response name(Integer name) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 691edae1950d..f328296e9486 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -29,13 +29,16 @@ */ public class ModelApiResponse { - @SerializedName("code") + public static final String SERIALIZED_NAME_Code = "code"; + @SerializedName(SERIALIZED_NAME_Code) private Integer code = null; - @SerializedName("type") + public static final String SERIALIZED_NAME_Type = "type"; + @SerializedName(SERIALIZED_NAME_Type) private String type = null; - @SerializedName("message") + public static final String SERIALIZED_NAME_Message = "message"; + @SerializedName(SERIALIZED_NAME_Message) private String message = null; public ModelApiResponse code(Integer code) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ModelReturn.java index 60b5dd4fc694..876b7099e56e 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -30,7 +30,8 @@ @ApiModel(description = "Model for testing reserved words") public class ModelReturn { - @SerializedName("return") + public static final String SERIALIZED_NAME_Return = "return"; + @SerializedName(SERIALIZED_NAME_Return) private Integer _return = null; public ModelReturn _return(Integer _return) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Name.java index 2778e36c7d16..5035d8d618cb 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Name.java @@ -30,16 +30,20 @@ @ApiModel(description = "Model for testing model name same as property name") public class Name { - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private Integer name = null; - @SerializedName("snake_case") + public static final String SERIALIZED_NAME_SnakeCase = "snake_case"; + @SerializedName(SERIALIZED_NAME_SnakeCase) private Integer snakeCase = null; - @SerializedName("property") + public static final String SERIALIZED_NAME_Property = "property"; + @SerializedName(SERIALIZED_NAME_Property) private String property = null; - @SerializedName("123Number") + public static final String SERIALIZED_NAME_123number = "123Number"; + @SerializedName(SERIALIZED_NAME_123number) private Integer _123number = null; public Name name(Integer name) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/NumberOnly.java index f3adad8c8251..b2507f5469f8 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -30,7 +30,8 @@ */ public class NumberOnly { - @SerializedName("JustNumber") + public static final String SERIALIZED_NAME_JustNumber = "JustNumber"; + @SerializedName(SERIALIZED_NAME_JustNumber) private BigDecimal justNumber = null; public NumberOnly justNumber(BigDecimal justNumber) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Order.java index f0b57234f6ac..324382429d95 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Order.java @@ -30,16 +30,20 @@ */ public class Order { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("petId") + public static final String SERIALIZED_NAME_PetId = "petId"; + @SerializedName(SERIALIZED_NAME_PetId) private Long petId = null; - @SerializedName("quantity") + public static final String SERIALIZED_NAME_Quantity = "quantity"; + @SerializedName(SERIALIZED_NAME_Quantity) private Integer quantity = null; - @SerializedName("shipDate") + public static final String SERIALIZED_NAME_ShipDate = "shipDate"; + @SerializedName(SERIALIZED_NAME_ShipDate) private OffsetDateTime shipDate = null; /** @@ -91,10 +95,12 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("status") + public static final String SERIALIZED_NAME_Status = "status"; + @SerializedName(SERIALIZED_NAME_Status) private StatusEnum status = null; - @SerializedName("complete") + public static final String SERIALIZED_NAME_Complete = "complete"; + @SerializedName(SERIALIZED_NAME_Complete) private Boolean complete = false; public Order id(Long id) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/OuterComposite.java index 1faef824dc37..25489f4ce420 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -30,13 +30,16 @@ */ public class OuterComposite { - @SerializedName("my_number") + public static final String SERIALIZED_NAME_MyNumber = "my_number"; + @SerializedName(SERIALIZED_NAME_MyNumber) private BigDecimal myNumber = null; - @SerializedName("my_string") + public static final String SERIALIZED_NAME_MyString = "my_string"; + @SerializedName(SERIALIZED_NAME_MyString) private String myString = null; - @SerializedName("my_boolean") + public static final String SERIALIZED_NAME_MyBoolean = "my_boolean"; + @SerializedName(SERIALIZED_NAME_MyBoolean) private Boolean myBoolean = null; public OuterComposite myNumber(BigDecimal myNumber) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Pet.java index f41a4c2f4837..29d941716368 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Pet.java @@ -33,19 +33,24 @@ */ public class Pet { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("category") + public static final String SERIALIZED_NAME_Category = "category"; + @SerializedName(SERIALIZED_NAME_Category) private Category category = null; - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private String name = null; - @SerializedName("photoUrls") + public static final String SERIALIZED_NAME_PhotoUrls = "photoUrls"; + @SerializedName(SERIALIZED_NAME_PhotoUrls) private List photoUrls = new ArrayList(); - @SerializedName("tags") + public static final String SERIALIZED_NAME_Tags = "tags"; + @SerializedName(SERIALIZED_NAME_Tags) private List tags = null; /** @@ -97,7 +102,8 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("status") + public static final String SERIALIZED_NAME_Status = "status"; + @SerializedName(SERIALIZED_NAME_Status) private StatusEnum status = null; public Pet id(Long id) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index b7ec375a37af..cfde51d8a9d7 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -29,10 +29,12 @@ */ public class ReadOnlyFirst { - @SerializedName("bar") + public static final String SERIALIZED_NAME_Bar = "bar"; + @SerializedName(SERIALIZED_NAME_Bar) private String bar = null; - @SerializedName("baz") + public static final String SERIALIZED_NAME_Baz = "baz"; + @SerializedName(SERIALIZED_NAME_Baz) private String baz = null; /** diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/SpecialModelName.java index e5619cdd7ca3..78be75ca241b 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -29,7 +29,8 @@ */ public class SpecialModelName { - @SerializedName("$special[property.name]") + public static final String SERIALIZED_NAME_$SpecialPropertyName = "$special[property.name]"; + @SerializedName(SERIALIZED_NAME_$SpecialPropertyName) private Long $specialPropertyName = null; public SpecialModelName $specialPropertyName(Long $specialPropertyName) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Tag.java index 068cb92fbf58..dd24b1895555 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/Tag.java @@ -29,10 +29,12 @@ */ public class Tag { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private String name = null; public Tag id(Long id) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/User.java index 7810db7cf801..1cb4b8a89a80 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/User.java @@ -29,28 +29,36 @@ */ public class User { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("username") + public static final String SERIALIZED_NAME_Username = "username"; + @SerializedName(SERIALIZED_NAME_Username) private String username = null; - @SerializedName("firstName") + public static final String SERIALIZED_NAME_FirstName = "firstName"; + @SerializedName(SERIALIZED_NAME_FirstName) private String firstName = null; - @SerializedName("lastName") + public static final String SERIALIZED_NAME_LastName = "lastName"; + @SerializedName(SERIALIZED_NAME_LastName) private String lastName = null; - @SerializedName("email") + public static final String SERIALIZED_NAME_Email = "email"; + @SerializedName(SERIALIZED_NAME_Email) private String email = null; - @SerializedName("password") + public static final String SERIALIZED_NAME_Password = "password"; + @SerializedName(SERIALIZED_NAME_Password) private String password = null; - @SerializedName("phone") + public static final String SERIALIZED_NAME_Phone = "phone"; + @SerializedName(SERIALIZED_NAME_Phone) private String phone = null; - @SerializedName("userStatus") + public static final String SERIALIZED_NAME_UserStatus = "userStatus"; + @SerializedName(SERIALIZED_NAME_UserStatus) private Integer userStatus = null; public User id(Long id) { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index e8f10d21bd0b..c3ee6d14e6b9 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -32,10 +32,12 @@ */ public class AdditionalPropertiesClass { - @SerializedName("map_property") + public static final String SERIALIZED_NAME_MapProperty = "map_property"; + @SerializedName(SERIALIZED_NAME_MapProperty) private Map mapProperty = null; - @SerializedName("map_of_map_property") + public static final String SERIALIZED_NAME_MapOfMapProperty = "map_of_map_property"; + @SerializedName(SERIALIZED_NAME_MapOfMapProperty) private Map> mapOfMapProperty = null; public AdditionalPropertiesClass mapProperty(Map mapProperty) { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Animal.java index f02b1133e226..921305a27856 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Animal.java @@ -30,10 +30,12 @@ public class Animal { - @SerializedName("className") + public static final String SERIALIZED_NAME_ClassName = "className"; + @SerializedName(SERIALIZED_NAME_ClassName) private String className = null; - @SerializedName("color") + public static final String SERIALIZED_NAME_Color = "color"; + @SerializedName(SERIALIZED_NAME_Color) private String color = "red"; public Animal() { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index efaeb0bedd9b..231b2332ba3f 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -32,7 +32,8 @@ */ public class ArrayOfArrayOfNumberOnly { - @SerializedName("ArrayArrayNumber") + public static final String SERIALIZED_NAME_ArrayArrayNumber = "ArrayArrayNumber"; + @SerializedName(SERIALIZED_NAME_ArrayArrayNumber) private List> arrayArrayNumber = null; public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 40b62c085451..87446e7ce5b7 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -32,7 +32,8 @@ */ public class ArrayOfNumberOnly { - @SerializedName("ArrayNumber") + public static final String SERIALIZED_NAME_ArrayNumber = "ArrayNumber"; + @SerializedName(SERIALIZED_NAME_ArrayNumber) private List arrayNumber = null; public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayTest.java index 1c8edb287cf2..39d2bce3d8b2 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -32,13 +32,16 @@ */ public class ArrayTest { - @SerializedName("array_of_string") + public static final String SERIALIZED_NAME_ArrayOfString = "array_of_string"; + @SerializedName(SERIALIZED_NAME_ArrayOfString) private List arrayOfString = null; - @SerializedName("array_array_of_integer") + public static final String SERIALIZED_NAME_ArrayArrayOfInteger = "array_array_of_integer"; + @SerializedName(SERIALIZED_NAME_ArrayArrayOfInteger) private List> arrayArrayOfInteger = null; - @SerializedName("array_array_of_model") + public static final String SERIALIZED_NAME_ArrayArrayOfModel = "array_array_of_model"; + @SerializedName(SERIALIZED_NAME_ArrayArrayOfModel) private List> arrayArrayOfModel = null; public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Capitalization.java index 678e7d31b8a5..4158d604a1db 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Capitalization.java @@ -29,22 +29,28 @@ */ public class Capitalization { - @SerializedName("smallCamel") + public static final String SERIALIZED_NAME_SmallCamel = "smallCamel"; + @SerializedName(SERIALIZED_NAME_SmallCamel) private String smallCamel = null; - @SerializedName("CapitalCamel") + public static final String SERIALIZED_NAME_CapitalCamel = "CapitalCamel"; + @SerializedName(SERIALIZED_NAME_CapitalCamel) private String capitalCamel = null; - @SerializedName("small_Snake") + public static final String SERIALIZED_NAME_SmallSnake = "small_Snake"; + @SerializedName(SERIALIZED_NAME_SmallSnake) private String smallSnake = null; - @SerializedName("Capital_Snake") + public static final String SERIALIZED_NAME_CapitalSnake = "Capital_Snake"; + @SerializedName(SERIALIZED_NAME_CapitalSnake) private String capitalSnake = null; - @SerializedName("SCA_ETH_Flow_Points") + public static final String SERIALIZED_NAME_ScAETHFlowPoints = "SCA_ETH_Flow_Points"; + @SerializedName(SERIALIZED_NAME_ScAETHFlowPoints) private String scAETHFlowPoints = null; - @SerializedName("ATT_NAME") + public static final String SERIALIZED_NAME_ATTNAME = "ATT_NAME"; + @SerializedName(SERIALIZED_NAME_ATTNAME) private String ATT_NAME = null; public Capitalization smallCamel(String smallCamel) { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Cat.java index 346c5727fc6a..504fab5f20e7 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Cat.java @@ -30,7 +30,8 @@ */ public class Cat extends Animal { - @SerializedName("declawed") + public static final String SERIALIZED_NAME_Declawed = "declawed"; + @SerializedName(SERIALIZED_NAME_Declawed) private Boolean declawed = null; public Cat declawed(Boolean declawed) { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Category.java index 5fec485136fb..063c56fda010 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Category.java @@ -29,10 +29,12 @@ */ public class Category { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private String name = null; public Category id(Long id) { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ClassModel.java index 811b27ab0057..0f1b83287839 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ClassModel.java @@ -30,7 +30,8 @@ @ApiModel(description = "Model for testing model with \"_class\" property") public class ClassModel { - @SerializedName("_class") + public static final String SERIALIZED_NAME_PropertyClass = "_class"; + @SerializedName(SERIALIZED_NAME_PropertyClass) private String propertyClass = null; public ClassModel propertyClass(String propertyClass) { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Client.java index ef83dc12f2fa..3084f329a469 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Client.java @@ -29,7 +29,8 @@ */ public class Client { - @SerializedName("client") + public static final String SERIALIZED_NAME_Client = "client"; + @SerializedName(SERIALIZED_NAME_Client) private String client = null; public Client client(String client) { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Dog.java index f5c442375bb6..0610e11ea035 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Dog.java @@ -30,7 +30,8 @@ */ public class Dog extends Animal { - @SerializedName("breed") + public static final String SERIALIZED_NAME_Breed = "breed"; + @SerializedName(SERIALIZED_NAME_Breed) private String breed = null; public Dog breed(String breed) { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/EnumArrays.java index 9428d3477275..a6c2db762bc3 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -78,7 +78,8 @@ public JustSymbolEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("just_symbol") + public static final String SERIALIZED_NAME_JustSymbol = "just_symbol"; + @SerializedName(SERIALIZED_NAME_JustSymbol) private JustSymbolEnum justSymbol = null; /** @@ -128,7 +129,8 @@ public ArrayEnumEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("array_enum") + public static final String SERIALIZED_NAME_ArrayEnum = "array_enum"; + @SerializedName(SERIALIZED_NAME_ArrayEnum) private List arrayEnum = null; public EnumArrays justSymbol(JustSymbolEnum justSymbol) { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/EnumTest.java index fa140cc46aad..21f8bc13eb16 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/EnumTest.java @@ -79,7 +79,8 @@ public EnumStringEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("enum_string") + public static final String SERIALIZED_NAME_EnumString = "enum_string"; + @SerializedName(SERIALIZED_NAME_EnumString) private EnumStringEnum enumString = null; /** @@ -131,7 +132,8 @@ public EnumStringRequiredEnum read(final JsonReader jsonReader) throws IOExcepti } } - @SerializedName("enum_string_required") + public static final String SERIALIZED_NAME_EnumStringRequired = "enum_string_required"; + @SerializedName(SERIALIZED_NAME_EnumStringRequired) private EnumStringRequiredEnum enumStringRequired = null; /** @@ -181,7 +183,8 @@ public EnumIntegerEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("enum_integer") + public static final String SERIALIZED_NAME_EnumInteger = "enum_integer"; + @SerializedName(SERIALIZED_NAME_EnumInteger) private EnumIntegerEnum enumInteger = null; /** @@ -231,10 +234,12 @@ public EnumNumberEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("enum_number") + public static final String SERIALIZED_NAME_EnumNumber = "enum_number"; + @SerializedName(SERIALIZED_NAME_EnumNumber) private EnumNumberEnum enumNumber = null; - @SerializedName("outerEnum") + public static final String SERIALIZED_NAME_OuterEnum = "outerEnum"; + @SerializedName(SERIALIZED_NAME_OuterEnum) private OuterEnum outerEnum = null; public EnumTest enumString(EnumStringEnum enumString) { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/FormatTest.java index 412664dd8af6..3eaf5f838e2c 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/FormatTest.java @@ -34,43 +34,56 @@ */ public class FormatTest { - @SerializedName("integer") + public static final String SERIALIZED_NAME_Integer = "integer"; + @SerializedName(SERIALIZED_NAME_Integer) private Integer integer = null; - @SerializedName("int32") + public static final String SERIALIZED_NAME_Int32 = "int32"; + @SerializedName(SERIALIZED_NAME_Int32) private Integer int32 = null; - @SerializedName("int64") + public static final String SERIALIZED_NAME_Int64 = "int64"; + @SerializedName(SERIALIZED_NAME_Int64) private Long int64 = null; - @SerializedName("number") + public static final String SERIALIZED_NAME_Number = "number"; + @SerializedName(SERIALIZED_NAME_Number) private BigDecimal number = null; - @SerializedName("float") + public static final String SERIALIZED_NAME_Float = "float"; + @SerializedName(SERIALIZED_NAME_Float) private Float _float = null; - @SerializedName("double") + public static final String SERIALIZED_NAME_Double = "double"; + @SerializedName(SERIALIZED_NAME_Double) private Double _double = null; - @SerializedName("string") + public static final String SERIALIZED_NAME_String = "string"; + @SerializedName(SERIALIZED_NAME_String) private String string = null; - @SerializedName("byte") + public static final String SERIALIZED_NAME_Byte = "byte"; + @SerializedName(SERIALIZED_NAME_Byte) private byte[] _byte = null; - @SerializedName("binary") + public static final String SERIALIZED_NAME_Binary = "binary"; + @SerializedName(SERIALIZED_NAME_Binary) private File binary = null; - @SerializedName("date") + public static final String SERIALIZED_NAME_Date = "date"; + @SerializedName(SERIALIZED_NAME_Date) private LocalDate date = null; - @SerializedName("dateTime") + public static final String SERIALIZED_NAME_DateTime = "dateTime"; + @SerializedName(SERIALIZED_NAME_DateTime) private DateTime dateTime = null; - @SerializedName("uuid") + public static final String SERIALIZED_NAME_Uuid = "uuid"; + @SerializedName(SERIALIZED_NAME_Uuid) private UUID uuid = null; - @SerializedName("password") + public static final String SERIALIZED_NAME_Password = "password"; + @SerializedName(SERIALIZED_NAME_Password) private String password = null; public FormatTest integer(Integer integer) { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 0acd07c4cd34..479456ef4601 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -29,10 +29,12 @@ */ public class HasOnlyReadOnly { - @SerializedName("bar") + public static final String SERIALIZED_NAME_Bar = "bar"; + @SerializedName(SERIALIZED_NAME_Bar) private String bar = null; - @SerializedName("foo") + public static final String SERIALIZED_NAME_Foo = "foo"; + @SerializedName(SERIALIZED_NAME_Foo) private String foo = null; /** diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MapTest.java index dacfe98d36f9..30c1847f9e17 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MapTest.java @@ -32,7 +32,8 @@ */ public class MapTest { - @SerializedName("map_map_of_string") + public static final String SERIALIZED_NAME_MapMapOfString = "map_map_of_string"; + @SerializedName(SERIALIZED_NAME_MapMapOfString) private Map> mapMapOfString = null; /** @@ -82,7 +83,8 @@ public InnerEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("map_of_enum_string") + public static final String SERIALIZED_NAME_MapOfEnumString = "map_of_enum_string"; + @SerializedName(SERIALIZED_NAME_MapOfEnumString) private Map mapOfEnumString = null; public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 46eb58fb7836..09b47445c89e 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -35,13 +35,16 @@ */ public class MixedPropertiesAndAdditionalPropertiesClass { - @SerializedName("uuid") + public static final String SERIALIZED_NAME_Uuid = "uuid"; + @SerializedName(SERIALIZED_NAME_Uuid) private UUID uuid = null; - @SerializedName("dateTime") + public static final String SERIALIZED_NAME_DateTime = "dateTime"; + @SerializedName(SERIALIZED_NAME_DateTime) private DateTime dateTime = null; - @SerializedName("map") + public static final String SERIALIZED_NAME_Map = "map"; + @SerializedName(SERIALIZED_NAME_Map) private Map map = null; public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Model200Response.java index 63d57e6116e7..d84e624a363b 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Model200Response.java @@ -30,10 +30,12 @@ @ApiModel(description = "Model for testing model name starting with number") public class Model200Response { - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private Integer name = null; - @SerializedName("class") + public static final String SERIALIZED_NAME_PropertyClass = "class"; + @SerializedName(SERIALIZED_NAME_PropertyClass) private String propertyClass = null; public Model200Response name(Integer name) { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 691edae1950d..f328296e9486 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -29,13 +29,16 @@ */ public class ModelApiResponse { - @SerializedName("code") + public static final String SERIALIZED_NAME_Code = "code"; + @SerializedName(SERIALIZED_NAME_Code) private Integer code = null; - @SerializedName("type") + public static final String SERIALIZED_NAME_Type = "type"; + @SerializedName(SERIALIZED_NAME_Type) private String type = null; - @SerializedName("message") + public static final String SERIALIZED_NAME_Message = "message"; + @SerializedName(SERIALIZED_NAME_Message) private String message = null; public ModelApiResponse code(Integer code) { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ModelReturn.java index 60b5dd4fc694..876b7099e56e 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -30,7 +30,8 @@ @ApiModel(description = "Model for testing reserved words") public class ModelReturn { - @SerializedName("return") + public static final String SERIALIZED_NAME_Return = "return"; + @SerializedName(SERIALIZED_NAME_Return) private Integer _return = null; public ModelReturn _return(Integer _return) { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Name.java index 2778e36c7d16..5035d8d618cb 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Name.java @@ -30,16 +30,20 @@ @ApiModel(description = "Model for testing model name same as property name") public class Name { - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private Integer name = null; - @SerializedName("snake_case") + public static final String SERIALIZED_NAME_SnakeCase = "snake_case"; + @SerializedName(SERIALIZED_NAME_SnakeCase) private Integer snakeCase = null; - @SerializedName("property") + public static final String SERIALIZED_NAME_Property = "property"; + @SerializedName(SERIALIZED_NAME_Property) private String property = null; - @SerializedName("123Number") + public static final String SERIALIZED_NAME_123number = "123Number"; + @SerializedName(SERIALIZED_NAME_123number) private Integer _123number = null; public Name name(Integer name) { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/NumberOnly.java index f3adad8c8251..b2507f5469f8 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -30,7 +30,8 @@ */ public class NumberOnly { - @SerializedName("JustNumber") + public static final String SERIALIZED_NAME_JustNumber = "JustNumber"; + @SerializedName(SERIALIZED_NAME_JustNumber) private BigDecimal justNumber = null; public NumberOnly justNumber(BigDecimal justNumber) { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Order.java index ece6ba97a8cd..7cb2aaeaf65b 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Order.java @@ -30,16 +30,20 @@ */ public class Order { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("petId") + public static final String SERIALIZED_NAME_PetId = "petId"; + @SerializedName(SERIALIZED_NAME_PetId) private Long petId = null; - @SerializedName("quantity") + public static final String SERIALIZED_NAME_Quantity = "quantity"; + @SerializedName(SERIALIZED_NAME_Quantity) private Integer quantity = null; - @SerializedName("shipDate") + public static final String SERIALIZED_NAME_ShipDate = "shipDate"; + @SerializedName(SERIALIZED_NAME_ShipDate) private DateTime shipDate = null; /** @@ -91,10 +95,12 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("status") + public static final String SERIALIZED_NAME_Status = "status"; + @SerializedName(SERIALIZED_NAME_Status) private StatusEnum status = null; - @SerializedName("complete") + public static final String SERIALIZED_NAME_Complete = "complete"; + @SerializedName(SERIALIZED_NAME_Complete) private Boolean complete = false; public Order id(Long id) { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/OuterComposite.java index 1faef824dc37..25489f4ce420 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -30,13 +30,16 @@ */ public class OuterComposite { - @SerializedName("my_number") + public static final String SERIALIZED_NAME_MyNumber = "my_number"; + @SerializedName(SERIALIZED_NAME_MyNumber) private BigDecimal myNumber = null; - @SerializedName("my_string") + public static final String SERIALIZED_NAME_MyString = "my_string"; + @SerializedName(SERIALIZED_NAME_MyString) private String myString = null; - @SerializedName("my_boolean") + public static final String SERIALIZED_NAME_MyBoolean = "my_boolean"; + @SerializedName(SERIALIZED_NAME_MyBoolean) private Boolean myBoolean = null; public OuterComposite myNumber(BigDecimal myNumber) { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Pet.java index f41a4c2f4837..29d941716368 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Pet.java @@ -33,19 +33,24 @@ */ public class Pet { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("category") + public static final String SERIALIZED_NAME_Category = "category"; + @SerializedName(SERIALIZED_NAME_Category) private Category category = null; - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private String name = null; - @SerializedName("photoUrls") + public static final String SERIALIZED_NAME_PhotoUrls = "photoUrls"; + @SerializedName(SERIALIZED_NAME_PhotoUrls) private List photoUrls = new ArrayList(); - @SerializedName("tags") + public static final String SERIALIZED_NAME_Tags = "tags"; + @SerializedName(SERIALIZED_NAME_Tags) private List tags = null; /** @@ -97,7 +102,8 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("status") + public static final String SERIALIZED_NAME_Status = "status"; + @SerializedName(SERIALIZED_NAME_Status) private StatusEnum status = null; public Pet id(Long id) { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index b7ec375a37af..cfde51d8a9d7 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -29,10 +29,12 @@ */ public class ReadOnlyFirst { - @SerializedName("bar") + public static final String SERIALIZED_NAME_Bar = "bar"; + @SerializedName(SERIALIZED_NAME_Bar) private String bar = null; - @SerializedName("baz") + public static final String SERIALIZED_NAME_Baz = "baz"; + @SerializedName(SERIALIZED_NAME_Baz) private String baz = null; /** diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/SpecialModelName.java index e5619cdd7ca3..78be75ca241b 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -29,7 +29,8 @@ */ public class SpecialModelName { - @SerializedName("$special[property.name]") + public static final String SERIALIZED_NAME_$SpecialPropertyName = "$special[property.name]"; + @SerializedName(SERIALIZED_NAME_$SpecialPropertyName) private Long $specialPropertyName = null; public SpecialModelName $specialPropertyName(Long $specialPropertyName) { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Tag.java index 068cb92fbf58..dd24b1895555 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/Tag.java @@ -29,10 +29,12 @@ */ public class Tag { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private String name = null; public Tag id(Long id) { diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/User.java index 7810db7cf801..1cb4b8a89a80 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/model/User.java @@ -29,28 +29,36 @@ */ public class User { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("username") + public static final String SERIALIZED_NAME_Username = "username"; + @SerializedName(SERIALIZED_NAME_Username) private String username = null; - @SerializedName("firstName") + public static final String SERIALIZED_NAME_FirstName = "firstName"; + @SerializedName(SERIALIZED_NAME_FirstName) private String firstName = null; - @SerializedName("lastName") + public static final String SERIALIZED_NAME_LastName = "lastName"; + @SerializedName(SERIALIZED_NAME_LastName) private String lastName = null; - @SerializedName("email") + public static final String SERIALIZED_NAME_Email = "email"; + @SerializedName(SERIALIZED_NAME_Email) private String email = null; - @SerializedName("password") + public static final String SERIALIZED_NAME_Password = "password"; + @SerializedName(SERIALIZED_NAME_Password) private String password = null; - @SerializedName("phone") + public static final String SERIALIZED_NAME_Phone = "phone"; + @SerializedName(SERIALIZED_NAME_Phone) private String phone = null; - @SerializedName("userStatus") + public static final String SERIALIZED_NAME_UserStatus = "userStatus"; + @SerializedName(SERIALIZED_NAME_UserStatus) private Integer userStatus = null; public User id(Long id) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index e8f10d21bd0b..c3ee6d14e6b9 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -32,10 +32,12 @@ */ public class AdditionalPropertiesClass { - @SerializedName("map_property") + public static final String SERIALIZED_NAME_MapProperty = "map_property"; + @SerializedName(SERIALIZED_NAME_MapProperty) private Map mapProperty = null; - @SerializedName("map_of_map_property") + public static final String SERIALIZED_NAME_MapOfMapProperty = "map_of_map_property"; + @SerializedName(SERIALIZED_NAME_MapOfMapProperty) private Map> mapOfMapProperty = null; public AdditionalPropertiesClass mapProperty(Map mapProperty) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Animal.java index f02b1133e226..921305a27856 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Animal.java @@ -30,10 +30,12 @@ public class Animal { - @SerializedName("className") + public static final String SERIALIZED_NAME_ClassName = "className"; + @SerializedName(SERIALIZED_NAME_ClassName) private String className = null; - @SerializedName("color") + public static final String SERIALIZED_NAME_Color = "color"; + @SerializedName(SERIALIZED_NAME_Color) private String color = "red"; public Animal() { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index efaeb0bedd9b..231b2332ba3f 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -32,7 +32,8 @@ */ public class ArrayOfArrayOfNumberOnly { - @SerializedName("ArrayArrayNumber") + public static final String SERIALIZED_NAME_ArrayArrayNumber = "ArrayArrayNumber"; + @SerializedName(SERIALIZED_NAME_ArrayArrayNumber) private List> arrayArrayNumber = null; public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 40b62c085451..87446e7ce5b7 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -32,7 +32,8 @@ */ public class ArrayOfNumberOnly { - @SerializedName("ArrayNumber") + public static final String SERIALIZED_NAME_ArrayNumber = "ArrayNumber"; + @SerializedName(SERIALIZED_NAME_ArrayNumber) private List arrayNumber = null; public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayTest.java index 1c8edb287cf2..39d2bce3d8b2 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -32,13 +32,16 @@ */ public class ArrayTest { - @SerializedName("array_of_string") + public static final String SERIALIZED_NAME_ArrayOfString = "array_of_string"; + @SerializedName(SERIALIZED_NAME_ArrayOfString) private List arrayOfString = null; - @SerializedName("array_array_of_integer") + public static final String SERIALIZED_NAME_ArrayArrayOfInteger = "array_array_of_integer"; + @SerializedName(SERIALIZED_NAME_ArrayArrayOfInteger) private List> arrayArrayOfInteger = null; - @SerializedName("array_array_of_model") + public static final String SERIALIZED_NAME_ArrayArrayOfModel = "array_array_of_model"; + @SerializedName(SERIALIZED_NAME_ArrayArrayOfModel) private List> arrayArrayOfModel = null; public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Capitalization.java index 678e7d31b8a5..4158d604a1db 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Capitalization.java @@ -29,22 +29,28 @@ */ public class Capitalization { - @SerializedName("smallCamel") + public static final String SERIALIZED_NAME_SmallCamel = "smallCamel"; + @SerializedName(SERIALIZED_NAME_SmallCamel) private String smallCamel = null; - @SerializedName("CapitalCamel") + public static final String SERIALIZED_NAME_CapitalCamel = "CapitalCamel"; + @SerializedName(SERIALIZED_NAME_CapitalCamel) private String capitalCamel = null; - @SerializedName("small_Snake") + public static final String SERIALIZED_NAME_SmallSnake = "small_Snake"; + @SerializedName(SERIALIZED_NAME_SmallSnake) private String smallSnake = null; - @SerializedName("Capital_Snake") + public static final String SERIALIZED_NAME_CapitalSnake = "Capital_Snake"; + @SerializedName(SERIALIZED_NAME_CapitalSnake) private String capitalSnake = null; - @SerializedName("SCA_ETH_Flow_Points") + public static final String SERIALIZED_NAME_ScAETHFlowPoints = "SCA_ETH_Flow_Points"; + @SerializedName(SERIALIZED_NAME_ScAETHFlowPoints) private String scAETHFlowPoints = null; - @SerializedName("ATT_NAME") + public static final String SERIALIZED_NAME_ATTNAME = "ATT_NAME"; + @SerializedName(SERIALIZED_NAME_ATTNAME) private String ATT_NAME = null; public Capitalization smallCamel(String smallCamel) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Cat.java index 346c5727fc6a..504fab5f20e7 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Cat.java @@ -30,7 +30,8 @@ */ public class Cat extends Animal { - @SerializedName("declawed") + public static final String SERIALIZED_NAME_Declawed = "declawed"; + @SerializedName(SERIALIZED_NAME_Declawed) private Boolean declawed = null; public Cat declawed(Boolean declawed) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Category.java index 5fec485136fb..063c56fda010 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Category.java @@ -29,10 +29,12 @@ */ public class Category { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private String name = null; public Category id(Long id) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ClassModel.java index 811b27ab0057..0f1b83287839 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ClassModel.java @@ -30,7 +30,8 @@ @ApiModel(description = "Model for testing model with \"_class\" property") public class ClassModel { - @SerializedName("_class") + public static final String SERIALIZED_NAME_PropertyClass = "_class"; + @SerializedName(SERIALIZED_NAME_PropertyClass) private String propertyClass = null; public ClassModel propertyClass(String propertyClass) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Client.java index ef83dc12f2fa..3084f329a469 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Client.java @@ -29,7 +29,8 @@ */ public class Client { - @SerializedName("client") + public static final String SERIALIZED_NAME_Client = "client"; + @SerializedName(SERIALIZED_NAME_Client) private String client = null; public Client client(String client) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Dog.java index f5c442375bb6..0610e11ea035 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Dog.java @@ -30,7 +30,8 @@ */ public class Dog extends Animal { - @SerializedName("breed") + public static final String SERIALIZED_NAME_Breed = "breed"; + @SerializedName(SERIALIZED_NAME_Breed) private String breed = null; public Dog breed(String breed) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/EnumArrays.java index 9428d3477275..a6c2db762bc3 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -78,7 +78,8 @@ public JustSymbolEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("just_symbol") + public static final String SERIALIZED_NAME_JustSymbol = "just_symbol"; + @SerializedName(SERIALIZED_NAME_JustSymbol) private JustSymbolEnum justSymbol = null; /** @@ -128,7 +129,8 @@ public ArrayEnumEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("array_enum") + public static final String SERIALIZED_NAME_ArrayEnum = "array_enum"; + @SerializedName(SERIALIZED_NAME_ArrayEnum) private List arrayEnum = null; public EnumArrays justSymbol(JustSymbolEnum justSymbol) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/EnumTest.java index fa140cc46aad..21f8bc13eb16 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/EnumTest.java @@ -79,7 +79,8 @@ public EnumStringEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("enum_string") + public static final String SERIALIZED_NAME_EnumString = "enum_string"; + @SerializedName(SERIALIZED_NAME_EnumString) private EnumStringEnum enumString = null; /** @@ -131,7 +132,8 @@ public EnumStringRequiredEnum read(final JsonReader jsonReader) throws IOExcepti } } - @SerializedName("enum_string_required") + public static final String SERIALIZED_NAME_EnumStringRequired = "enum_string_required"; + @SerializedName(SERIALIZED_NAME_EnumStringRequired) private EnumStringRequiredEnum enumStringRequired = null; /** @@ -181,7 +183,8 @@ public EnumIntegerEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("enum_integer") + public static final String SERIALIZED_NAME_EnumInteger = "enum_integer"; + @SerializedName(SERIALIZED_NAME_EnumInteger) private EnumIntegerEnum enumInteger = null; /** @@ -231,10 +234,12 @@ public EnumNumberEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("enum_number") + public static final String SERIALIZED_NAME_EnumNumber = "enum_number"; + @SerializedName(SERIALIZED_NAME_EnumNumber) private EnumNumberEnum enumNumber = null; - @SerializedName("outerEnum") + public static final String SERIALIZED_NAME_OuterEnum = "outerEnum"; + @SerializedName(SERIALIZED_NAME_OuterEnum) private OuterEnum outerEnum = null; public EnumTest enumString(EnumStringEnum enumString) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/FormatTest.java index 7616bf0d798a..5a6709bd4f19 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/FormatTest.java @@ -34,43 +34,56 @@ */ public class FormatTest { - @SerializedName("integer") + public static final String SERIALIZED_NAME_Integer = "integer"; + @SerializedName(SERIALIZED_NAME_Integer) private Integer integer = null; - @SerializedName("int32") + public static final String SERIALIZED_NAME_Int32 = "int32"; + @SerializedName(SERIALIZED_NAME_Int32) private Integer int32 = null; - @SerializedName("int64") + public static final String SERIALIZED_NAME_Int64 = "int64"; + @SerializedName(SERIALIZED_NAME_Int64) private Long int64 = null; - @SerializedName("number") + public static final String SERIALIZED_NAME_Number = "number"; + @SerializedName(SERIALIZED_NAME_Number) private BigDecimal number = null; - @SerializedName("float") + public static final String SERIALIZED_NAME_Float = "float"; + @SerializedName(SERIALIZED_NAME_Float) private Float _float = null; - @SerializedName("double") + public static final String SERIALIZED_NAME_Double = "double"; + @SerializedName(SERIALIZED_NAME_Double) private Double _double = null; - @SerializedName("string") + public static final String SERIALIZED_NAME_String = "string"; + @SerializedName(SERIALIZED_NAME_String) private String string = null; - @SerializedName("byte") + public static final String SERIALIZED_NAME_Byte = "byte"; + @SerializedName(SERIALIZED_NAME_Byte) private byte[] _byte = null; - @SerializedName("binary") + public static final String SERIALIZED_NAME_Binary = "binary"; + @SerializedName(SERIALIZED_NAME_Binary) private File binary = null; - @SerializedName("date") + public static final String SERIALIZED_NAME_Date = "date"; + @SerializedName(SERIALIZED_NAME_Date) private LocalDate date = null; - @SerializedName("dateTime") + public static final String SERIALIZED_NAME_DateTime = "dateTime"; + @SerializedName(SERIALIZED_NAME_DateTime) private OffsetDateTime dateTime = null; - @SerializedName("uuid") + public static final String SERIALIZED_NAME_Uuid = "uuid"; + @SerializedName(SERIALIZED_NAME_Uuid) private UUID uuid = null; - @SerializedName("password") + public static final String SERIALIZED_NAME_Password = "password"; + @SerializedName(SERIALIZED_NAME_Password) private String password = null; public FormatTest integer(Integer integer) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 0acd07c4cd34..479456ef4601 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -29,10 +29,12 @@ */ public class HasOnlyReadOnly { - @SerializedName("bar") + public static final String SERIALIZED_NAME_Bar = "bar"; + @SerializedName(SERIALIZED_NAME_Bar) private String bar = null; - @SerializedName("foo") + public static final String SERIALIZED_NAME_Foo = "foo"; + @SerializedName(SERIALIZED_NAME_Foo) private String foo = null; /** diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MapTest.java index dacfe98d36f9..30c1847f9e17 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MapTest.java @@ -32,7 +32,8 @@ */ public class MapTest { - @SerializedName("map_map_of_string") + public static final String SERIALIZED_NAME_MapMapOfString = "map_map_of_string"; + @SerializedName(SERIALIZED_NAME_MapMapOfString) private Map> mapMapOfString = null; /** @@ -82,7 +83,8 @@ public InnerEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("map_of_enum_string") + public static final String SERIALIZED_NAME_MapOfEnumString = "map_of_enum_string"; + @SerializedName(SERIALIZED_NAME_MapOfEnumString) private Map mapOfEnumString = null; public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 16209d72de3f..0d81089435bb 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -35,13 +35,16 @@ */ public class MixedPropertiesAndAdditionalPropertiesClass { - @SerializedName("uuid") + public static final String SERIALIZED_NAME_Uuid = "uuid"; + @SerializedName(SERIALIZED_NAME_Uuid) private UUID uuid = null; - @SerializedName("dateTime") + public static final String SERIALIZED_NAME_DateTime = "dateTime"; + @SerializedName(SERIALIZED_NAME_DateTime) private OffsetDateTime dateTime = null; - @SerializedName("map") + public static final String SERIALIZED_NAME_Map = "map"; + @SerializedName(SERIALIZED_NAME_Map) private Map map = null; public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Model200Response.java index 63d57e6116e7..d84e624a363b 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Model200Response.java @@ -30,10 +30,12 @@ @ApiModel(description = "Model for testing model name starting with number") public class Model200Response { - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private Integer name = null; - @SerializedName("class") + public static final String SERIALIZED_NAME_PropertyClass = "class"; + @SerializedName(SERIALIZED_NAME_PropertyClass) private String propertyClass = null; public Model200Response name(Integer name) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 691edae1950d..f328296e9486 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -29,13 +29,16 @@ */ public class ModelApiResponse { - @SerializedName("code") + public static final String SERIALIZED_NAME_Code = "code"; + @SerializedName(SERIALIZED_NAME_Code) private Integer code = null; - @SerializedName("type") + public static final String SERIALIZED_NAME_Type = "type"; + @SerializedName(SERIALIZED_NAME_Type) private String type = null; - @SerializedName("message") + public static final String SERIALIZED_NAME_Message = "message"; + @SerializedName(SERIALIZED_NAME_Message) private String message = null; public ModelApiResponse code(Integer code) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ModelReturn.java index 60b5dd4fc694..876b7099e56e 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -30,7 +30,8 @@ @ApiModel(description = "Model for testing reserved words") public class ModelReturn { - @SerializedName("return") + public static final String SERIALIZED_NAME_Return = "return"; + @SerializedName(SERIALIZED_NAME_Return) private Integer _return = null; public ModelReturn _return(Integer _return) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Name.java index 2778e36c7d16..5035d8d618cb 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Name.java @@ -30,16 +30,20 @@ @ApiModel(description = "Model for testing model name same as property name") public class Name { - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private Integer name = null; - @SerializedName("snake_case") + public static final String SERIALIZED_NAME_SnakeCase = "snake_case"; + @SerializedName(SERIALIZED_NAME_SnakeCase) private Integer snakeCase = null; - @SerializedName("property") + public static final String SERIALIZED_NAME_Property = "property"; + @SerializedName(SERIALIZED_NAME_Property) private String property = null; - @SerializedName("123Number") + public static final String SERIALIZED_NAME_123number = "123Number"; + @SerializedName(SERIALIZED_NAME_123number) private Integer _123number = null; public Name name(Integer name) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/NumberOnly.java index f3adad8c8251..b2507f5469f8 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -30,7 +30,8 @@ */ public class NumberOnly { - @SerializedName("JustNumber") + public static final String SERIALIZED_NAME_JustNumber = "JustNumber"; + @SerializedName(SERIALIZED_NAME_JustNumber) private BigDecimal justNumber = null; public NumberOnly justNumber(BigDecimal justNumber) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Order.java index f0b57234f6ac..324382429d95 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Order.java @@ -30,16 +30,20 @@ */ public class Order { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("petId") + public static final String SERIALIZED_NAME_PetId = "petId"; + @SerializedName(SERIALIZED_NAME_PetId) private Long petId = null; - @SerializedName("quantity") + public static final String SERIALIZED_NAME_Quantity = "quantity"; + @SerializedName(SERIALIZED_NAME_Quantity) private Integer quantity = null; - @SerializedName("shipDate") + public static final String SERIALIZED_NAME_ShipDate = "shipDate"; + @SerializedName(SERIALIZED_NAME_ShipDate) private OffsetDateTime shipDate = null; /** @@ -91,10 +95,12 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("status") + public static final String SERIALIZED_NAME_Status = "status"; + @SerializedName(SERIALIZED_NAME_Status) private StatusEnum status = null; - @SerializedName("complete") + public static final String SERIALIZED_NAME_Complete = "complete"; + @SerializedName(SERIALIZED_NAME_Complete) private Boolean complete = false; public Order id(Long id) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/OuterComposite.java index 1faef824dc37..25489f4ce420 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -30,13 +30,16 @@ */ public class OuterComposite { - @SerializedName("my_number") + public static final String SERIALIZED_NAME_MyNumber = "my_number"; + @SerializedName(SERIALIZED_NAME_MyNumber) private BigDecimal myNumber = null; - @SerializedName("my_string") + public static final String SERIALIZED_NAME_MyString = "my_string"; + @SerializedName(SERIALIZED_NAME_MyString) private String myString = null; - @SerializedName("my_boolean") + public static final String SERIALIZED_NAME_MyBoolean = "my_boolean"; + @SerializedName(SERIALIZED_NAME_MyBoolean) private Boolean myBoolean = null; public OuterComposite myNumber(BigDecimal myNumber) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Pet.java index f41a4c2f4837..29d941716368 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Pet.java @@ -33,19 +33,24 @@ */ public class Pet { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("category") + public static final String SERIALIZED_NAME_Category = "category"; + @SerializedName(SERIALIZED_NAME_Category) private Category category = null; - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private String name = null; - @SerializedName("photoUrls") + public static final String SERIALIZED_NAME_PhotoUrls = "photoUrls"; + @SerializedName(SERIALIZED_NAME_PhotoUrls) private List photoUrls = new ArrayList(); - @SerializedName("tags") + public static final String SERIALIZED_NAME_Tags = "tags"; + @SerializedName(SERIALIZED_NAME_Tags) private List tags = null; /** @@ -97,7 +102,8 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("status") + public static final String SERIALIZED_NAME_Status = "status"; + @SerializedName(SERIALIZED_NAME_Status) private StatusEnum status = null; public Pet id(Long id) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index b7ec375a37af..cfde51d8a9d7 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -29,10 +29,12 @@ */ public class ReadOnlyFirst { - @SerializedName("bar") + public static final String SERIALIZED_NAME_Bar = "bar"; + @SerializedName(SERIALIZED_NAME_Bar) private String bar = null; - @SerializedName("baz") + public static final String SERIALIZED_NAME_Baz = "baz"; + @SerializedName(SERIALIZED_NAME_Baz) private String baz = null; /** diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/SpecialModelName.java index e5619cdd7ca3..78be75ca241b 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -29,7 +29,8 @@ */ public class SpecialModelName { - @SerializedName("$special[property.name]") + public static final String SERIALIZED_NAME_$SpecialPropertyName = "$special[property.name]"; + @SerializedName(SERIALIZED_NAME_$SpecialPropertyName) private Long $specialPropertyName = null; public SpecialModelName $specialPropertyName(Long $specialPropertyName) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Tag.java index 068cb92fbf58..dd24b1895555 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/Tag.java @@ -29,10 +29,12 @@ */ public class Tag { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private String name = null; public Tag id(Long id) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/User.java index 7810db7cf801..1cb4b8a89a80 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/User.java @@ -29,28 +29,36 @@ */ public class User { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("username") + public static final String SERIALIZED_NAME_Username = "username"; + @SerializedName(SERIALIZED_NAME_Username) private String username = null; - @SerializedName("firstName") + public static final String SERIALIZED_NAME_FirstName = "firstName"; + @SerializedName(SERIALIZED_NAME_FirstName) private String firstName = null; - @SerializedName("lastName") + public static final String SERIALIZED_NAME_LastName = "lastName"; + @SerializedName(SERIALIZED_NAME_LastName) private String lastName = null; - @SerializedName("email") + public static final String SERIALIZED_NAME_Email = "email"; + @SerializedName(SERIALIZED_NAME_Email) private String email = null; - @SerializedName("password") + public static final String SERIALIZED_NAME_Password = "password"; + @SerializedName(SERIALIZED_NAME_Password) private String password = null; - @SerializedName("phone") + public static final String SERIALIZED_NAME_Phone = "phone"; + @SerializedName(SERIALIZED_NAME_Phone) private String phone = null; - @SerializedName("userStatus") + public static final String SERIALIZED_NAME_UserStatus = "userStatus"; + @SerializedName(SERIALIZED_NAME_UserStatus) private Integer userStatus = null; public User id(Long id) { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index e8f10d21bd0b..c3ee6d14e6b9 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -32,10 +32,12 @@ */ public class AdditionalPropertiesClass { - @SerializedName("map_property") + public static final String SERIALIZED_NAME_MapProperty = "map_property"; + @SerializedName(SERIALIZED_NAME_MapProperty) private Map mapProperty = null; - @SerializedName("map_of_map_property") + public static final String SERIALIZED_NAME_MapOfMapProperty = "map_of_map_property"; + @SerializedName(SERIALIZED_NAME_MapOfMapProperty) private Map> mapOfMapProperty = null; public AdditionalPropertiesClass mapProperty(Map mapProperty) { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Animal.java index f02b1133e226..921305a27856 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Animal.java @@ -30,10 +30,12 @@ public class Animal { - @SerializedName("className") + public static final String SERIALIZED_NAME_ClassName = "className"; + @SerializedName(SERIALIZED_NAME_ClassName) private String className = null; - @SerializedName("color") + public static final String SERIALIZED_NAME_Color = "color"; + @SerializedName(SERIALIZED_NAME_Color) private String color = "red"; public Animal() { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index efaeb0bedd9b..231b2332ba3f 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -32,7 +32,8 @@ */ public class ArrayOfArrayOfNumberOnly { - @SerializedName("ArrayArrayNumber") + public static final String SERIALIZED_NAME_ArrayArrayNumber = "ArrayArrayNumber"; + @SerializedName(SERIALIZED_NAME_ArrayArrayNumber) private List> arrayArrayNumber = null; public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 40b62c085451..87446e7ce5b7 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -32,7 +32,8 @@ */ public class ArrayOfNumberOnly { - @SerializedName("ArrayNumber") + public static final String SERIALIZED_NAME_ArrayNumber = "ArrayNumber"; + @SerializedName(SERIALIZED_NAME_ArrayNumber) private List arrayNumber = null; public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ArrayTest.java index 1c8edb287cf2..39d2bce3d8b2 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -32,13 +32,16 @@ */ public class ArrayTest { - @SerializedName("array_of_string") + public static final String SERIALIZED_NAME_ArrayOfString = "array_of_string"; + @SerializedName(SERIALIZED_NAME_ArrayOfString) private List arrayOfString = null; - @SerializedName("array_array_of_integer") + public static final String SERIALIZED_NAME_ArrayArrayOfInteger = "array_array_of_integer"; + @SerializedName(SERIALIZED_NAME_ArrayArrayOfInteger) private List> arrayArrayOfInteger = null; - @SerializedName("array_array_of_model") + public static final String SERIALIZED_NAME_ArrayArrayOfModel = "array_array_of_model"; + @SerializedName(SERIALIZED_NAME_ArrayArrayOfModel) private List> arrayArrayOfModel = null; public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Capitalization.java index 678e7d31b8a5..4158d604a1db 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Capitalization.java @@ -29,22 +29,28 @@ */ public class Capitalization { - @SerializedName("smallCamel") + public static final String SERIALIZED_NAME_SmallCamel = "smallCamel"; + @SerializedName(SERIALIZED_NAME_SmallCamel) private String smallCamel = null; - @SerializedName("CapitalCamel") + public static final String SERIALIZED_NAME_CapitalCamel = "CapitalCamel"; + @SerializedName(SERIALIZED_NAME_CapitalCamel) private String capitalCamel = null; - @SerializedName("small_Snake") + public static final String SERIALIZED_NAME_SmallSnake = "small_Snake"; + @SerializedName(SERIALIZED_NAME_SmallSnake) private String smallSnake = null; - @SerializedName("Capital_Snake") + public static final String SERIALIZED_NAME_CapitalSnake = "Capital_Snake"; + @SerializedName(SERIALIZED_NAME_CapitalSnake) private String capitalSnake = null; - @SerializedName("SCA_ETH_Flow_Points") + public static final String SERIALIZED_NAME_ScAETHFlowPoints = "SCA_ETH_Flow_Points"; + @SerializedName(SERIALIZED_NAME_ScAETHFlowPoints) private String scAETHFlowPoints = null; - @SerializedName("ATT_NAME") + public static final String SERIALIZED_NAME_ATTNAME = "ATT_NAME"; + @SerializedName(SERIALIZED_NAME_ATTNAME) private String ATT_NAME = null; public Capitalization smallCamel(String smallCamel) { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Cat.java index 346c5727fc6a..504fab5f20e7 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Cat.java @@ -30,7 +30,8 @@ */ public class Cat extends Animal { - @SerializedName("declawed") + public static final String SERIALIZED_NAME_Declawed = "declawed"; + @SerializedName(SERIALIZED_NAME_Declawed) private Boolean declawed = null; public Cat declawed(Boolean declawed) { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Category.java index 5fec485136fb..063c56fda010 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Category.java @@ -29,10 +29,12 @@ */ public class Category { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private String name = null; public Category id(Long id) { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ClassModel.java index 811b27ab0057..0f1b83287839 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ClassModel.java @@ -30,7 +30,8 @@ @ApiModel(description = "Model for testing model with \"_class\" property") public class ClassModel { - @SerializedName("_class") + public static final String SERIALIZED_NAME_PropertyClass = "_class"; + @SerializedName(SERIALIZED_NAME_PropertyClass) private String propertyClass = null; public ClassModel propertyClass(String propertyClass) { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Client.java index ef83dc12f2fa..3084f329a469 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Client.java @@ -29,7 +29,8 @@ */ public class Client { - @SerializedName("client") + public static final String SERIALIZED_NAME_Client = "client"; + @SerializedName(SERIALIZED_NAME_Client) private String client = null; public Client client(String client) { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Dog.java index f5c442375bb6..0610e11ea035 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Dog.java @@ -30,7 +30,8 @@ */ public class Dog extends Animal { - @SerializedName("breed") + public static final String SERIALIZED_NAME_Breed = "breed"; + @SerializedName(SERIALIZED_NAME_Breed) private String breed = null; public Dog breed(String breed) { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/EnumArrays.java index 9428d3477275..a6c2db762bc3 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -78,7 +78,8 @@ public JustSymbolEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("just_symbol") + public static final String SERIALIZED_NAME_JustSymbol = "just_symbol"; + @SerializedName(SERIALIZED_NAME_JustSymbol) private JustSymbolEnum justSymbol = null; /** @@ -128,7 +129,8 @@ public ArrayEnumEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("array_enum") + public static final String SERIALIZED_NAME_ArrayEnum = "array_enum"; + @SerializedName(SERIALIZED_NAME_ArrayEnum) private List arrayEnum = null; public EnumArrays justSymbol(JustSymbolEnum justSymbol) { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/EnumTest.java index fa140cc46aad..21f8bc13eb16 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/EnumTest.java @@ -79,7 +79,8 @@ public EnumStringEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("enum_string") + public static final String SERIALIZED_NAME_EnumString = "enum_string"; + @SerializedName(SERIALIZED_NAME_EnumString) private EnumStringEnum enumString = null; /** @@ -131,7 +132,8 @@ public EnumStringRequiredEnum read(final JsonReader jsonReader) throws IOExcepti } } - @SerializedName("enum_string_required") + public static final String SERIALIZED_NAME_EnumStringRequired = "enum_string_required"; + @SerializedName(SERIALIZED_NAME_EnumStringRequired) private EnumStringRequiredEnum enumStringRequired = null; /** @@ -181,7 +183,8 @@ public EnumIntegerEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("enum_integer") + public static final String SERIALIZED_NAME_EnumInteger = "enum_integer"; + @SerializedName(SERIALIZED_NAME_EnumInteger) private EnumIntegerEnum enumInteger = null; /** @@ -231,10 +234,12 @@ public EnumNumberEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("enum_number") + public static final String SERIALIZED_NAME_EnumNumber = "enum_number"; + @SerializedName(SERIALIZED_NAME_EnumNumber) private EnumNumberEnum enumNumber = null; - @SerializedName("outerEnum") + public static final String SERIALIZED_NAME_OuterEnum = "outerEnum"; + @SerializedName(SERIALIZED_NAME_OuterEnum) private OuterEnum outerEnum = null; public EnumTest enumString(EnumStringEnum enumString) { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/FormatTest.java index 7616bf0d798a..5a6709bd4f19 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/FormatTest.java @@ -34,43 +34,56 @@ */ public class FormatTest { - @SerializedName("integer") + public static final String SERIALIZED_NAME_Integer = "integer"; + @SerializedName(SERIALIZED_NAME_Integer) private Integer integer = null; - @SerializedName("int32") + public static final String SERIALIZED_NAME_Int32 = "int32"; + @SerializedName(SERIALIZED_NAME_Int32) private Integer int32 = null; - @SerializedName("int64") + public static final String SERIALIZED_NAME_Int64 = "int64"; + @SerializedName(SERIALIZED_NAME_Int64) private Long int64 = null; - @SerializedName("number") + public static final String SERIALIZED_NAME_Number = "number"; + @SerializedName(SERIALIZED_NAME_Number) private BigDecimal number = null; - @SerializedName("float") + public static final String SERIALIZED_NAME_Float = "float"; + @SerializedName(SERIALIZED_NAME_Float) private Float _float = null; - @SerializedName("double") + public static final String SERIALIZED_NAME_Double = "double"; + @SerializedName(SERIALIZED_NAME_Double) private Double _double = null; - @SerializedName("string") + public static final String SERIALIZED_NAME_String = "string"; + @SerializedName(SERIALIZED_NAME_String) private String string = null; - @SerializedName("byte") + public static final String SERIALIZED_NAME_Byte = "byte"; + @SerializedName(SERIALIZED_NAME_Byte) private byte[] _byte = null; - @SerializedName("binary") + public static final String SERIALIZED_NAME_Binary = "binary"; + @SerializedName(SERIALIZED_NAME_Binary) private File binary = null; - @SerializedName("date") + public static final String SERIALIZED_NAME_Date = "date"; + @SerializedName(SERIALIZED_NAME_Date) private LocalDate date = null; - @SerializedName("dateTime") + public static final String SERIALIZED_NAME_DateTime = "dateTime"; + @SerializedName(SERIALIZED_NAME_DateTime) private OffsetDateTime dateTime = null; - @SerializedName("uuid") + public static final String SERIALIZED_NAME_Uuid = "uuid"; + @SerializedName(SERIALIZED_NAME_Uuid) private UUID uuid = null; - @SerializedName("password") + public static final String SERIALIZED_NAME_Password = "password"; + @SerializedName(SERIALIZED_NAME_Password) private String password = null; public FormatTest integer(Integer integer) { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 0acd07c4cd34..479456ef4601 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -29,10 +29,12 @@ */ public class HasOnlyReadOnly { - @SerializedName("bar") + public static final String SERIALIZED_NAME_Bar = "bar"; + @SerializedName(SERIALIZED_NAME_Bar) private String bar = null; - @SerializedName("foo") + public static final String SERIALIZED_NAME_Foo = "foo"; + @SerializedName(SERIALIZED_NAME_Foo) private String foo = null; /** diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/MapTest.java index dacfe98d36f9..30c1847f9e17 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/MapTest.java @@ -32,7 +32,8 @@ */ public class MapTest { - @SerializedName("map_map_of_string") + public static final String SERIALIZED_NAME_MapMapOfString = "map_map_of_string"; + @SerializedName(SERIALIZED_NAME_MapMapOfString) private Map> mapMapOfString = null; /** @@ -82,7 +83,8 @@ public InnerEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("map_of_enum_string") + public static final String SERIALIZED_NAME_MapOfEnumString = "map_of_enum_string"; + @SerializedName(SERIALIZED_NAME_MapOfEnumString) private Map mapOfEnumString = null; public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 16209d72de3f..0d81089435bb 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -35,13 +35,16 @@ */ public class MixedPropertiesAndAdditionalPropertiesClass { - @SerializedName("uuid") + public static final String SERIALIZED_NAME_Uuid = "uuid"; + @SerializedName(SERIALIZED_NAME_Uuid) private UUID uuid = null; - @SerializedName("dateTime") + public static final String SERIALIZED_NAME_DateTime = "dateTime"; + @SerializedName(SERIALIZED_NAME_DateTime) private OffsetDateTime dateTime = null; - @SerializedName("map") + public static final String SERIALIZED_NAME_Map = "map"; + @SerializedName(SERIALIZED_NAME_Map) private Map map = null; public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Model200Response.java index 63d57e6116e7..d84e624a363b 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Model200Response.java @@ -30,10 +30,12 @@ @ApiModel(description = "Model for testing model name starting with number") public class Model200Response { - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private Integer name = null; - @SerializedName("class") + public static final String SERIALIZED_NAME_PropertyClass = "class"; + @SerializedName(SERIALIZED_NAME_PropertyClass) private String propertyClass = null; public Model200Response name(Integer name) { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 691edae1950d..f328296e9486 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -29,13 +29,16 @@ */ public class ModelApiResponse { - @SerializedName("code") + public static final String SERIALIZED_NAME_Code = "code"; + @SerializedName(SERIALIZED_NAME_Code) private Integer code = null; - @SerializedName("type") + public static final String SERIALIZED_NAME_Type = "type"; + @SerializedName(SERIALIZED_NAME_Type) private String type = null; - @SerializedName("message") + public static final String SERIALIZED_NAME_Message = "message"; + @SerializedName(SERIALIZED_NAME_Message) private String message = null; public ModelApiResponse code(Integer code) { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ModelReturn.java index 60b5dd4fc694..876b7099e56e 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -30,7 +30,8 @@ @ApiModel(description = "Model for testing reserved words") public class ModelReturn { - @SerializedName("return") + public static final String SERIALIZED_NAME_Return = "return"; + @SerializedName(SERIALIZED_NAME_Return) private Integer _return = null; public ModelReturn _return(Integer _return) { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Name.java index 2778e36c7d16..5035d8d618cb 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Name.java @@ -30,16 +30,20 @@ @ApiModel(description = "Model for testing model name same as property name") public class Name { - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private Integer name = null; - @SerializedName("snake_case") + public static final String SERIALIZED_NAME_SnakeCase = "snake_case"; + @SerializedName(SERIALIZED_NAME_SnakeCase) private Integer snakeCase = null; - @SerializedName("property") + public static final String SERIALIZED_NAME_Property = "property"; + @SerializedName(SERIALIZED_NAME_Property) private String property = null; - @SerializedName("123Number") + public static final String SERIALIZED_NAME_123number = "123Number"; + @SerializedName(SERIALIZED_NAME_123number) private Integer _123number = null; public Name name(Integer name) { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/NumberOnly.java index f3adad8c8251..b2507f5469f8 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -30,7 +30,8 @@ */ public class NumberOnly { - @SerializedName("JustNumber") + public static final String SERIALIZED_NAME_JustNumber = "JustNumber"; + @SerializedName(SERIALIZED_NAME_JustNumber) private BigDecimal justNumber = null; public NumberOnly justNumber(BigDecimal justNumber) { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Order.java index f0b57234f6ac..324382429d95 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Order.java @@ -30,16 +30,20 @@ */ public class Order { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("petId") + public static final String SERIALIZED_NAME_PetId = "petId"; + @SerializedName(SERIALIZED_NAME_PetId) private Long petId = null; - @SerializedName("quantity") + public static final String SERIALIZED_NAME_Quantity = "quantity"; + @SerializedName(SERIALIZED_NAME_Quantity) private Integer quantity = null; - @SerializedName("shipDate") + public static final String SERIALIZED_NAME_ShipDate = "shipDate"; + @SerializedName(SERIALIZED_NAME_ShipDate) private OffsetDateTime shipDate = null; /** @@ -91,10 +95,12 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("status") + public static final String SERIALIZED_NAME_Status = "status"; + @SerializedName(SERIALIZED_NAME_Status) private StatusEnum status = null; - @SerializedName("complete") + public static final String SERIALIZED_NAME_Complete = "complete"; + @SerializedName(SERIALIZED_NAME_Complete) private Boolean complete = false; public Order id(Long id) { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/OuterComposite.java index 1faef824dc37..25489f4ce420 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -30,13 +30,16 @@ */ public class OuterComposite { - @SerializedName("my_number") + public static final String SERIALIZED_NAME_MyNumber = "my_number"; + @SerializedName(SERIALIZED_NAME_MyNumber) private BigDecimal myNumber = null; - @SerializedName("my_string") + public static final String SERIALIZED_NAME_MyString = "my_string"; + @SerializedName(SERIALIZED_NAME_MyString) private String myString = null; - @SerializedName("my_boolean") + public static final String SERIALIZED_NAME_MyBoolean = "my_boolean"; + @SerializedName(SERIALIZED_NAME_MyBoolean) private Boolean myBoolean = null; public OuterComposite myNumber(BigDecimal myNumber) { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Pet.java index f41a4c2f4837..29d941716368 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Pet.java @@ -33,19 +33,24 @@ */ public class Pet { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("category") + public static final String SERIALIZED_NAME_Category = "category"; + @SerializedName(SERIALIZED_NAME_Category) private Category category = null; - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private String name = null; - @SerializedName("photoUrls") + public static final String SERIALIZED_NAME_PhotoUrls = "photoUrls"; + @SerializedName(SERIALIZED_NAME_PhotoUrls) private List photoUrls = new ArrayList(); - @SerializedName("tags") + public static final String SERIALIZED_NAME_Tags = "tags"; + @SerializedName(SERIALIZED_NAME_Tags) private List tags = null; /** @@ -97,7 +102,8 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("status") + public static final String SERIALIZED_NAME_Status = "status"; + @SerializedName(SERIALIZED_NAME_Status) private StatusEnum status = null; public Pet id(Long id) { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index b7ec375a37af..cfde51d8a9d7 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -29,10 +29,12 @@ */ public class ReadOnlyFirst { - @SerializedName("bar") + public static final String SERIALIZED_NAME_Bar = "bar"; + @SerializedName(SERIALIZED_NAME_Bar) private String bar = null; - @SerializedName("baz") + public static final String SERIALIZED_NAME_Baz = "baz"; + @SerializedName(SERIALIZED_NAME_Baz) private String baz = null; /** diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/SpecialModelName.java index e5619cdd7ca3..78be75ca241b 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -29,7 +29,8 @@ */ public class SpecialModelName { - @SerializedName("$special[property.name]") + public static final String SERIALIZED_NAME_$SpecialPropertyName = "$special[property.name]"; + @SerializedName(SERIALIZED_NAME_$SpecialPropertyName) private Long $specialPropertyName = null; public SpecialModelName $specialPropertyName(Long $specialPropertyName) { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Tag.java index 068cb92fbf58..dd24b1895555 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/Tag.java @@ -29,10 +29,12 @@ */ public class Tag { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private String name = null; public Tag id(Long id) { diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/User.java index 7810db7cf801..1cb4b8a89a80 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/model/User.java @@ -29,28 +29,36 @@ */ public class User { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("username") + public static final String SERIALIZED_NAME_Username = "username"; + @SerializedName(SERIALIZED_NAME_Username) private String username = null; - @SerializedName("firstName") + public static final String SERIALIZED_NAME_FirstName = "firstName"; + @SerializedName(SERIALIZED_NAME_FirstName) private String firstName = null; - @SerializedName("lastName") + public static final String SERIALIZED_NAME_LastName = "lastName"; + @SerializedName(SERIALIZED_NAME_LastName) private String lastName = null; - @SerializedName("email") + public static final String SERIALIZED_NAME_Email = "email"; + @SerializedName(SERIALIZED_NAME_Email) private String email = null; - @SerializedName("password") + public static final String SERIALIZED_NAME_Password = "password"; + @SerializedName(SERIALIZED_NAME_Password) private String password = null; - @SerializedName("phone") + public static final String SERIALIZED_NAME_Phone = "phone"; + @SerializedName(SERIALIZED_NAME_Phone) private String phone = null; - @SerializedName("userStatus") + public static final String SERIALIZED_NAME_UserStatus = "userStatus"; + @SerializedName(SERIALIZED_NAME_UserStatus) private Integer userStatus = null; public User id(Long id) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index e8f10d21bd0b..c3ee6d14e6b9 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -32,10 +32,12 @@ */ public class AdditionalPropertiesClass { - @SerializedName("map_property") + public static final String SERIALIZED_NAME_MapProperty = "map_property"; + @SerializedName(SERIALIZED_NAME_MapProperty) private Map mapProperty = null; - @SerializedName("map_of_map_property") + public static final String SERIALIZED_NAME_MapOfMapProperty = "map_of_map_property"; + @SerializedName(SERIALIZED_NAME_MapOfMapProperty) private Map> mapOfMapProperty = null; public AdditionalPropertiesClass mapProperty(Map mapProperty) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Animal.java index f02b1133e226..921305a27856 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Animal.java @@ -30,10 +30,12 @@ public class Animal { - @SerializedName("className") + public static final String SERIALIZED_NAME_ClassName = "className"; + @SerializedName(SERIALIZED_NAME_ClassName) private String className = null; - @SerializedName("color") + public static final String SERIALIZED_NAME_Color = "color"; + @SerializedName(SERIALIZED_NAME_Color) private String color = "red"; public Animal() { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index efaeb0bedd9b..231b2332ba3f 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -32,7 +32,8 @@ */ public class ArrayOfArrayOfNumberOnly { - @SerializedName("ArrayArrayNumber") + public static final String SERIALIZED_NAME_ArrayArrayNumber = "ArrayArrayNumber"; + @SerializedName(SERIALIZED_NAME_ArrayArrayNumber) private List> arrayArrayNumber = null; public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 40b62c085451..87446e7ce5b7 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -32,7 +32,8 @@ */ public class ArrayOfNumberOnly { - @SerializedName("ArrayNumber") + public static final String SERIALIZED_NAME_ArrayNumber = "ArrayNumber"; + @SerializedName(SERIALIZED_NAME_ArrayNumber) private List arrayNumber = null; public ArrayOfNumberOnly arrayNumber(List arrayNumber) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayTest.java index 1c8edb287cf2..39d2bce3d8b2 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -32,13 +32,16 @@ */ public class ArrayTest { - @SerializedName("array_of_string") + public static final String SERIALIZED_NAME_ArrayOfString = "array_of_string"; + @SerializedName(SERIALIZED_NAME_ArrayOfString) private List arrayOfString = null; - @SerializedName("array_array_of_integer") + public static final String SERIALIZED_NAME_ArrayArrayOfInteger = "array_array_of_integer"; + @SerializedName(SERIALIZED_NAME_ArrayArrayOfInteger) private List> arrayArrayOfInteger = null; - @SerializedName("array_array_of_model") + public static final String SERIALIZED_NAME_ArrayArrayOfModel = "array_array_of_model"; + @SerializedName(SERIALIZED_NAME_ArrayArrayOfModel) private List> arrayArrayOfModel = null; public ArrayTest arrayOfString(List arrayOfString) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Capitalization.java index 678e7d31b8a5..4158d604a1db 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Capitalization.java @@ -29,22 +29,28 @@ */ public class Capitalization { - @SerializedName("smallCamel") + public static final String SERIALIZED_NAME_SmallCamel = "smallCamel"; + @SerializedName(SERIALIZED_NAME_SmallCamel) private String smallCamel = null; - @SerializedName("CapitalCamel") + public static final String SERIALIZED_NAME_CapitalCamel = "CapitalCamel"; + @SerializedName(SERIALIZED_NAME_CapitalCamel) private String capitalCamel = null; - @SerializedName("small_Snake") + public static final String SERIALIZED_NAME_SmallSnake = "small_Snake"; + @SerializedName(SERIALIZED_NAME_SmallSnake) private String smallSnake = null; - @SerializedName("Capital_Snake") + public static final String SERIALIZED_NAME_CapitalSnake = "Capital_Snake"; + @SerializedName(SERIALIZED_NAME_CapitalSnake) private String capitalSnake = null; - @SerializedName("SCA_ETH_Flow_Points") + public static final String SERIALIZED_NAME_ScAETHFlowPoints = "SCA_ETH_Flow_Points"; + @SerializedName(SERIALIZED_NAME_ScAETHFlowPoints) private String scAETHFlowPoints = null; - @SerializedName("ATT_NAME") + public static final String SERIALIZED_NAME_ATTNAME = "ATT_NAME"; + @SerializedName(SERIALIZED_NAME_ATTNAME) private String ATT_NAME = null; public Capitalization smallCamel(String smallCamel) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Cat.java index 346c5727fc6a..504fab5f20e7 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Cat.java @@ -30,7 +30,8 @@ */ public class Cat extends Animal { - @SerializedName("declawed") + public static final String SERIALIZED_NAME_Declawed = "declawed"; + @SerializedName(SERIALIZED_NAME_Declawed) private Boolean declawed = null; public Cat declawed(Boolean declawed) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Category.java index 5fec485136fb..063c56fda010 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Category.java @@ -29,10 +29,12 @@ */ public class Category { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private String name = null; public Category id(Long id) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ClassModel.java index 811b27ab0057..0f1b83287839 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ClassModel.java @@ -30,7 +30,8 @@ @ApiModel(description = "Model for testing model with \"_class\" property") public class ClassModel { - @SerializedName("_class") + public static final String SERIALIZED_NAME_PropertyClass = "_class"; + @SerializedName(SERIALIZED_NAME_PropertyClass) private String propertyClass = null; public ClassModel propertyClass(String propertyClass) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Client.java index ef83dc12f2fa..3084f329a469 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Client.java @@ -29,7 +29,8 @@ */ public class Client { - @SerializedName("client") + public static final String SERIALIZED_NAME_Client = "client"; + @SerializedName(SERIALIZED_NAME_Client) private String client = null; public Client client(String client) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Dog.java index f5c442375bb6..0610e11ea035 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Dog.java @@ -30,7 +30,8 @@ */ public class Dog extends Animal { - @SerializedName("breed") + public static final String SERIALIZED_NAME_Breed = "breed"; + @SerializedName(SERIALIZED_NAME_Breed) private String breed = null; public Dog breed(String breed) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/EnumArrays.java index 9428d3477275..a6c2db762bc3 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -78,7 +78,8 @@ public JustSymbolEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("just_symbol") + public static final String SERIALIZED_NAME_JustSymbol = "just_symbol"; + @SerializedName(SERIALIZED_NAME_JustSymbol) private JustSymbolEnum justSymbol = null; /** @@ -128,7 +129,8 @@ public ArrayEnumEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("array_enum") + public static final String SERIALIZED_NAME_ArrayEnum = "array_enum"; + @SerializedName(SERIALIZED_NAME_ArrayEnum) private List arrayEnum = null; public EnumArrays justSymbol(JustSymbolEnum justSymbol) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/EnumTest.java index fa140cc46aad..21f8bc13eb16 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/EnumTest.java @@ -79,7 +79,8 @@ public EnumStringEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("enum_string") + public static final String SERIALIZED_NAME_EnumString = "enum_string"; + @SerializedName(SERIALIZED_NAME_EnumString) private EnumStringEnum enumString = null; /** @@ -131,7 +132,8 @@ public EnumStringRequiredEnum read(final JsonReader jsonReader) throws IOExcepti } } - @SerializedName("enum_string_required") + public static final String SERIALIZED_NAME_EnumStringRequired = "enum_string_required"; + @SerializedName(SERIALIZED_NAME_EnumStringRequired) private EnumStringRequiredEnum enumStringRequired = null; /** @@ -181,7 +183,8 @@ public EnumIntegerEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("enum_integer") + public static final String SERIALIZED_NAME_EnumInteger = "enum_integer"; + @SerializedName(SERIALIZED_NAME_EnumInteger) private EnumIntegerEnum enumInteger = null; /** @@ -231,10 +234,12 @@ public EnumNumberEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("enum_number") + public static final String SERIALIZED_NAME_EnumNumber = "enum_number"; + @SerializedName(SERIALIZED_NAME_EnumNumber) private EnumNumberEnum enumNumber = null; - @SerializedName("outerEnum") + public static final String SERIALIZED_NAME_OuterEnum = "outerEnum"; + @SerializedName(SERIALIZED_NAME_OuterEnum) private OuterEnum outerEnum = null; public EnumTest enumString(EnumStringEnum enumString) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/FormatTest.java index 7616bf0d798a..5a6709bd4f19 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/FormatTest.java @@ -34,43 +34,56 @@ */ public class FormatTest { - @SerializedName("integer") + public static final String SERIALIZED_NAME_Integer = "integer"; + @SerializedName(SERIALIZED_NAME_Integer) private Integer integer = null; - @SerializedName("int32") + public static final String SERIALIZED_NAME_Int32 = "int32"; + @SerializedName(SERIALIZED_NAME_Int32) private Integer int32 = null; - @SerializedName("int64") + public static final String SERIALIZED_NAME_Int64 = "int64"; + @SerializedName(SERIALIZED_NAME_Int64) private Long int64 = null; - @SerializedName("number") + public static final String SERIALIZED_NAME_Number = "number"; + @SerializedName(SERIALIZED_NAME_Number) private BigDecimal number = null; - @SerializedName("float") + public static final String SERIALIZED_NAME_Float = "float"; + @SerializedName(SERIALIZED_NAME_Float) private Float _float = null; - @SerializedName("double") + public static final String SERIALIZED_NAME_Double = "double"; + @SerializedName(SERIALIZED_NAME_Double) private Double _double = null; - @SerializedName("string") + public static final String SERIALIZED_NAME_String = "string"; + @SerializedName(SERIALIZED_NAME_String) private String string = null; - @SerializedName("byte") + public static final String SERIALIZED_NAME_Byte = "byte"; + @SerializedName(SERIALIZED_NAME_Byte) private byte[] _byte = null; - @SerializedName("binary") + public static final String SERIALIZED_NAME_Binary = "binary"; + @SerializedName(SERIALIZED_NAME_Binary) private File binary = null; - @SerializedName("date") + public static final String SERIALIZED_NAME_Date = "date"; + @SerializedName(SERIALIZED_NAME_Date) private LocalDate date = null; - @SerializedName("dateTime") + public static final String SERIALIZED_NAME_DateTime = "dateTime"; + @SerializedName(SERIALIZED_NAME_DateTime) private OffsetDateTime dateTime = null; - @SerializedName("uuid") + public static final String SERIALIZED_NAME_Uuid = "uuid"; + @SerializedName(SERIALIZED_NAME_Uuid) private UUID uuid = null; - @SerializedName("password") + public static final String SERIALIZED_NAME_Password = "password"; + @SerializedName(SERIALIZED_NAME_Password) private String password = null; public FormatTest integer(Integer integer) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index 0acd07c4cd34..479456ef4601 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -29,10 +29,12 @@ */ public class HasOnlyReadOnly { - @SerializedName("bar") + public static final String SERIALIZED_NAME_Bar = "bar"; + @SerializedName(SERIALIZED_NAME_Bar) private String bar = null; - @SerializedName("foo") + public static final String SERIALIZED_NAME_Foo = "foo"; + @SerializedName(SERIALIZED_NAME_Foo) private String foo = null; /** diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MapTest.java index dacfe98d36f9..30c1847f9e17 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MapTest.java @@ -32,7 +32,8 @@ */ public class MapTest { - @SerializedName("map_map_of_string") + public static final String SERIALIZED_NAME_MapMapOfString = "map_map_of_string"; + @SerializedName(SERIALIZED_NAME_MapMapOfString) private Map> mapMapOfString = null; /** @@ -82,7 +83,8 @@ public InnerEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("map_of_enum_string") + public static final String SERIALIZED_NAME_MapOfEnumString = "map_of_enum_string"; + @SerializedName(SERIALIZED_NAME_MapOfEnumString) private Map mapOfEnumString = null; public MapTest mapMapOfString(Map> mapMapOfString) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 16209d72de3f..0d81089435bb 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -35,13 +35,16 @@ */ public class MixedPropertiesAndAdditionalPropertiesClass { - @SerializedName("uuid") + public static final String SERIALIZED_NAME_Uuid = "uuid"; + @SerializedName(SERIALIZED_NAME_Uuid) private UUID uuid = null; - @SerializedName("dateTime") + public static final String SERIALIZED_NAME_DateTime = "dateTime"; + @SerializedName(SERIALIZED_NAME_DateTime) private OffsetDateTime dateTime = null; - @SerializedName("map") + public static final String SERIALIZED_NAME_Map = "map"; + @SerializedName(SERIALIZED_NAME_Map) private Map map = null; public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Model200Response.java index 63d57e6116e7..d84e624a363b 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Model200Response.java @@ -30,10 +30,12 @@ @ApiModel(description = "Model for testing model name starting with number") public class Model200Response { - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private Integer name = null; - @SerializedName("class") + public static final String SERIALIZED_NAME_PropertyClass = "class"; + @SerializedName(SERIALIZED_NAME_PropertyClass) private String propertyClass = null; public Model200Response name(Integer name) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 691edae1950d..f328296e9486 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -29,13 +29,16 @@ */ public class ModelApiResponse { - @SerializedName("code") + public static final String SERIALIZED_NAME_Code = "code"; + @SerializedName(SERIALIZED_NAME_Code) private Integer code = null; - @SerializedName("type") + public static final String SERIALIZED_NAME_Type = "type"; + @SerializedName(SERIALIZED_NAME_Type) private String type = null; - @SerializedName("message") + public static final String SERIALIZED_NAME_Message = "message"; + @SerializedName(SERIALIZED_NAME_Message) private String message = null; public ModelApiResponse code(Integer code) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ModelReturn.java index 60b5dd4fc694..876b7099e56e 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -30,7 +30,8 @@ @ApiModel(description = "Model for testing reserved words") public class ModelReturn { - @SerializedName("return") + public static final String SERIALIZED_NAME_Return = "return"; + @SerializedName(SERIALIZED_NAME_Return) private Integer _return = null; public ModelReturn _return(Integer _return) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Name.java index 2778e36c7d16..5035d8d618cb 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Name.java @@ -30,16 +30,20 @@ @ApiModel(description = "Model for testing model name same as property name") public class Name { - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private Integer name = null; - @SerializedName("snake_case") + public static final String SERIALIZED_NAME_SnakeCase = "snake_case"; + @SerializedName(SERIALIZED_NAME_SnakeCase) private Integer snakeCase = null; - @SerializedName("property") + public static final String SERIALIZED_NAME_Property = "property"; + @SerializedName(SERIALIZED_NAME_Property) private String property = null; - @SerializedName("123Number") + public static final String SERIALIZED_NAME_123number = "123Number"; + @SerializedName(SERIALIZED_NAME_123number) private Integer _123number = null; public Name name(Integer name) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/NumberOnly.java index f3adad8c8251..b2507f5469f8 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -30,7 +30,8 @@ */ public class NumberOnly { - @SerializedName("JustNumber") + public static final String SERIALIZED_NAME_JustNumber = "JustNumber"; + @SerializedName(SERIALIZED_NAME_JustNumber) private BigDecimal justNumber = null; public NumberOnly justNumber(BigDecimal justNumber) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Order.java index f0b57234f6ac..324382429d95 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Order.java @@ -30,16 +30,20 @@ */ public class Order { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("petId") + public static final String SERIALIZED_NAME_PetId = "petId"; + @SerializedName(SERIALIZED_NAME_PetId) private Long petId = null; - @SerializedName("quantity") + public static final String SERIALIZED_NAME_Quantity = "quantity"; + @SerializedName(SERIALIZED_NAME_Quantity) private Integer quantity = null; - @SerializedName("shipDate") + public static final String SERIALIZED_NAME_ShipDate = "shipDate"; + @SerializedName(SERIALIZED_NAME_ShipDate) private OffsetDateTime shipDate = null; /** @@ -91,10 +95,12 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("status") + public static final String SERIALIZED_NAME_Status = "status"; + @SerializedName(SERIALIZED_NAME_Status) private StatusEnum status = null; - @SerializedName("complete") + public static final String SERIALIZED_NAME_Complete = "complete"; + @SerializedName(SERIALIZED_NAME_Complete) private Boolean complete = false; public Order id(Long id) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/OuterComposite.java index 1faef824dc37..25489f4ce420 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -30,13 +30,16 @@ */ public class OuterComposite { - @SerializedName("my_number") + public static final String SERIALIZED_NAME_MyNumber = "my_number"; + @SerializedName(SERIALIZED_NAME_MyNumber) private BigDecimal myNumber = null; - @SerializedName("my_string") + public static final String SERIALIZED_NAME_MyString = "my_string"; + @SerializedName(SERIALIZED_NAME_MyString) private String myString = null; - @SerializedName("my_boolean") + public static final String SERIALIZED_NAME_MyBoolean = "my_boolean"; + @SerializedName(SERIALIZED_NAME_MyBoolean) private Boolean myBoolean = null; public OuterComposite myNumber(BigDecimal myNumber) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Pet.java index f41a4c2f4837..29d941716368 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Pet.java @@ -33,19 +33,24 @@ */ public class Pet { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("category") + public static final String SERIALIZED_NAME_Category = "category"; + @SerializedName(SERIALIZED_NAME_Category) private Category category = null; - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private String name = null; - @SerializedName("photoUrls") + public static final String SERIALIZED_NAME_PhotoUrls = "photoUrls"; + @SerializedName(SERIALIZED_NAME_PhotoUrls) private List photoUrls = new ArrayList(); - @SerializedName("tags") + public static final String SERIALIZED_NAME_Tags = "tags"; + @SerializedName(SERIALIZED_NAME_Tags) private List tags = null; /** @@ -97,7 +102,8 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { } } - @SerializedName("status") + public static final String SERIALIZED_NAME_Status = "status"; + @SerializedName(SERIALIZED_NAME_Status) private StatusEnum status = null; public Pet id(Long id) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index b7ec375a37af..cfde51d8a9d7 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -29,10 +29,12 @@ */ public class ReadOnlyFirst { - @SerializedName("bar") + public static final String SERIALIZED_NAME_Bar = "bar"; + @SerializedName(SERIALIZED_NAME_Bar) private String bar = null; - @SerializedName("baz") + public static final String SERIALIZED_NAME_Baz = "baz"; + @SerializedName(SERIALIZED_NAME_Baz) private String baz = null; /** diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/SpecialModelName.java index e5619cdd7ca3..78be75ca241b 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -29,7 +29,8 @@ */ public class SpecialModelName { - @SerializedName("$special[property.name]") + public static final String SERIALIZED_NAME_$SpecialPropertyName = "$special[property.name]"; + @SerializedName(SERIALIZED_NAME_$SpecialPropertyName) private Long $specialPropertyName = null; public SpecialModelName $specialPropertyName(Long $specialPropertyName) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Tag.java index 068cb92fbf58..dd24b1895555 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/Tag.java @@ -29,10 +29,12 @@ */ public class Tag { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("name") + public static final String SERIALIZED_NAME_Name = "name"; + @SerializedName(SERIALIZED_NAME_Name) private String name = null; public Tag id(Long id) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/User.java index 7810db7cf801..1cb4b8a89a80 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/User.java @@ -29,28 +29,36 @@ */ public class User { - @SerializedName("id") + public static final String SERIALIZED_NAME_Id = "id"; + @SerializedName(SERIALIZED_NAME_Id) private Long id = null; - @SerializedName("username") + public static final String SERIALIZED_NAME_Username = "username"; + @SerializedName(SERIALIZED_NAME_Username) private String username = null; - @SerializedName("firstName") + public static final String SERIALIZED_NAME_FirstName = "firstName"; + @SerializedName(SERIALIZED_NAME_FirstName) private String firstName = null; - @SerializedName("lastName") + public static final String SERIALIZED_NAME_LastName = "lastName"; + @SerializedName(SERIALIZED_NAME_LastName) private String lastName = null; - @SerializedName("email") + public static final String SERIALIZED_NAME_Email = "email"; + @SerializedName(SERIALIZED_NAME_Email) private String email = null; - @SerializedName("password") + public static final String SERIALIZED_NAME_Password = "password"; + @SerializedName(SERIALIZED_NAME_Password) private String password = null; - @SerializedName("phone") + public static final String SERIALIZED_NAME_Phone = "phone"; + @SerializedName(SERIALIZED_NAME_Phone) private String phone = null; - @SerializedName("userStatus") + public static final String SERIALIZED_NAME_UserStatus = "userStatus"; + @SerializedName(SERIALIZED_NAME_UserStatus) private Integer userStatus = null; public User id(Long id) {