diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/anyof_model.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/anyof_model.mustache index c93c9b3f20d9..2fc12731cece 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/anyof_model.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/anyof_model.mustache @@ -238,7 +238,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im /** * Set the instance that matches the anyOf child schema, check * the instance parameter is valid against the anyOf child schemas: - * {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}} + * {{#anyOf}}{{.}}{{^-last}}, {{/-last}}{{/anyOf}} * * It could be an instance of the 'anyOf' schemas. */ @@ -276,9 +276,9 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im /** * Get the actual instance, which can be the following: - * {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}} + * {{#anyOf}}{{.}}{{^-last}}, {{/-last}}{{/anyOf}} * - * @return The actual instance ({{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}) + * @return The actual instance ({{#anyOf}}{{.}}{{^-last}}, {{/-last}}{{/anyOf}}) */ @SuppressWarnings("unchecked") @Override @@ -290,11 +290,11 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{#anyOf}} {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} /** - * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, + * Get the actual instance of `{{dataType}}`. If the actual instance is not `{{dataType}}`, * the ClassCastException will be thrown. * - * @return The actual instance of `{{{dataType}}}` - * @throws ClassCastException if the instance is not `{{{dataType}}}` + * @return The actual instance of `{{dataType}}` + * @throws ClassCastException if the instance is not `{{dataType}}` */ public {{{dataType}}} get{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}() throws ClassCastException { return ({{{dataType}}})super.getActualInstance(); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/oneof_model.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/oneof_model.mustache index ea64a0e6755f..dc71a8beb320 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/oneof_model.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/oneof_model.mustache @@ -316,7 +316,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}} + * {{#oneOf}}{{.}}{{^-last}}, {{/-last}}{{/oneOf}} * * It could be an instance of the 'oneOf' schemas. */ @@ -354,9 +354,9 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im /** * Get the actual instance, which can be the following: - * {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}} + * {{#oneOf}}{{.}}{{^-last}}, {{/-last}}{{/oneOf}} * - * @return The actual instance ({{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}) + * @return The actual instance ({{#oneOf}}{{.}}{{^-last}}, {{/-last}}{{/oneOf}}) */ @SuppressWarnings("unchecked") @Override @@ -368,12 +368,13 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{#oneOf}} {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} /** - * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, + * Get the actual instance of `{{dataType}}`. If the actual instance is not `{{dataType}}`, * the ClassCastException will be thrown. * - * @return The actual instance of `{{{dataType}}}` - * @throws ClassCastException if the instance is not `{{{dataType}}}` + * @return The actual instance of `{{dataType}}` + * @throws ClassCastException if the instance is not `{{dataType}}` */ + @SuppressWarnings("unchecked") public {{{dataType}}} get{{#sanitizeDataType}}{{{dataType}}}{{/sanitizeDataType}}() throws ClassCastException { return ({{{dataType}}})super.getActualInstance(); } diff --git a/samples/client/others/java/okhttp-gson-oneOf-array/src/main/java/org/openapitools/client/model/MyExampleGet200Response.java b/samples/client/others/java/okhttp-gson-oneOf-array/src/main/java/org/openapitools/client/model/MyExampleGet200Response.java index 537a8d7791bc..004e5e2859bf 100644 --- a/samples/client/others/java/okhttp-gson-oneOf-array/src/main/java/org/openapitools/client/model/MyExampleGet200Response.java +++ b/samples/client/others/java/okhttp-gson-oneOf-array/src/main/java/org/openapitools/client/model/MyExampleGet200Response.java @@ -183,7 +183,7 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * List<@Valid OneOf1>, OneOf1 + * List<@Valid OneOf1>, OneOf1 * * It could be an instance of the 'oneOf' schemas. */ @@ -207,9 +207,9 @@ public void setActualInstance(Object instance) { /** * Get the actual instance, which can be the following: - * List<@Valid OneOf1>, OneOf1 + * List<@Valid OneOf1>, OneOf1 * - * @return The actual instance (List<@Valid OneOf1>, OneOf1) + * @return The actual instance (List<@Valid OneOf1>, OneOf1) */ @SuppressWarnings("unchecked") @Override @@ -218,12 +218,13 @@ public Object getActualInstance() { } /** - * Get the actual instance of `List<@Valid OneOf1>`. If the actual instance is not `List<@Valid OneOf1>`, + * Get the actual instance of `List<@Valid OneOf1>`. If the actual instance is not `List<@Valid OneOf1>`, * the ClassCastException will be thrown. * - * @return The actual instance of `List<@Valid OneOf1>` - * @throws ClassCastException if the instance is not `List<@Valid OneOf1>` + * @return The actual instance of `List<@Valid OneOf1>` + * @throws ClassCastException if the instance is not `List<@Valid OneOf1>` */ + @SuppressWarnings("unchecked") public List<@Valid OneOf1> getListOneOf1() throws ClassCastException { return (List<@Valid OneOf1>)super.getActualInstance(); } @@ -235,6 +236,7 @@ public Object getActualInstance() { * @return The actual instance of `OneOf1` * @throws ClassCastException if the instance is not `OneOf1` */ + @SuppressWarnings("unchecked") public OneOf1 getOneOf1() throws ClassCastException { return (OneOf1)super.getActualInstance(); } diff --git a/samples/client/others/java/okhttp-gson-oneOf/src/main/java/org/openapitools/client/model/MyExamplePostRequest.java b/samples/client/others/java/okhttp-gson-oneOf/src/main/java/org/openapitools/client/model/MyExamplePostRequest.java index 90b02e236564..479ec0f4b8f0 100644 --- a/samples/client/others/java/okhttp-gson-oneOf/src/main/java/org/openapitools/client/model/MyExamplePostRequest.java +++ b/samples/client/others/java/okhttp-gson-oneOf/src/main/java/org/openapitools/client/model/MyExamplePostRequest.java @@ -174,6 +174,7 @@ public Object getActualInstance() { * @return The actual instance of `String` * @throws ClassCastException if the instance is not `String` */ + @SuppressWarnings("unchecked") public String getString() throws ClassCastException { return (String)super.getActualInstance(); } diff --git a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/model/SimpleOneOf.java b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/model/SimpleOneOf.java index 177c89d8a3d9..f7b8acf7f073 100644 --- a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/model/SimpleOneOf.java +++ b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/model/SimpleOneOf.java @@ -202,6 +202,7 @@ public Object getActualInstance() { * @return The actual instance of `String` * @throws ClassCastException if the instance is not `String` */ + @SuppressWarnings("unchecked") public String getString() throws ClassCastException { return (String)super.getActualInstance(); } @@ -213,6 +214,7 @@ public String getString() throws ClassCastException { * @return The actual instance of `Integer` * @throws ClassCastException if the instance is not `Integer` */ + @SuppressWarnings("unchecked") public Integer getInteger() throws ClassCastException { return (Integer)super.getActualInstance(); } diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/OneOfStringOrInt.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/OneOfStringOrInt.java index 4f5e8b3b1a8e..53c93e568da4 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/OneOfStringOrInt.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/OneOfStringOrInt.java @@ -201,6 +201,7 @@ public Object getActualInstance() { * @return The actual instance of `String` * @throws ClassCastException if the instance is not `String` */ + @SuppressWarnings("unchecked") public String getString() throws ClassCastException { return (String)super.getActualInstance(); } @@ -212,6 +213,7 @@ public String getString() throws ClassCastException { * @return The actual instance of `Integer` * @throws ClassCastException if the instance is not `Integer` */ + @SuppressWarnings("unchecked") public Integer getInteger() throws ClassCastException { return (Integer)super.getActualInstance(); } diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/RefRefToPathLevelParameterOneofRefToOneofParameter.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/RefRefToPathLevelParameterOneofRefToOneofParameter.java index f7b0dd91025e..99f2c75349bb 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/RefRefToPathLevelParameterOneofRefToOneofParameter.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/RefRefToPathLevelParameterOneofRefToOneofParameter.java @@ -201,6 +201,7 @@ public Object getActualInstance() { * @return The actual instance of `String` * @throws ClassCastException if the instance is not `String` */ + @SuppressWarnings("unchecked") public String getString() throws ClassCastException { return (String)super.getActualInstance(); } @@ -212,6 +213,7 @@ public String getString() throws ClassCastException { * @return The actual instance of `Integer` * @throws ClassCastException if the instance is not `Integer` */ + @SuppressWarnings("unchecked") public Integer getInteger() throws ClassCastException { return (Integer)super.getActualInstance(); } diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/RefToRefParameterAnyofRefToAnyofParameter.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/RefToRefParameterAnyofRefToAnyofParameter.java index 62d2cd2e770b..dff53a7d103b 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/RefToRefParameterAnyofRefToAnyofParameter.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/RefToRefParameterAnyofRefToAnyofParameter.java @@ -174,7 +174,7 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * List, String + * List<String>, String * * It could be an instance of the 'oneOf' schemas. */ @@ -198,9 +198,9 @@ public void setActualInstance(Object instance) { /** * Get the actual instance, which can be the following: - * List, String + * List<String>, String * - * @return The actual instance (List, String) + * @return The actual instance (List<String>, String) */ @SuppressWarnings("unchecked") @Override @@ -215,17 +215,19 @@ public Object getActualInstance() { * @return The actual instance of `String` * @throws ClassCastException if the instance is not `String` */ + @SuppressWarnings("unchecked") public String getString() throws ClassCastException { return (String)super.getActualInstance(); } /** - * Get the actual instance of `List`. If the actual instance is not `List`, + * Get the actual instance of `List<String>`. If the actual instance is not `List<String>`, * the ClassCastException will be thrown. * - * @return The actual instance of `List` - * @throws ClassCastException if the instance is not `List` + * @return The actual instance of `List<String>` + * @throws ClassCastException if the instance is not `List<String>` */ + @SuppressWarnings("unchecked") public List getListString() throws ClassCastException { return (List)super.getActualInstance(); } diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/SelfReferenceOneOf.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/SelfReferenceOneOf.java index 81ffe9ea6a95..769d77549aa3 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/SelfReferenceOneOf.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/SelfReferenceOneOf.java @@ -201,6 +201,7 @@ public Object getActualInstance() { * @return The actual instance of `String` * @throws ClassCastException if the instance is not `String` */ + @SuppressWarnings("unchecked") public String getString() throws ClassCastException { return (String)super.getActualInstance(); } @@ -212,6 +213,7 @@ public String getString() throws ClassCastException { * @return The actual instance of `Boolean` * @throws ClassCastException if the instance is not `Boolean` */ + @SuppressWarnings("unchecked") public Boolean getBoolean() throws ClassCastException { return (Boolean)super.getActualInstance(); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfModelArrayAnyOfAllOfAttributesC.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfModelArrayAnyOfAllOfAttributesC.java index 69ebc25a8008..2ec42849eaac 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfModelArrayAnyOfAllOfAttributesC.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfModelArrayAnyOfAllOfAttributesC.java @@ -211,6 +211,7 @@ public Object getActualInstance() { * @return The actual instance of `Pet` * @throws ClassCastException if the instance is not `Pet` */ + @SuppressWarnings("unchecked") public Pet getPet() throws ClassCastException { return (Pet)super.getActualInstance(); } @@ -222,6 +223,7 @@ public Pet getPet() throws ClassCastException { * @return The actual instance of `Order` * @throws ClassCastException if the instance is not `Order` */ + @SuppressWarnings("unchecked") public Order getOrder() throws ClassCastException { return (Order)super.getActualInstance(); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayAnyOf.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayAnyOf.java index 63d25d44ff42..d092a98cb3ad 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayAnyOf.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayAnyOf.java @@ -169,7 +169,7 @@ public Map> getSchemas() { /** * Set the instance that matches the anyOf child schema, check * the instance parameter is valid against the anyOf child schemas: - * Integer, List + * Integer, List<String> * * It could be an instance of the 'anyOf' schemas. */ @@ -193,9 +193,9 @@ public void setActualInstance(Object instance) { /** * Get the actual instance, which can be the following: - * Integer, List + * Integer, List<String> * - * @return The actual instance (Integer, List) + * @return The actual instance (Integer, List<String>) */ @SuppressWarnings("unchecked") @Override @@ -215,11 +215,11 @@ public Integer getInteger() throws ClassCastException { } /** - * Get the actual instance of `List`. If the actual instance is not `List`, + * Get the actual instance of `List<String>`. If the actual instance is not `List<String>`, * the ClassCastException will be thrown. * - * @return The actual instance of `List` - * @throws ClassCastException if the instance is not `List` + * @return The actual instance of `List<String>` + * @throws ClassCastException if the instance is not `List<String>` */ public List getListString() throws ClassCastException { return (List)super.getActualInstance(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOneOf.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOneOf.java index b3bec5ee9f11..0202486849e6 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOneOf.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOneOf.java @@ -174,7 +174,7 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * Integer, List + * Integer, List<String> * * It could be an instance of the 'oneOf' schemas. */ @@ -198,9 +198,9 @@ public void setActualInstance(Object instance) { /** * Get the actual instance, which can be the following: - * Integer, List + * Integer, List<String> * - * @return The actual instance (Integer, List) + * @return The actual instance (Integer, List<String>) */ @SuppressWarnings("unchecked") @Override @@ -215,17 +215,19 @@ public Object getActualInstance() { * @return The actual instance of `Integer` * @throws ClassCastException if the instance is not `Integer` */ + @SuppressWarnings("unchecked") public Integer getInteger() throws ClassCastException { return (Integer)super.getActualInstance(); } /** - * Get the actual instance of `List`. If the actual instance is not `List`, + * Get the actual instance of `List<String>`. If the actual instance is not `List<String>`, * the ClassCastException will be thrown. * - * @return The actual instance of `List` - * @throws ClassCastException if the instance is not `List` + * @return The actual instance of `List<String>` + * @throws ClassCastException if the instance is not `List<String>` */ + @SuppressWarnings("unchecked") public List getListString() throws ClassCastException { return (List)super.getActualInstance(); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FakeAnyOfWIthSameErasureGet200Response.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FakeAnyOfWIthSameErasureGet200Response.java index 4bb1e546f7ab..b1f415e0ca01 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FakeAnyOfWIthSameErasureGet200Response.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FakeAnyOfWIthSameErasureGet200Response.java @@ -149,7 +149,7 @@ public Map> getSchemas() { /** * Set the instance that matches the anyOf child schema, check * the instance parameter is valid against the anyOf child schemas: - * List, List + * List<Integer>, List<String> * * It could be an instance of the 'anyOf' schemas. */ @@ -168,9 +168,9 @@ public void setActualInstance(Object instance) { /** * Get the actual instance, which can be the following: - * List, List + * List<Integer>, List<String> * - * @return The actual instance (List, List) + * @return The actual instance (List<Integer>, List<String>) */ @SuppressWarnings("unchecked") @Override @@ -179,22 +179,22 @@ public Object getActualInstance() { } /** - * Get the actual instance of `List`. If the actual instance is not `List`, + * Get the actual instance of `List<String>`. If the actual instance is not `List<String>`, * the ClassCastException will be thrown. * - * @return The actual instance of `List` - * @throws ClassCastException if the instance is not `List` + * @return The actual instance of `List<String>` + * @throws ClassCastException if the instance is not `List<String>` */ public List getListString() throws ClassCastException { return (List)super.getActualInstance(); } /** - * Get the actual instance of `List`. If the actual instance is not `List`, + * Get the actual instance of `List<Integer>`. If the actual instance is not `List<Integer>`, * the ClassCastException will be thrown. * - * @return The actual instance of `List` - * @throws ClassCastException if the instance is not `List` + * @return The actual instance of `List<Integer>` + * @throws ClassCastException if the instance is not `List<Integer>` */ public List getListInteger() throws ClassCastException { return (List)super.getActualInstance(); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FakeOneOfWIthSameErasureGet200Response.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FakeOneOfWIthSameErasureGet200Response.java index 74d8ea235a80..32606ce3b489 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FakeOneOfWIthSameErasureGet200Response.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FakeOneOfWIthSameErasureGet200Response.java @@ -155,7 +155,7 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * List, List + * List<Integer>, List<String> * * It could be an instance of the 'oneOf' schemas. */ @@ -174,9 +174,9 @@ public void setActualInstance(Object instance) { /** * Get the actual instance, which can be the following: - * List, List + * List<Integer>, List<String> * - * @return The actual instance (List, List) + * @return The actual instance (List<Integer>, List<String>) */ @SuppressWarnings("unchecked") @Override @@ -185,23 +185,25 @@ public Object getActualInstance() { } /** - * Get the actual instance of `List`. If the actual instance is not `List`, + * Get the actual instance of `List<String>`. If the actual instance is not `List<String>`, * the ClassCastException will be thrown. * - * @return The actual instance of `List` - * @throws ClassCastException if the instance is not `List` + * @return The actual instance of `List<String>` + * @throws ClassCastException if the instance is not `List<String>` */ + @SuppressWarnings("unchecked") public List getListString() throws ClassCastException { return (List)super.getActualInstance(); } /** - * Get the actual instance of `List`. If the actual instance is not `List`, + * Get the actual instance of `List<Integer>`. If the actual instance is not `List<Integer>`, * the ClassCastException will be thrown. * - * @return The actual instance of `List` - * @throws ClassCastException if the instance is not `List` + * @return The actual instance of `List<Integer>` + * @throws ClassCastException if the instance is not `List<Integer>` */ + @SuppressWarnings("unchecked") public List getListInteger() throws ClassCastException { return (List)super.getActualInstance(); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FakeRefParameterPetIdParameter.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FakeRefParameterPetIdParameter.java index 1ab585a3429b..4b6054a9b7e9 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FakeRefParameterPetIdParameter.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FakeRefParameterPetIdParameter.java @@ -201,6 +201,7 @@ public Object getActualInstance() { * @return The actual instance of `String` * @throws ClassCastException if the instance is not `String` */ + @SuppressWarnings("unchecked") public String getString() throws ClassCastException { return (String)super.getActualInstance(); } @@ -212,6 +213,7 @@ public String getString() throws ClassCastException { * @return The actual instance of `Integer` * @throws ClassCastException if the instance is not `Integer` */ + @SuppressWarnings("unchecked") public Integer getInteger() throws ClassCastException { return (Integer)super.getActualInstance(); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FreeFormObjectTestClassProperties.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FreeFormObjectTestClassProperties.java index 22bad9ae7c64..ec16e5571110 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FreeFormObjectTestClassProperties.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FreeFormObjectTestClassProperties.java @@ -166,7 +166,7 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * Map, String + * Map<String, Object>, String * * It could be an instance of the 'oneOf' schemas. */ @@ -187,9 +187,9 @@ public void setActualInstance(Object instance) { /** * Get the actual instance, which can be the following: - * Map, String + * Map<String, Object>, String * - * @return The actual instance (Map, String) + * @return The actual instance (Map<String, Object>, String) */ @SuppressWarnings("unchecked") @Override @@ -204,17 +204,19 @@ public Object getActualInstance() { * @return The actual instance of `String` * @throws ClassCastException if the instance is not `String` */ + @SuppressWarnings("unchecked") public String getString() throws ClassCastException { return (String)super.getActualInstance(); } /** - * Get the actual instance of `Map`. If the actual instance is not `Map`, + * Get the actual instance of `Map<String, Object>`. If the actual instance is not `Map<String, Object>`, * the ClassCastException will be thrown. * - * @return The actual instance of `Map` - * @throws ClassCastException if the instance is not `Map` + * @return The actual instance of `Map<String, Object>` + * @throws ClassCastException if the instance is not `Map<String, Object>` */ + @SuppressWarnings("unchecked") public Map getMapStringObject() throws ClassCastException { return (Map)super.getActualInstance(); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Fruit.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Fruit.java index 34828ccd70ce..8b1fafbf1d84 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Fruit.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Fruit.java @@ -207,6 +207,7 @@ public Object getActualInstance() { * @return The actual instance of `Apple` * @throws ClassCastException if the instance is not `Apple` */ + @SuppressWarnings("unchecked") public Apple getApple() throws ClassCastException { return (Apple)super.getActualInstance(); } @@ -218,6 +219,7 @@ public Apple getApple() throws ClassCastException { * @return The actual instance of `Banana` * @throws ClassCastException if the instance is not `Banana` */ + @SuppressWarnings("unchecked") public Banana getBanana() throws ClassCastException { return (Banana)super.getActualInstance(); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FruitReq.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FruitReq.java index 5bc90f3da1f4..c4d5b3151313 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FruitReq.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FruitReq.java @@ -212,6 +212,7 @@ public Object getActualInstance() { * @return The actual instance of `AppleReq` * @throws ClassCastException if the instance is not `AppleReq` */ + @SuppressWarnings("unchecked") public AppleReq getAppleReq() throws ClassCastException { return (AppleReq)super.getActualInstance(); } @@ -223,6 +224,7 @@ public AppleReq getAppleReq() throws ClassCastException { * @return The actual instance of `BananaReq` * @throws ClassCastException if the instance is not `BananaReq` */ + @SuppressWarnings("unchecked") public BananaReq getBananaReq() throws ClassCastException { return (BananaReq)super.getActualInstance(); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Mammal.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Mammal.java index 396187a41da7..f64ffc2a6104 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Mammal.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Mammal.java @@ -258,6 +258,7 @@ public Object getActualInstance() { * @return The actual instance of `Whale` * @throws ClassCastException if the instance is not `Whale` */ + @SuppressWarnings("unchecked") public Whale getWhale() throws ClassCastException { return (Whale)super.getActualInstance(); } @@ -269,6 +270,7 @@ public Whale getWhale() throws ClassCastException { * @return The actual instance of `Zebra` * @throws ClassCastException if the instance is not `Zebra` */ + @SuppressWarnings("unchecked") public Zebra getZebra() throws ClassCastException { return (Zebra)super.getActualInstance(); } @@ -280,6 +282,7 @@ public Zebra getZebra() throws ClassCastException { * @return The actual instance of `Pig` * @throws ClassCastException if the instance is not `Pig` */ + @SuppressWarnings("unchecked") public Pig getPig() throws ClassCastException { return (Pig)super.getActualInstance(); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NullableShape.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NullableShape.java index b487fd231052..5c040c352bde 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NullableShape.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NullableShape.java @@ -233,6 +233,7 @@ public Object getActualInstance() { * @return The actual instance of `Triangle` * @throws ClassCastException if the instance is not `Triangle` */ + @SuppressWarnings("unchecked") public Triangle getTriangle() throws ClassCastException { return (Triangle)super.getActualInstance(); } @@ -244,6 +245,7 @@ public Triangle getTriangle() throws ClassCastException { * @return The actual instance of `Quadrilateral` * @throws ClassCastException if the instance is not `Quadrilateral` */ + @SuppressWarnings("unchecked") public Quadrilateral getQuadrilateral() throws ClassCastException { return (Quadrilateral)super.getActualInstance(); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pig.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pig.java index fc27273e8849..01ae18283e7c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pig.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pig.java @@ -228,6 +228,7 @@ public Object getActualInstance() { * @return The actual instance of `BasquePig` * @throws ClassCastException if the instance is not `BasquePig` */ + @SuppressWarnings("unchecked") public BasquePig getBasquePig() throws ClassCastException { return (BasquePig)super.getActualInstance(); } @@ -239,6 +240,7 @@ public BasquePig getBasquePig() throws ClassCastException { * @return The actual instance of `DanishPig` * @throws ClassCastException if the instance is not `DanishPig` */ + @SuppressWarnings("unchecked") public DanishPig getDanishPig() throws ClassCastException { return (DanishPig)super.getActualInstance(); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Quadrilateral.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Quadrilateral.java index 10e8d31ae996..37436a730fb7 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Quadrilateral.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Quadrilateral.java @@ -228,6 +228,7 @@ public Object getActualInstance() { * @return The actual instance of `SimpleQuadrilateral` * @throws ClassCastException if the instance is not `SimpleQuadrilateral` */ + @SuppressWarnings("unchecked") public SimpleQuadrilateral getSimpleQuadrilateral() throws ClassCastException { return (SimpleQuadrilateral)super.getActualInstance(); } @@ -239,6 +240,7 @@ public SimpleQuadrilateral getSimpleQuadrilateral() throws ClassCastException { * @return The actual instance of `ComplexQuadrilateral` * @throws ClassCastException if the instance is not `ComplexQuadrilateral` */ + @SuppressWarnings("unchecked") public ComplexQuadrilateral getComplexQuadrilateral() throws ClassCastException { return (ComplexQuadrilateral)super.getActualInstance(); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Scalar.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Scalar.java index a71d774cb06e..8f63fe3dc19c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Scalar.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Scalar.java @@ -255,6 +255,7 @@ public Object getActualInstance() { * @return The actual instance of `UUID` * @throws ClassCastException if the instance is not `UUID` */ + @SuppressWarnings("unchecked") public UUID getUUID() throws ClassCastException { return (UUID)super.getActualInstance(); } @@ -266,6 +267,7 @@ public UUID getUUID() throws ClassCastException { * @return The actual instance of `String` * @throws ClassCastException if the instance is not `String` */ + @SuppressWarnings("unchecked") public String getString() throws ClassCastException { return (String)super.getActualInstance(); } @@ -277,6 +279,7 @@ public String getString() throws ClassCastException { * @return The actual instance of `BigDecimal` * @throws ClassCastException if the instance is not `BigDecimal` */ + @SuppressWarnings("unchecked") public BigDecimal getBigDecimal() throws ClassCastException { return (BigDecimal)super.getActualInstance(); } @@ -288,6 +291,7 @@ public BigDecimal getBigDecimal() throws ClassCastException { * @return The actual instance of `Boolean` * @throws ClassCastException if the instance is not `Boolean` */ + @SuppressWarnings("unchecked") public Boolean getBoolean() throws ClassCastException { return (Boolean)super.getActualInstance(); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Shape.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Shape.java index 62cc65090d1d..f2b02fd77d82 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Shape.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Shape.java @@ -228,6 +228,7 @@ public Object getActualInstance() { * @return The actual instance of `Triangle` * @throws ClassCastException if the instance is not `Triangle` */ + @SuppressWarnings("unchecked") public Triangle getTriangle() throws ClassCastException { return (Triangle)super.getActualInstance(); } @@ -239,6 +240,7 @@ public Triangle getTriangle() throws ClassCastException { * @return The actual instance of `Quadrilateral` * @throws ClassCastException if the instance is not `Quadrilateral` */ + @SuppressWarnings("unchecked") public Quadrilateral getQuadrilateral() throws ClassCastException { return (Quadrilateral)super.getActualInstance(); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ShapeOrNull.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ShapeOrNull.java index 30a15b50f64c..8dad5efc9225 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ShapeOrNull.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ShapeOrNull.java @@ -233,6 +233,7 @@ public Object getActualInstance() { * @return The actual instance of `Triangle` * @throws ClassCastException if the instance is not `Triangle` */ + @SuppressWarnings("unchecked") public Triangle getTriangle() throws ClassCastException { return (Triangle)super.getActualInstance(); } @@ -244,6 +245,7 @@ public Triangle getTriangle() throws ClassCastException { * @return The actual instance of `Quadrilateral` * @throws ClassCastException if the instance is not `Quadrilateral` */ + @SuppressWarnings("unchecked") public Quadrilateral getQuadrilateral() throws ClassCastException { return (Quadrilateral)super.getActualInstance(); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Triangle.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Triangle.java index 28a1457bf446..c16fcb85af97 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Triangle.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Triangle.java @@ -258,6 +258,7 @@ public Object getActualInstance() { * @return The actual instance of `EquilateralTriangle` * @throws ClassCastException if the instance is not `EquilateralTriangle` */ + @SuppressWarnings("unchecked") public EquilateralTriangle getEquilateralTriangle() throws ClassCastException { return (EquilateralTriangle)super.getActualInstance(); } @@ -269,6 +270,7 @@ public EquilateralTriangle getEquilateralTriangle() throws ClassCastException { * @return The actual instance of `IsoscelesTriangle` * @throws ClassCastException if the instance is not `IsoscelesTriangle` */ + @SuppressWarnings("unchecked") public IsoscelesTriangle getIsoscelesTriangle() throws ClassCastException { return (IsoscelesTriangle)super.getActualInstance(); } @@ -280,6 +282,7 @@ public IsoscelesTriangle getIsoscelesTriangle() throws ClassCastException { * @return The actual instance of `ScaleneTriangle` * @throws ClassCastException if the instance is not `ScaleneTriangle` */ + @SuppressWarnings("unchecked") public ScaleneTriangle getScaleneTriangle() throws ClassCastException { return (ScaleneTriangle)super.getActualInstance(); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Value.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Value.java index 71f8aea6e4d9..910bf20a0d6d 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Value.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Value.java @@ -174,7 +174,7 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * List, Scalar + * List<Scalar>, Scalar * * It could be an instance of the 'oneOf' schemas. */ @@ -198,9 +198,9 @@ public void setActualInstance(Object instance) { /** * Get the actual instance, which can be the following: - * List, Scalar + * List<Scalar>, Scalar * - * @return The actual instance (List, Scalar) + * @return The actual instance (List<Scalar>, Scalar) */ @SuppressWarnings("unchecked") @Override @@ -215,17 +215,19 @@ public Object getActualInstance() { * @return The actual instance of `Scalar` * @throws ClassCastException if the instance is not `Scalar` */ + @SuppressWarnings("unchecked") public Scalar getScalar() throws ClassCastException { return (Scalar)super.getActualInstance(); } /** - * Get the actual instance of `List`. If the actual instance is not `List`, + * Get the actual instance of `List<Scalar>`. If the actual instance is not `List<Scalar>`, * the ClassCastException will be thrown. * - * @return The actual instance of `List` - * @throws ClassCastException if the instance is not `List` + * @return The actual instance of `List<Scalar>` + * @throws ClassCastException if the instance is not `List<Scalar>` */ + @SuppressWarnings("unchecked") public List getListScalar() throws ClassCastException { return (List)super.getActualInstance(); }