diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/additional_properties.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/additional_properties.mustache index bca54f84d575..c448667d74b9 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/additional_properties.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/additional_properties.mustache @@ -3,8 +3,15 @@ * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private {{^hasChildren}}transient {{/hasChildren}}Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java index e2cf0bac4cc4..59ea21cac2b6 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java @@ -2024,6 +2024,41 @@ public void testJdkHttpClientWithAndWithoutParentExtension() { .content().contains("public class AnotherChild {"); } + @Test + public void testAdditionalPropertiesFieldIsTransientForGson() { + final Path output = newTempFolder(); + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName(JAVA_GENERATOR) + // use default `okhttp-gson` + .addAdditionalProperty(CodegenConstants.API_PACKAGE, "xyz.abcdef.api") + .addAdditionalProperty(CodegenConstants.MODEL_PACKAGE, "xyz.abcdef.model") + .addAdditionalProperty(CodegenConstants.INVOKER_PACKAGE, "xyz.abcdef.invoker") + .addAdditionalProperty("disallowAdditionalPropertiesIfNotPresent", "false") + .setInputSpec("src/test/resources/3_0/allOf_extension_parent.yaml") + .setOutputDir(output.toString().replace("\\", "/")); + + DefaultGenerator generator = new DefaultGenerator(); + generator.setGeneratorPropertyDefault(CodegenConstants.MODELS, "true"); + generator.opts(configurator.toClientOptInput()).generate(); + + // gson's reflective adapter refuses a class with two JSON fields of one name; without + // `transient` an allOf child declares additionalProperties itself and inherits it too, + // making it undeserializable ("declares multiple JSON fields named + // 'additionalProperties'"). The child's bag is read and written by its own + // TypeAdapterFactory, so hiding the field from reflection changes nothing else. + assertThat(output.resolve("src/main/java/xyz/abcdef/model/Child.java")) + .content() + .contains("public class Child extends Person {") + .contains("private transient Map additionalProperties;"); + // a parent with children gets no TypeAdapterFactory of its own ({{^hasChildren}} in + // pojo.mustache), so its field stays visible to reflection - the child's transient + // declaration shadows it, and no duplicate JSON field arises + assertThat(output.resolve("src/main/java/xyz/abcdef/model/Person.java")) + .content().contains("private Map additionalProperties;"); + assertThat(output.resolve("src/main/java/xyz/abcdef/model/Person.java")) + .content().doesNotContain("private transient Map additionalProperties;"); + } + @Test public void allOfWithSeveralRefsAndRefAsParentInAllOfNormalizationIsTrue() { final Path output = newTempFolder(); diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/AllOfSimpleModel.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/AllOfSimpleModel.java index 915278259da2..121a382b8ef0 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/AllOfSimpleModel.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/AllOfSimpleModel.java @@ -91,8 +91,15 @@ public void setArrayOfStrings(@javax.annotation.Nonnull List arrayOfStri * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Animal.java index eb5e7b249db1..4322e94521cb 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Animal.java @@ -106,6 +106,13 @@ public void setColor(@javax.annotation.Nullable String color) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ private Map additionalProperties; diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/AnyTypeTest.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/AnyTypeTest.java index 634c6d56d771..bc14540e0e93 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/AnyTypeTest.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/AnyTypeTest.java @@ -148,8 +148,15 @@ public void setRefArrayPrefixItems(@javax.annotation.Nullable List refAr * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/ArrayOfSameRef.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/ArrayOfSameRef.java index 2cf1cc790a34..82c900abe9c4 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/ArrayOfSameRef.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/ArrayOfSameRef.java @@ -156,8 +156,15 @@ public void setArrayFooThree(@javax.annotation.Nullable List arrayFooThree) * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Cat.java index 0300276dbb47..732075b475cb 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Cat.java @@ -83,8 +83,15 @@ public void setDeclawed(@javax.annotation.Nullable Boolean declawed) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Category.java index e550e50d7464..5c279fd9caae 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Category.java @@ -105,8 +105,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/CircularReference1.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/CircularReference1.java index a5896d057fa0..8fde5bf916a6 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/CircularReference1.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/CircularReference1.java @@ -82,8 +82,15 @@ public void setProp1(@javax.annotation.Nullable CircularReference2 prop1) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/CircularReference2.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/CircularReference2.java index 568935f7d488..a036c247a18b 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/CircularReference2.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/CircularReference2.java @@ -82,8 +82,15 @@ public void setProp1(@javax.annotation.Nullable CircularReference3 prop1) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/CircularReference3.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/CircularReference3.java index bf8992608e09..dfc71197d818 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/CircularReference3.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/CircularReference3.java @@ -82,8 +82,15 @@ public void setProp1(@javax.annotation.Nullable CircularReference1 prop1) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Dog.java index 84fda067106f..db2437f5a8f3 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Dog.java @@ -83,8 +83,15 @@ public void setBreed(@javax.annotation.Nullable String breed) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/FakeWebhooksSourcesDeletedPostRequest.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/FakeWebhooksSourcesDeletedPostRequest.java index e3103770d3bf..da1e7876e72c 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/FakeWebhooksSourcesDeletedPostRequest.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/FakeWebhooksSourcesDeletedPostRequest.java @@ -131,8 +131,15 @@ public void setEvent(@javax.annotation.Nonnull FakeWebhooksSourcesDeletedPostReq * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/FakeWebhooksSourcesDeletedPostRequestEvent.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/FakeWebhooksSourcesDeletedPostRequestEvent.java index de5622ae466c..f1b4010a800c 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/FakeWebhooksSourcesDeletedPostRequestEvent.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/FakeWebhooksSourcesDeletedPostRequestEvent.java @@ -81,8 +81,15 @@ public void setEventId(@javax.annotation.Nonnull String eventId) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 8459615500e1..7e4c0079b39c 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -129,8 +129,15 @@ public void setMessage(@javax.annotation.Nullable String message) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Order.java index 07bb953b318f..0212fa719092 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Order.java @@ -256,8 +256,15 @@ public void setComplete(@javax.annotation.Nullable Boolean complete) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Pet.java index d1e6eb1d1b5e..356dcc285659 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Pet.java @@ -280,8 +280,15 @@ public void setStatus(@javax.annotation.Nullable StatusEnum status) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/PetWithTypesObjectNullAndRef.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/PetWithTypesObjectNullAndRef.java index 86dc5f1aca47..322383693e1a 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/PetWithTypesObjectNullAndRef.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/PetWithTypesObjectNullAndRef.java @@ -107,8 +107,15 @@ public void setSecondProperty(@javax.annotation.Nullable Object secondProperty) * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/SelfReferenceAdditionalProperties.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/SelfReferenceAdditionalProperties.java index 8055f50a98f5..174371ea9993 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/SelfReferenceAdditionalProperties.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/SelfReferenceAdditionalProperties.java @@ -81,8 +81,15 @@ public void setDummy(@javax.annotation.Nullable String dummy) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/SimpleModelWithArrayProperty.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/SimpleModelWithArrayProperty.java index 8410c482e88f..5a7d8e0e8c5c 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/SimpleModelWithArrayProperty.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/SimpleModelWithArrayProperty.java @@ -91,8 +91,15 @@ public void setArrayOfStrings(@javax.annotation.Nonnull List arrayOfStri * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Tag.java index 460c5fecbb28..8e2814a4fbae 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Tag.java @@ -105,8 +105,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/User.java index 4b3a5a45e5e1..9de227257ffc 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/User.java @@ -249,8 +249,15 @@ public void setUserStatus(@javax.annotation.Nullable Integer userStatus) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Category.java index e550e50d7464..5c279fd9caae 100644 --- a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Category.java @@ -105,8 +105,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 8459615500e1..7e4c0079b39c 100644 --- a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -129,8 +129,15 @@ public void setMessage(@javax.annotation.Nullable String message) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Order.java index 07bb953b318f..0212fa719092 100644 --- a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Order.java @@ -256,8 +256,15 @@ public void setComplete(@javax.annotation.Nullable Boolean complete) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Pet.java index d1e6eb1d1b5e..356dcc285659 100644 --- a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Pet.java @@ -280,8 +280,15 @@ public void setStatus(@javax.annotation.Nullable StatusEnum status) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Tag.java index 460c5fecbb28..8e2814a4fbae 100644 --- a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/Tag.java @@ -105,8 +105,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/User.java index 4b3a5a45e5e1..9de227257ffc 100644 --- a/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson-awsv4signature/src/main/java/org/openapitools/client/model/User.java @@ -249,8 +249,15 @@ public void setUserStatus(@javax.annotation.Nullable Integer userStatus) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index c10b67150980..250738fee1cf 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -81,8 +81,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index a73a42bd9b10..4ede6db8dc2f 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -82,8 +82,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 33fbdf5051b4..c34b64f6ffe0 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -81,8 +81,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index 34ebbf32fcbb..562d74265176 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -81,8 +81,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index cebd9acecdbd..bdadf56d5926 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -82,8 +82,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index a81671bb4e9a..aa346999b42b 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -82,8 +82,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 42682dd2f2fb..bec379ab3146 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -81,8 +81,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Category.java index e550e50d7464..5c279fd9caae 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Category.java @@ -105,8 +105,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 8459615500e1..7e4c0079b39c 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -129,8 +129,15 @@ public void setMessage(@javax.annotation.Nullable String message) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Order.java index 07bb953b318f..0212fa719092 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Order.java @@ -256,8 +256,15 @@ public void setComplete(@javax.annotation.Nullable Boolean complete) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Pet.java index d1e6eb1d1b5e..356dcc285659 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Pet.java @@ -280,8 +280,15 @@ public void setStatus(@javax.annotation.Nullable StatusEnum status) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Tag.java index 460c5fecbb28..8e2814a4fbae 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Tag.java @@ -105,8 +105,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/User.java index 4b3a5a45e5e1..9de227257ffc 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/User.java @@ -249,8 +249,15 @@ public void setUserStatus(@javax.annotation.Nullable Integer userStatus) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Category.java index e550e50d7464..5c279fd9caae 100644 --- a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Category.java @@ -105,8 +105,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 8459615500e1..7e4c0079b39c 100644 --- a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -129,8 +129,15 @@ public void setMessage(@javax.annotation.Nullable String message) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Order.java index 07bb953b318f..0212fa719092 100644 --- a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Order.java @@ -256,8 +256,15 @@ public void setComplete(@javax.annotation.Nullable Boolean complete) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Pet.java index d1e6eb1d1b5e..356dcc285659 100644 --- a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Pet.java @@ -280,8 +280,15 @@ public void setStatus(@javax.annotation.Nullable StatusEnum status) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/PetWithRequiredNullableCases1.java b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/PetWithRequiredNullableCases1.java index 131535a4032d..ce8c2a243bd1 100644 --- a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/PetWithRequiredNullableCases1.java +++ b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/PetWithRequiredNullableCases1.java @@ -281,8 +281,15 @@ public void setStatus(@javax.annotation.Nullable StatusEnum status) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/PetWithRequiredNullableCases2.java b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/PetWithRequiredNullableCases2.java index 34aaeb40d214..7f8189d60e82 100644 --- a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/PetWithRequiredNullableCases2.java +++ b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/PetWithRequiredNullableCases2.java @@ -280,8 +280,15 @@ public void setStatus(@javax.annotation.Nullable StatusEnum status) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Tag.java index 460c5fecbb28..8e2814a4fbae 100644 --- a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/Tag.java @@ -105,8 +105,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/User.java index 4b3a5a45e5e1..9de227257ffc 100644 --- a/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson-nullable-required/src/main/java/org/openapitools/client/model/User.java @@ -249,8 +249,15 @@ public void setUserStatus(@javax.annotation.Nullable Integer userStatus) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index 4a671e808e15..99173a208403 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -83,8 +83,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 87ba0cb66570..6480c87fa525 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -84,8 +84,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 96a37361ba11..21d8d277839a 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -83,8 +83,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index 6ec1d638a28b..d17724bf4609 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -83,8 +83,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index 744f7095a9af..b666480d4b00 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -84,8 +84,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index c5748606be63..d1296070451b 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -84,8 +84,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index be6e9030997c..1099a8ee736f 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -83,8 +83,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Category.java index 6866f49ae715..c37725e82fb3 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Category.java @@ -110,8 +110,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 0163287f1edd..72ca1d8ef9e4 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -135,8 +135,15 @@ public void setMessage(@javax.annotation.Nullable String message) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Order.java index 28736d75d5cb..480b2a95c6ba 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Order.java @@ -265,8 +265,15 @@ public void setComplete(@javax.annotation.Nullable Boolean complete) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Pet.java index acc68e1aad6c..6c75cee4bbed 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Pet.java @@ -289,8 +289,15 @@ public void setStatus(@javax.annotation.Nullable StatusEnum status) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Tag.java index 64675ff89080..2aa570c44fec 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Tag.java @@ -110,8 +110,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/User.java index b456431877aa..71b25aa8f19f 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/User.java @@ -260,8 +260,15 @@ public void setUserStatus(@javax.annotation.Nullable Integer userStatus) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Category.java index a7780ba6026b..9042d78e9c01 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Category.java @@ -109,8 +109,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 8488bb9fd160..79aabe3b22c6 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -134,8 +134,15 @@ public void setMessage(@javax.annotation.Nullable String message) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Order.java index 0daac011eecc..ef9f3bdc0b2a 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Order.java @@ -264,8 +264,15 @@ public void setComplete(@javax.annotation.Nullable Boolean complete) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Pet.java index b1451730d628..4f34bae7b82d 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Pet.java @@ -288,8 +288,15 @@ public void setStatus(@javax.annotation.Nullable StatusEnum status) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Tag.java index dd27432ba026..c6f0e26c6131 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/Tag.java @@ -109,8 +109,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/User.java index c226e52999aa..1344b4f2f5df 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson-swagger2/src/main/java/org/openapitools/client/model/User.java @@ -259,8 +259,15 @@ public void setUserStatus(@javax.annotation.Nullable Integer userStatus) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 38220ff74447..c0f57ec6bba9 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 @@ -284,8 +284,15 @@ public void setMapWithUndeclaredPropertiesString(@javax.annotation.Nullable Map< * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfModelArrayAnyOf.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfModelArrayAnyOf.java index f1bb01f291b9..f0b878399bf7 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfModelArrayAnyOf.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfModelArrayAnyOf.java @@ -155,8 +155,15 @@ public void setAttributes(@javax.annotation.Nullable AllOfModelArrayAnyOfAllOfAt * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfModelArrayAnyOfAllOfAttributes.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfModelArrayAnyOfAllOfAttributes.java index 4cabc4d8f5cb..26b3d2d66e49 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfModelArrayAnyOfAllOfAttributes.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfModelArrayAnyOfAllOfAttributes.java @@ -82,8 +82,15 @@ public void setC(@javax.annotation.Nullable AllOfModelArrayAnyOfAllOfAttributesC * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfModelArrayAnyOfAllOfLinkListColumn1.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfModelArrayAnyOfAllOfLinkListColumn1.java index 73d2c95e6ec7..8153defffed0 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfModelArrayAnyOfAllOfLinkListColumn1.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfModelArrayAnyOfAllOfLinkListColumn1.java @@ -92,8 +92,15 @@ public void setValue(@javax.annotation.Nonnull List additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfRefToDouble.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfRefToDouble.java index 990751832ed1..c320f25475f6 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfRefToDouble.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfRefToDouble.java @@ -81,8 +81,15 @@ public void setHeight(@javax.annotation.Nullable Double height) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfRefToFloat.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfRefToFloat.java index 290226984412..d17614725919 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfRefToFloat.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfRefToFloat.java @@ -81,8 +81,15 @@ public void setWeight(@javax.annotation.Nullable Float weight) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfRefToLong.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfRefToLong.java index bdf1189c9d80..bf82ba1654ec 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfRefToLong.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AllOfRefToLong.java @@ -81,8 +81,15 @@ public void setId(@javax.annotation.Nullable Long id) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 efabbbf15ea0..9c353259beaf 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 @@ -106,6 +106,13 @@ public void setColor(@javax.annotation.Nullable String color) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ private Map additionalProperties; diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Apple.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Apple.java index 99eb8bab3e41..1217c652f1c6 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Apple.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Apple.java @@ -105,8 +105,15 @@ public void setOrigin(@javax.annotation.Nullable String origin) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayDefault.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayDefault.java index 904ad3511139..a1391964d879 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayDefault.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayDefault.java @@ -123,8 +123,15 @@ public void setWithoutDefault(@javax.annotation.Nullable List withoutDef * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 6c1320db6cc5..25df12f31482 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 @@ -92,8 +92,15 @@ public void setArrayArrayNumber(@javax.annotation.Nullable List * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOf.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOf.java index 215f5780891a..852ad5b7c23a 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOf.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOf.java @@ -140,8 +140,15 @@ public void setArrayAllofDogProperty(@javax.annotation.Nullable List additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInner.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInner.java index 5b8e6c156814..9e6ced80f2ea 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInner.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInner.java @@ -105,8 +105,15 @@ public void setColor(@javax.annotation.Nullable String color) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 ba4cd96b41b4..c2b914aed5ab 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 @@ -92,8 +92,15 @@ public void setArrayNumber(@javax.annotation.Nullable List arrayNumb * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 c29ee8aeb09b..1e6e82486cf5 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 @@ -156,8 +156,15 @@ public void setArrayArrayOfModel(@javax.annotation.Nullable List additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Banana.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Banana.java index 96c7850dc9fa..5371c897fb98 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Banana.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Banana.java @@ -82,8 +82,15 @@ public void setLengthCm(@javax.annotation.Nullable BigDecimal lengthCm) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BasquePig.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BasquePig.java index ee270bfa2b8d..4ababe2205bf 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BasquePig.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BasquePig.java @@ -81,8 +81,15 @@ public void setClassName(@javax.annotation.Nonnull String className) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 4565940418cf..11f10a41060e 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 @@ -201,8 +201,15 @@ public void setATTNAME(@javax.annotation.Nullable String ATT_NAME) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 e393b16c03fd..36f98becb2f5 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 @@ -84,8 +84,15 @@ public void setDeclawed(@javax.annotation.Nullable Boolean declawed) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 e47d6e1dd690..f37741bee72c 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 @@ -105,8 +105,15 @@ public void setName(@javax.annotation.Nonnull String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 ab01da3967ee..4ee32996e68b 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 @@ -81,8 +81,15 @@ public void setPropertyClass(@javax.annotation.Nullable String propertyClass) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 ae82c951233f..6af93ab781dd 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 @@ -81,8 +81,15 @@ public void setClient(@javax.annotation.Nullable String client) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java index d2c03e88a5b1..134ce1bf3b94 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java @@ -105,8 +105,15 @@ public void setQuadrilateralType(@javax.annotation.Nonnull String quadrilateralT * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DanishPig.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DanishPig.java index f7ad2cec303d..c8da1fba30c0 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DanishPig.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DanishPig.java @@ -81,8 +81,15 @@ public void setClassName(@javax.annotation.Nonnull String className) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DeprecatedObject.java index f58daf4a3af6..d540b3009035 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DeprecatedObject.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DeprecatedObject.java @@ -83,8 +83,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 d0a09fb3fbea..f90c702f41e9 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 @@ -83,8 +83,15 @@ public void setBreed(@javax.annotation.Nullable String breed) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Drawing.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Drawing.java index c238c548f594..d619881478fe 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Drawing.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Drawing.java @@ -168,8 +168,15 @@ public void setShapes(@javax.annotation.Nullable List shapes) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 7711c391b4d1..aa749278cd77 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 @@ -219,8 +219,15 @@ public void setArrayEnum(@javax.annotation.Nullable List arrayEnu * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumStringDiscriminator.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumStringDiscriminator.java index 5a08fd11069c..a7501778b6d7 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumStringDiscriminator.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumStringDiscriminator.java @@ -134,8 +134,15 @@ public void setEnumStrType(@javax.annotation.Nonnull EnumStrTypeEnum enumStrType * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 d1ce406ef6f3..4c916ee2f428 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 @@ -547,8 +547,15 @@ public void setOuterEnumIntegerDefaultValue(@javax.annotation.Nullable OuterEnum * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EquilateralTriangle.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EquilateralTriangle.java index 402ba2e2337f..f194dd9a6c41 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EquilateralTriangle.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EquilateralTriangle.java @@ -105,8 +105,15 @@ public void setTriangleType(@javax.annotation.Nonnull String triangleType) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 4cd28fa6b419..1bca6e0a7a71 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -116,8 +116,15 @@ public void setFiles(@javax.annotation.Nullable List files) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Foo.java index e05595bfd10c..61f858df7660 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Foo.java @@ -81,8 +81,15 @@ public void setBar(@javax.annotation.Nullable String bar) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java index f99707f65896..9fda9d7385e1 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java @@ -82,8 +82,15 @@ public void setString(@javax.annotation.Nullable Foo string) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 6c0f4ca14f16..85a21da0df5c 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 @@ -480,8 +480,15 @@ public void setPatternWithDigitsAndDelimiter(@javax.annotation.Nullable String p * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FreeFormObjectTestClass.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FreeFormObjectTestClass.java index cf330a162e6b..b3c1f9496293 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FreeFormObjectTestClass.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FreeFormObjectTestClass.java @@ -106,8 +106,15 @@ public void setProperties(@javax.annotation.Nullable FreeFormObjectTestClassProp * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/GrandparentAnimal.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/GrandparentAnimal.java index 3a4e2602ea8c..13478fde6fbf 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/GrandparentAnimal.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/GrandparentAnimal.java @@ -82,6 +82,13 @@ public void setPetType(@javax.annotation.Nonnull String petType) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ private Map additionalProperties; 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 d708eb1fbe8b..8f1ade59ad23 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 @@ -98,8 +98,15 @@ public String getFoo() { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HealthCheckResult.java index c630f5be8890..5c8df8410ab0 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HealthCheckResult.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -82,8 +82,15 @@ public void setNullableMessage(@javax.annotation.Nullable String nullableMessage * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 a3254fca77f8..2491b27971c3 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 @@ -239,8 +239,15 @@ public void setIndirectMap(@javax.annotation.Nullable Map indir * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 c562240b9e04..962f082d0556 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 @@ -142,8 +142,15 @@ public void setMap(@javax.annotation.Nullable Map map) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 897b5dd77593..756ff393ea27 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 @@ -105,8 +105,15 @@ public void setPropertyClass(@javax.annotation.Nullable String propertyClass) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 2ba923858c27..d9592e8e01b1 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 @@ -129,8 +129,15 @@ public void setMessage(@javax.annotation.Nullable String message) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelFile.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelFile.java index fd267cc5832f..feae87990282 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelFile.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelFile.java @@ -81,8 +81,15 @@ public void setSourceURI(@javax.annotation.Nullable String sourceURI) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelList.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelList.java index 706fc9c89941..f810e2765672 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelList.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelList.java @@ -81,8 +81,15 @@ public void set123list(@javax.annotation.Nullable String _123list) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 fc766fc773f3..8fd33d033e00 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 @@ -81,8 +81,15 @@ public void setReturn(@javax.annotation.Nullable Integer _return) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelWithOneOfAnyOfProperties.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelWithOneOfAnyOfProperties.java index 693e75bd1033..e11107bbc40d 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelWithOneOfAnyOfProperties.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelWithOneOfAnyOfProperties.java @@ -107,8 +107,15 @@ public void setAnyofProp(@javax.annotation.Nullable ArrayAnyOf anyofProp) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 f8fab499afee..c4db27b53211 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 @@ -146,8 +146,15 @@ public Integer get123number() { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NestedArrayWithDefaultValues.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NestedArrayWithDefaultValues.java index a2eb060cb495..894b4ffcf797 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NestedArrayWithDefaultValues.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NestedArrayWithDefaultValues.java @@ -91,8 +91,15 @@ public void setNestedArray(@javax.annotation.Nullable List> nestedA * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NewPet.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NewPet.java index 13cb1ab43a97..922726e3e210 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NewPet.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NewPet.java @@ -347,8 +347,15 @@ public void setStatus(@javax.annotation.Nullable StatusEnum status) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NewPetCategoryInlineAllof.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NewPetCategoryInlineAllof.java index db956d40b98b..6a4b559af9c4 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NewPetCategoryInlineAllof.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NewPetCategoryInlineAllof.java @@ -130,8 +130,15 @@ public void setCategoryTag(@javax.annotation.Nullable NewPetCategoryInlineAllofA * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NewPetCategoryInlineAllofAllOfCategoryTag.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NewPetCategoryInlineAllofAllOfCategoryTag.java index 5cba8caee92e..07314e83538c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NewPetCategoryInlineAllofAllOfCategoryTag.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NewPetCategoryInlineAllofAllOfCategoryTag.java @@ -105,8 +105,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NullableClass.java index 8ce75d46a2b3..322dd6c1713d 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NullableClass.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NullableClass.java @@ -401,8 +401,15 @@ public void setObjectItemsNullable(@javax.annotation.Nullable Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NullableFieldsValue.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NullableFieldsValue.java index ac04332beab1..9c8027a4e77c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NullableFieldsValue.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NullableFieldsValue.java @@ -105,8 +105,15 @@ public void setAfter(@javax.annotation.Nullable String after) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 7634cbac976e..ab32b883e2b2 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 @@ -82,8 +82,15 @@ public void setJustNumber(@javax.annotation.Nullable BigDecimal justNumber) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java index baf7c0cb9b1a..dcf58987b1a5 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -180,8 +180,15 @@ public void setBars(@javax.annotation.Nullable List bars) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 2f43c3162315..33ee4ce80a22 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 @@ -256,8 +256,15 @@ public void setComplete(@javax.annotation.Nullable Boolean complete) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 adc22d797f1c..51af65c352d4 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 @@ -130,8 +130,15 @@ public void setMyBoolean(@javax.annotation.Nullable Boolean myBoolean) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ParentPet.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ParentPet.java index 281f4083faac..281c87620d8b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ParentPet.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ParentPet.java @@ -59,8 +59,15 @@ public ParentPet() { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 c4c6e0308e47..54e25bd7aed8 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 @@ -275,8 +275,15 @@ public void setStatus(@javax.annotation.Nullable StatusEnum status) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetComposition.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetComposition.java index 4bb0bee26298..e8b9edc9d432 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetComposition.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetComposition.java @@ -275,8 +275,15 @@ public void setStatus(@javax.annotation.Nullable StatusEnum status) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetRef.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetRef.java index f0f3ca7864f2..5a98495e2db3 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetRef.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetRef.java @@ -275,8 +275,15 @@ public void setStatus(@javax.annotation.Nullable StatusEnum status) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetUsingAllOf.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetUsingAllOf.java index 55db581ae0c2..354998f86ea5 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetUsingAllOf.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetUsingAllOf.java @@ -275,8 +275,15 @@ public void setStatus(@javax.annotation.Nullable StatusEnum status) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetWithRequiredTags.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetWithRequiredTags.java index 87b42de274bc..5d5e0f9ac95c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetWithRequiredTags.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetWithRequiredTags.java @@ -275,8 +275,15 @@ public void setStatus(@javax.annotation.Nullable StatusEnum status) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PropertyNameCollision.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PropertyNameCollision.java index 58025299dffc..207771e8fc57 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PropertyNameCollision.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PropertyNameCollision.java @@ -129,8 +129,15 @@ public void setTypeWithUnderscore(@javax.annotation.Nullable String typeWithUnde * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java index 2b70e7229f13..f9e3f732a182 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java @@ -81,8 +81,15 @@ public void setQuadrilateralType(@javax.annotation.Nonnull String quadrilateralT * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 3f48f2485a10..86d810cdd2a0 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 @@ -104,8 +104,15 @@ public void setBaz(@javax.annotation.Nullable String baz) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/RequiredNullableBody.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/RequiredNullableBody.java index d8894a3e8e25..66c294f4c50f 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/RequiredNullableBody.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/RequiredNullableBody.java @@ -499,8 +499,15 @@ public void setCustomEnum(@javax.annotation.Nullable CustomEnumEnum customEnum) * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ScaleneTriangle.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ScaleneTriangle.java index 31f4cf507507..e6e7a05583a1 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ScaleneTriangle.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ScaleneTriangle.java @@ -105,8 +105,15 @@ public void setTriangleType(@javax.annotation.Nonnull String triangleType) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ShapeInterface.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ShapeInterface.java index 2c78d7a8f8b0..b4d64001a5f7 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ShapeInterface.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ShapeInterface.java @@ -81,8 +81,15 @@ public void setShapeType(@javax.annotation.Nonnull String shapeType) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java index eb3d55daa895..96408cc6a6e5 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java @@ -105,8 +105,15 @@ public void setQuadrilateralType(@javax.annotation.Nonnull String quadrilateralT * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 5e38c84a6132..b6a871588870 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 @@ -105,8 +105,15 @@ public void setSpecialModelName(@javax.annotation.Nullable String specialModelNa * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 fdc02279d383..8a351a5d2c12 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 @@ -105,8 +105,15 @@ public void setName(@javax.annotation.Nullable String name) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java index ab2bf7e62483..f60d8382831d 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java @@ -81,8 +81,15 @@ public void setSomeProperty(@javax.annotation.Nullable String someProperty) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TriangleInterface.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TriangleInterface.java index c4a614eec44f..f2d2943be5ba 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TriangleInterface.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TriangleInterface.java @@ -81,8 +81,15 @@ public void setTriangleType(@javax.annotation.Nonnull String triangleType) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. 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 336da869bbbc..1e46aff7d03b 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 @@ -346,8 +346,15 @@ public void setAnyTypePropNullable(@javax.annotation.Nullable Object anyTypeProp * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Variable.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Variable.java index 234f23cf6f7e..35daeecdb09c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Variable.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Variable.java @@ -106,8 +106,15 @@ public void setValue(@javax.annotation.Nonnull Value value) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Whale.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Whale.java index 6541a14f1f56..f24b491dbee9 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Whale.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Whale.java @@ -129,8 +129,15 @@ public void setClassName(@javax.annotation.Nonnull String className) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value. diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Zebra.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Zebra.java index 908b216dc8d8..bb38d3c4b7d0 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Zebra.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Zebra.java @@ -159,8 +159,15 @@ public void setClassName(@javax.annotation.Nonnull String className) { * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with * the 'additionalProperties' keyword in the OAS document. + * + * Transient (on models without children): the bag is read and written by this model's + * TypeAdapterFactory, so gson's reflection does not need to see it. Gson collects the + * declared fields of every class in the hierarchy and rejects two bound to one JSON + * name, which is what an allOf child - declaring the field itself and inheriting it - + * used to hit. A parent with children has no factory of its own, so it keeps the field + * bound for reflection; the child excludes only its own copy, leaving exactly one. */ - private Map additionalProperties; + private transient Map additionalProperties; /** * Set the additional (undeclared) property with the specified name and value.