Add new option allArgConstructor for java client, spring generators (#18538)

* allArgConstructor for java

* Remove leftover from builder pattern branch

* Rename generateConstructorWithAllArgs and use x- in vendorExtensions

* Test issue #18340

* Add evidences for allVars issue (#18340)

* remove eol

* update doc

---------

Co-authored-by: jpfinne <jeanpaul@finne.be>
This commit is contained in:
William Cheng
2024-05-01 18:10:35 +08:00
committed by GitHub
parent 98d026118c
commit 2a1b4f90df
565 changed files with 1715 additions and 1869 deletions

View File

@@ -66,7 +66,6 @@ public class Bird {
this.size = size;
}
public Bird color(String color) {
this.color = color;

View File

@@ -66,7 +66,6 @@ public class Category {
this.id = id;
}
public Category name(String name) {
this.name = name;

View File

@@ -76,7 +76,6 @@ public class DataQuery extends Query {
this.suffix = suffix;
}
public DataQuery text(String text) {
this.text = text;
@@ -102,7 +101,6 @@ public class DataQuery extends Query {
this.text = text;
}
public DataQuery date(OffsetDateTime date) {
this.date = date;

View File

@@ -143,7 +143,6 @@ public class DefaultValue {
this.arrayStringEnumRefDefault = arrayStringEnumRefDefault;
}
public DefaultValue arrayStringEnumDefault(List<ArrayStringEnumDefaultEnum> arrayStringEnumDefault) {
this.arrayStringEnumDefault = arrayStringEnumDefault;
@@ -177,7 +176,6 @@ public class DefaultValue {
this.arrayStringEnumDefault = arrayStringEnumDefault;
}
public DefaultValue arrayStringDefault(List<String> arrayStringDefault) {
this.arrayStringDefault = arrayStringDefault;
@@ -211,7 +209,6 @@ public class DefaultValue {
this.arrayStringDefault = arrayStringDefault;
}
public DefaultValue arrayIntegerDefault(List<Integer> arrayIntegerDefault) {
this.arrayIntegerDefault = arrayIntegerDefault;
@@ -245,7 +242,6 @@ public class DefaultValue {
this.arrayIntegerDefault = arrayIntegerDefault;
}
public DefaultValue arrayString(List<String> arrayString) {
this.arrayString = arrayString;
@@ -279,7 +275,6 @@ public class DefaultValue {
this.arrayString = arrayString;
}
public DefaultValue arrayStringNullable(List<String> arrayStringNullable) {
this.arrayStringNullable = JsonNullable.<List<String>>of(arrayStringNullable);
@@ -325,7 +320,6 @@ public class DefaultValue {
this.arrayStringNullable = JsonNullable.<List<String>>of(arrayStringNullable);
}
public DefaultValue arrayStringExtensionNullable(List<String> arrayStringExtensionNullable) {
this.arrayStringExtensionNullable = JsonNullable.<List<String>>of(arrayStringExtensionNullable);
@@ -371,7 +365,6 @@ public class DefaultValue {
this.arrayStringExtensionNullable = JsonNullable.<List<String>>of(arrayStringExtensionNullable);
}
public DefaultValue stringNullable(String stringNullable) {
this.stringNullable = JsonNullable.<String>of(stringNullable);

View File

@@ -71,7 +71,6 @@ public class NumberPropertiesOnly {
this.number = number;
}
public NumberPropertiesOnly _float(Float _float) {
this._float = _float;
@@ -97,7 +96,6 @@ public class NumberPropertiesOnly {
this._float = _float;
}
public NumberPropertiesOnly _double(Double _double) {
this._double = _double;

View File

@@ -124,7 +124,6 @@ public class Pet {
this.id = id;
}
public Pet name(String name) {
this.name = name;
@@ -150,7 +149,6 @@ public class Pet {
this.name = name;
}
public Pet category(Category category) {
this.category = category;
@@ -176,7 +174,6 @@ public class Pet {
this.category = category;
}
public Pet photoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
@@ -210,7 +207,6 @@ public class Pet {
this.photoUrls = photoUrls;
}
public Pet tags(List<Tag> tags) {
this.tags = tags;
@@ -244,7 +240,6 @@ public class Pet {
this.tags = tags;
}
public Pet status(StatusEnum status) {
this.status = status;

View File

@@ -36,7 +36,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.6.0-SNAPSHOT")
public class Query {
public static final String JSON_PROPERTY_ID = "id";
private Long id;
protected Long id;
/**
* Gets or Sets outcomes
@@ -76,7 +76,7 @@ public class Query {
}
public static final String JSON_PROPERTY_OUTCOMES = "outcomes";
private List<OutcomesEnum> outcomes = new ArrayList<>(Arrays.asList(OutcomesEnum.SUCCESS, OutcomesEnum.FAILURE));
protected List<OutcomesEnum> outcomes = new ArrayList<>(Arrays.asList(OutcomesEnum.SUCCESS, OutcomesEnum.FAILURE));
public Query() {
}
@@ -106,7 +106,6 @@ public class Query {
this.id = id;
}
public Query outcomes(List<OutcomesEnum> outcomes) {
this.outcomes = outcomes;

View File

@@ -66,7 +66,6 @@ public class Tag {
this.id = id;
}
public Tag name(String name) {
this.name = name;

View File

@@ -75,7 +75,6 @@ public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
this.size = size;
}
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter color(String color) {
this.color = color;
@@ -101,7 +100,6 @@ public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
this.color = color;
}
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter id(Long id) {
this.id = id;
@@ -127,7 +125,6 @@ public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
this.id = id;
}
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter name(String name) {
this.name = name;