diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/javaBuilder.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/javaBuilder.mustache index c210b33e7fe3..2b15a6ceeea5 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/javaBuilder.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/javaBuilder.mustache @@ -15,7 +15,7 @@ } protected Builder copyOf({{classname}} value) { {{#parentModel}} - super.copyOf(instance);{{/parentModel}}{{#vars}} + super.copyOf(value);{{/parentModel}}{{#vars}} this.instance.{{setter}}(value.{{name}});{{/vars}} return this; } diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Bar.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Bar.java index d144f5a1308e..aa6b6e20e026 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Bar.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Bar.java @@ -206,7 +206,7 @@ protected Builder(Bar instance) { } protected Builder copyOf(Bar value) { - super.copyOf(instance); + super.copyOf(value); this.instance.setId(value.id); this.instance.setBarPropA(value.barPropA); this.instance.setFooPropB(value.fooPropB); diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarCreate.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarCreate.java index dd7a77d4d3ae..034ec214c9bb 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarCreate.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarCreate.java @@ -188,7 +188,7 @@ protected Builder(BarCreate instance) { } protected Builder copyOf(BarCreate value) { - super.copyOf(instance); + super.copyOf(value); this.instance.setBarPropA(value.barPropA); this.instance.setFooPropB(value.fooPropB); this.instance.setFoo(value.foo); diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarRef.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarRef.java index 73cf22352425..9b969cb784fc 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarRef.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/BarRef.java @@ -122,7 +122,7 @@ protected Builder(BarRef instance) { } protected Builder copyOf(BarRef value) { - super.copyOf(instance); + super.copyOf(value); return this; } diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Foo.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Foo.java index 3e41134510b7..f6446173f1de 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Foo.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Foo.java @@ -161,7 +161,7 @@ protected Builder(Foo instance) { } protected Builder copyOf(Foo value) { - super.copyOf(instance); + super.copyOf(value); this.instance.setFooPropA(value.fooPropA); this.instance.setFooPropB(value.fooPropB); return this; diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/FooRef.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/FooRef.java index 606b52190782..13b1254d382b 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/FooRef.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/FooRef.java @@ -147,7 +147,7 @@ protected Builder(FooRef instance) { } protected Builder copyOf(FooRef value) { - super.copyOf(instance); + super.copyOf(value); this.instance.setFoorefPropA(value.foorefPropA); return this; } diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pasta.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pasta.java index 0337c91d2a7b..5b46a9c58a83 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pasta.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pasta.java @@ -137,7 +137,7 @@ protected Builder(Pasta instance) { } protected Builder copyOf(Pasta value) { - super.copyOf(instance); + super.copyOf(value); this.instance.setVendor(value.vendor); return this; } diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pizza.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pizza.java index caf4e12ca397..3fd55852aac9 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pizza.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Pizza.java @@ -146,7 +146,7 @@ protected Builder(Pizza instance) { } protected Builder copyOf(Pizza value) { - super.copyOf(instance); + super.copyOf(value); this.instance.setPizzaSize(value.pizzaSize); return this; } diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/PizzaSpeziale.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/PizzaSpeziale.java index 8aae51cc81ff..bed04dc6c8c4 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/PizzaSpeziale.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/PizzaSpeziale.java @@ -143,7 +143,7 @@ protected Builder(PizzaSpeziale instance) { } protected Builder copyOf(PizzaSpeziale value) { - super.copyOf(instance); + super.copyOf(value); this.instance.setToppings(value.toppings); return this; } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java index 88a9c88fcf47..00c66ea92a03 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java @@ -168,7 +168,7 @@ protected Builder(BigCat instance) { } protected Builder copyOf(BigCat value) { - super.copyOf(instance); + super.copyOf(value); this.instance.setKind(value.kind); return this; } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java index 41d0503df07c..b6e19be29793 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Cat.java @@ -131,7 +131,7 @@ protected Builder(Cat instance) { } protected Builder copyOf(Cat value) { - super.copyOf(instance); + super.copyOf(value); this.instance.setDeclawed(value.declawed); return this; } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ChildWithNullable.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ChildWithNullable.java index f62ca5e87887..6c44926c2b0b 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ChildWithNullable.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ChildWithNullable.java @@ -126,7 +126,7 @@ protected Builder(ChildWithNullable instance) { } protected Builder copyOf(ChildWithNullable value) { - super.copyOf(instance); + super.copyOf(value); this.instance.setOtherProperty(value.otherProperty); return this; } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java index 46653ec26599..955be3e16e3e 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Dog.java @@ -123,7 +123,7 @@ protected Builder(Dog instance) { } protected Builder copyOf(Dog value) { - super.copyOf(instance); + super.copyOf(value); this.instance.setBreed(value.breed); return this; }