diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index e8f7eb86e02a..3968b9531d6c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -6331,8 +6331,12 @@ protected void addVars(IJsonSchemaValidationProperties m, List cp = fromProperty(key, prop, mandatory.contains(key)); } - if (cm != null && cm.allVars == vars && cp.isOverridden == null) { // processing allVars and it's a parent property - cp.isOverridden = true; + if (cm != null && cm.allVars == vars) { + // Processing allVars: a property is overridden when it comes from the parent rather than + // being declared by this model. fromProperty caches CodegenProperty instances, so the flag + // must be assigned rather than only filled in when unset - a cached instance may already + // carry a value from whichever model happened to be processed first. + cp.isOverridden = !varsMap.containsKey(key); } vars.add(cp); 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 5d5b31c25b51..6787501daace 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 @@ -2362,6 +2362,23 @@ public void testIsOverriddenProperty() { Assertions.assertEquals(cp1.isOverridden, false); } + @Test + public void testOverrideSetterWhenChildIsDeclaredBeforeParent() { + final Path output = newTempFolder(); + OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/allOf_composition_discriminator_child_first.yaml", null, null) + .getOpenAPI(); + + JavaClientCodegen codegen = new JavaClientCodegen(); + codegen.setOutputDir(output.toString()); + codegen.setLibrary(JavaClientCodegen.APACHE); + + new DefaultGenerator().opts(new ClientOptInput().openAPI(openAPI).config(codegen)).generate(); + + assertThat(output.resolve("src/main/java/org/openapitools/client/model/Cat.java")).content() + .contains(" @Override\n public Cat petType(@javax.annotation.Nonnull String petType) {"); + } + @Test public void testForJavaApacheHttpClientOverrideSetter() { final Path output = newTempFolder(); diff --git a/modules/openapi-generator/src/test/resources/3_0/allOf_composition_discriminator_child_first.yaml b/modules/openapi-generator/src/test/resources/3_0/allOf_composition_discriminator_child_first.yaml new file mode 100644 index 000000000000..e16dadf2ce99 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/allOf_composition_discriminator_child_first.yaml @@ -0,0 +1,52 @@ +openapi: 3.0.2 +info: + title: OAI Specification example for Polymorphism + version: 1.0.0 +paths: + /pet: + get: + responses: + '200': + description: desc + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' +components: + schemas: + MyPets: + oneOf: + - $ref: '#/components/schemas/Cat' + - $ref: '#/components/schemas/Dog' + discriminator: + propertyName: petType + Pet: + type: object + required: + - petType + properties: + petType: + type: string + discriminator: + propertyName: petType + Cat: + allOf: + - $ref: '#/components/schemas/Pet' + - type: object + properties: + name: + type: string + characteristics: + $ref: '#/components/schemas/Characteristics' + Dog: + allOf: + - $ref: '#/components/schemas/Pet' + - type: object + properties: + bark: + type: string + Characteristics: + type: object + properties: + canHunt: + type: boolean diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/BarRef.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/BarRef.java index 73716fa7fab1..283773e831fc 100644 --- a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/BarRef.java +++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/BarRef.java @@ -79,6 +79,18 @@ public BarRef atType(@jakarta.annotation.Nonnull String atType) { return this; } + @Override + public BarRef name(@jakarta.annotation.Nullable String name) { + this.setName(name); + return this; + } + + @Override + public BarRef atReferredType(@jakarta.annotation.Nullable String atReferredType) { + this.setAtReferredType(atReferredType); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/FooRef.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/FooRef.java index debcc80e3a67..89bc34be9ee1 100644 --- a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/FooRef.java +++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/FooRef.java @@ -109,6 +109,18 @@ public FooRef atType(@jakarta.annotation.Nonnull String atType) { return this; } + @Override + public FooRef name(@jakarta.annotation.Nullable String name) { + this.setName(name); + return this; + } + + @Override + public FooRef atReferredType(@jakarta.annotation.Nullable String atReferredType) { + this.setAtReferredType(atReferredType); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/PizzaSpeziale.java b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/PizzaSpeziale.java index 48b6af59deb8..0580e0c378fb 100644 --- a/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/PizzaSpeziale.java +++ b/samples/client/others/java/restclient-sealedInterface/src/main/java/org/openapitools/client/model/PizzaSpeziale.java @@ -110,6 +110,12 @@ public PizzaSpeziale atType(@jakarta.annotation.Nonnull String atType) { return this; } + @Override + public PizzaSpeziale pizzaSize(@jakarta.annotation.Nullable BigDecimal pizzaSize) { + this.setPizzaSize(pizzaSize); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/Bar.java b/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/Bar.java index 4a71c4cf8efc..7e600dadd5c4 100644 --- a/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/Bar.java +++ b/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/Bar.java @@ -166,6 +166,30 @@ public void setFoo(@javax.annotation.Nullable FooRefOrValue foo) { } + @Override + public Bar href(@javax.annotation.Nullable String href) { + this.setHref(href); + return this; + } + + @Override + public Bar atSchemaLocation(@javax.annotation.Nullable String atSchemaLocation) { + this.setAtSchemaLocation(atSchemaLocation); + return this; + } + + @Override + public Bar atBaseType(@javax.annotation.Nullable String atBaseType) { + this.setAtBaseType(atBaseType); + return this; + } + + @Override + public Bar atType(@javax.annotation.Nonnull String atType) { + this.setAtType(atType); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/BarCreate.java b/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/BarCreate.java index bff05d41372f..60b4ee846b09 100644 --- a/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/BarCreate.java +++ b/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/BarCreate.java @@ -137,6 +137,36 @@ public void setFoo(@javax.annotation.Nullable FooRefOrValue foo) { } + @Override + public BarCreate href(@javax.annotation.Nullable String href) { + this.setHref(href); + return this; + } + + @Override + public BarCreate id(@javax.annotation.Nullable String id) { + this.setId(id); + return this; + } + + @Override + public BarCreate atSchemaLocation(@javax.annotation.Nullable String atSchemaLocation) { + this.setAtSchemaLocation(atSchemaLocation); + return this; + } + + @Override + public BarCreate atBaseType(@javax.annotation.Nullable String atBaseType) { + this.setAtBaseType(atBaseType); + return this; + } + + @Override + public BarCreate atType(@javax.annotation.Nonnull String atType) { + this.setAtType(atType); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/BarRef.java b/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/BarRef.java index c1d48c294127..36d8f477bf77 100644 --- a/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/BarRef.java +++ b/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/BarRef.java @@ -45,6 +45,48 @@ public BarRef() { } + @Override + public BarRef href(@javax.annotation.Nullable String href) { + this.setHref(href); + return this; + } + + @Override + public BarRef id(@javax.annotation.Nullable String id) { + this.setId(id); + return this; + } + + @Override + public BarRef atSchemaLocation(@javax.annotation.Nullable String atSchemaLocation) { + this.setAtSchemaLocation(atSchemaLocation); + return this; + } + + @Override + public BarRef atBaseType(@javax.annotation.Nullable String atBaseType) { + this.setAtBaseType(atBaseType); + return this; + } + + @Override + public BarRef atType(@javax.annotation.Nonnull String atType) { + this.setAtType(atType); + return this; + } + + @Override + public BarRef name(@javax.annotation.Nullable String name) { + this.setName(name); + return this; + } + + @Override + public BarRef atReferredType(@javax.annotation.Nullable String atReferredType) { + this.setAtReferredType(atReferredType); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/Foo.java index e6febafe2053..08e8c331eb81 100644 --- a/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/Foo.java @@ -105,6 +105,36 @@ public void setFooPropB(@javax.annotation.Nullable String fooPropB) { } + @Override + public Foo href(@javax.annotation.Nullable String href) { + this.setHref(href); + return this; + } + + @Override + public Foo id(@javax.annotation.Nullable String id) { + this.setId(id); + return this; + } + + @Override + public Foo atSchemaLocation(@javax.annotation.Nullable String atSchemaLocation) { + this.setAtSchemaLocation(atSchemaLocation); + return this; + } + + @Override + public Foo atBaseType(@javax.annotation.Nullable String atBaseType) { + this.setAtBaseType(atBaseType); + return this; + } + + @Override + public Foo atType(@javax.annotation.Nonnull String atType) { + this.setAtType(atType); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/FooRef.java b/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/FooRef.java index 81c46187ef52..07eb02aa45e2 100644 --- a/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/FooRef.java +++ b/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/FooRef.java @@ -75,6 +75,48 @@ public void setFoorefPropA(@javax.annotation.Nullable String foorefPropA) { } + @Override + public FooRef href(@javax.annotation.Nullable String href) { + this.setHref(href); + return this; + } + + @Override + public FooRef id(@javax.annotation.Nullable String id) { + this.setId(id); + return this; + } + + @Override + public FooRef atSchemaLocation(@javax.annotation.Nullable String atSchemaLocation) { + this.setAtSchemaLocation(atSchemaLocation); + return this; + } + + @Override + public FooRef atBaseType(@javax.annotation.Nullable String atBaseType) { + this.setAtBaseType(atBaseType); + return this; + } + + @Override + public FooRef atType(@javax.annotation.Nonnull String atType) { + this.setAtType(atType); + return this; + } + + @Override + public FooRef name(@javax.annotation.Nullable String name) { + this.setName(name); + return this; + } + + @Override + public FooRef atReferredType(@javax.annotation.Nullable String atReferredType) { + this.setAtReferredType(atReferredType); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/Pasta.java b/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/Pasta.java index a3a22c0865a4..dc0d11d2b76e 100644 --- a/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/Pasta.java +++ b/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/Pasta.java @@ -75,6 +75,36 @@ public void setVendor(@javax.annotation.Nullable String vendor) { } + @Override + public Pasta href(@javax.annotation.Nullable String href) { + this.setHref(href); + return this; + } + + @Override + public Pasta id(@javax.annotation.Nullable String id) { + this.setId(id); + return this; + } + + @Override + public Pasta atSchemaLocation(@javax.annotation.Nullable String atSchemaLocation) { + this.setAtSchemaLocation(atSchemaLocation); + return this; + } + + @Override + public Pasta atBaseType(@javax.annotation.Nullable String atBaseType) { + this.setAtBaseType(atBaseType); + return this; + } + + @Override + public Pasta atType(@javax.annotation.Nonnull String atType) { + this.setAtType(atType); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/Pizza.java b/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/Pizza.java index 8a85f3a6310b..0342866bd65c 100644 --- a/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/Pizza.java +++ b/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/Pizza.java @@ -79,6 +79,36 @@ public void setPizzaSize(@javax.annotation.Nullable BigDecimal pizzaSize) { } + @Override + public Pizza href(@javax.annotation.Nullable String href) { + this.setHref(href); + return this; + } + + @Override + public Pizza id(@javax.annotation.Nullable String id) { + this.setId(id); + return this; + } + + @Override + public Pizza atSchemaLocation(@javax.annotation.Nullable String atSchemaLocation) { + this.setAtSchemaLocation(atSchemaLocation); + return this; + } + + @Override + public Pizza atBaseType(@javax.annotation.Nullable String atBaseType) { + this.setAtBaseType(atBaseType); + return this; + } + + @Override + public Pizza atType(@javax.annotation.Nonnull String atType) { + this.setAtType(atType); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/PizzaSpeziale.java b/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/PizzaSpeziale.java index 225615586adb..3ded27b28d3a 100644 --- a/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/PizzaSpeziale.java +++ b/samples/client/others/java/webclient-sealedInterface/src/main/java/org/openapitools/client/model/PizzaSpeziale.java @@ -76,6 +76,42 @@ public void setToppings(@javax.annotation.Nullable String toppings) { } + @Override + public PizzaSpeziale href(@javax.annotation.Nullable String href) { + this.setHref(href); + return this; + } + + @Override + public PizzaSpeziale id(@javax.annotation.Nullable String id) { + this.setId(id); + return this; + } + + @Override + public PizzaSpeziale atSchemaLocation(@javax.annotation.Nullable String atSchemaLocation) { + this.setAtSchemaLocation(atSchemaLocation); + return this; + } + + @Override + public PizzaSpeziale atBaseType(@javax.annotation.Nullable String atBaseType) { + this.setAtBaseType(atBaseType); + return this; + } + + @Override + public PizzaSpeziale atType(@javax.annotation.Nonnull String atType) { + this.setAtType(atType); + return this; + } + + @Override + public PizzaSpeziale pizzaSize(@javax.annotation.Nullable BigDecimal pizzaSize) { + this.setPizzaSize(pizzaSize); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/others/java/webclient-sealedInterface_3_1/src/main/java/org/openapitools/client/model/BarRef.java b/samples/client/others/java/webclient-sealedInterface_3_1/src/main/java/org/openapitools/client/model/BarRef.java index dc66f9bad05e..36d8f477bf77 100644 --- a/samples/client/others/java/webclient-sealedInterface_3_1/src/main/java/org/openapitools/client/model/BarRef.java +++ b/samples/client/others/java/webclient-sealedInterface_3_1/src/main/java/org/openapitools/client/model/BarRef.java @@ -75,6 +75,18 @@ public BarRef atType(@javax.annotation.Nonnull String atType) { return this; } + @Override + public BarRef name(@javax.annotation.Nullable String name) { + this.setName(name); + return this; + } + + @Override + public BarRef atReferredType(@javax.annotation.Nullable String atReferredType) { + this.setAtReferredType(atReferredType); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/others/java/webclient-sealedInterface_3_1/src/main/java/org/openapitools/client/model/FooRef.java b/samples/client/others/java/webclient-sealedInterface_3_1/src/main/java/org/openapitools/client/model/FooRef.java index 6999231eb371..07eb02aa45e2 100644 --- a/samples/client/others/java/webclient-sealedInterface_3_1/src/main/java/org/openapitools/client/model/FooRef.java +++ b/samples/client/others/java/webclient-sealedInterface_3_1/src/main/java/org/openapitools/client/model/FooRef.java @@ -105,6 +105,18 @@ public FooRef atType(@javax.annotation.Nonnull String atType) { return this; } + @Override + public FooRef name(@javax.annotation.Nullable String name) { + this.setName(name); + return this; + } + + @Override + public FooRef atReferredType(@javax.annotation.Nullable String atReferredType) { + this.setAtReferredType(atReferredType); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/others/java/webclient-sealedInterface_3_1/src/main/java/org/openapitools/client/model/PizzaSpeziale.java b/samples/client/others/java/webclient-sealedInterface_3_1/src/main/java/org/openapitools/client/model/PizzaSpeziale.java index cde58d790501..3ded27b28d3a 100644 --- a/samples/client/others/java/webclient-sealedInterface_3_1/src/main/java/org/openapitools/client/model/PizzaSpeziale.java +++ b/samples/client/others/java/webclient-sealedInterface_3_1/src/main/java/org/openapitools/client/model/PizzaSpeziale.java @@ -106,6 +106,12 @@ public PizzaSpeziale atType(@javax.annotation.Nonnull String atType) { return this; } + @Override + public PizzaSpeziale pizzaSize(@javax.annotation.Nullable BigDecimal pizzaSize) { + this.setPizzaSize(pizzaSize); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/BigCat.java index 38e1e406589f..bf74365d7cb6 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/BigCat.java @@ -126,6 +126,12 @@ public BigCat color(@javax.annotation.Nullable String color) { return this; } + @Override + public BigCat declawed(@javax.annotation.Nullable Boolean declawed) { + this.setDeclawed(declawed); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/BigCat.java index 0aebdac1a2fc..19c356c8f683 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/BigCat.java @@ -130,6 +130,12 @@ public BigCat color(@javax.annotation.Nullable String color) { return this; } + @Override + public BigCat declawed(@javax.annotation.Nullable Boolean declawed) { + this.setDeclawed(declawed); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/BigCat.java index 715de18a1353..3c03d0848f3e 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/BigCat.java @@ -126,6 +126,12 @@ public BigCat color(@javax.annotation.Nullable String color) { return this; } + @Override + public BigCat declawed(@javax.annotation.Nullable Boolean declawed) { + this.setDeclawed(declawed); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/BigCat.java index bde3c4b44516..1d7e65203732 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/BigCat.java @@ -129,6 +129,12 @@ public BigCat color(@jakarta.annotation.Nullable String color) { return this; } + @Override + public BigCat declawed(@jakarta.annotation.Nullable Boolean declawed) { + this.setDeclawed(declawed); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/BigCat.java index 890c12821975..58ff13eaf7b7 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/BigCat.java @@ -122,6 +122,12 @@ public BigCat color(@javax.annotation.Nullable String color) { return this; } + @Override + public BigCat declawed(@javax.annotation.Nullable Boolean declawed) { + this.setDeclawed(declawed); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/BigCat.java index 890c12821975..58ff13eaf7b7 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/BigCat.java @@ -122,6 +122,12 @@ public BigCat color(@javax.annotation.Nullable String color) { return this; } + @Override + public BigCat declawed(@javax.annotation.Nullable Boolean declawed) { + this.setDeclawed(declawed); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/BigCat.java index 890c12821975..58ff13eaf7b7 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/BigCat.java @@ -122,6 +122,12 @@ public BigCat color(@javax.annotation.Nullable String color) { return this; } + @Override + public BigCat declawed(@javax.annotation.Nullable Boolean declawed) { + this.setDeclawed(declawed); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/BigCat.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/BigCat.java index 38e1e406589f..bf74365d7cb6 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/BigCat.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/BigCat.java @@ -126,6 +126,12 @@ public BigCat color(@javax.annotation.Nullable String color) { return this; } + @Override + public BigCat declawed(@javax.annotation.Nullable Boolean declawed) { + this.setDeclawed(declawed); + return this; + } + @Override public boolean equals(Object o) { if (this == o) {