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

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

View File

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

View File

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

View File

@@ -146,7 +146,6 @@ public class DefaultValue {
this.arrayStringEnumRefDefault = arrayStringEnumRefDefault;
}
public DefaultValue arrayStringEnumDefault(List<ArrayStringEnumDefaultEnum> arrayStringEnumDefault) {
this.arrayStringEnumDefault = arrayStringEnumDefault;
@@ -180,7 +179,6 @@ public class DefaultValue {
this.arrayStringEnumDefault = arrayStringEnumDefault;
}
public DefaultValue arrayStringDefault(List<String> arrayStringDefault) {
this.arrayStringDefault = arrayStringDefault;
@@ -214,7 +212,6 @@ public class DefaultValue {
this.arrayStringDefault = arrayStringDefault;
}
public DefaultValue arrayIntegerDefault(List<Integer> arrayIntegerDefault) {
this.arrayIntegerDefault = arrayIntegerDefault;
@@ -248,7 +245,6 @@ public class DefaultValue {
this.arrayIntegerDefault = arrayIntegerDefault;
}
public DefaultValue arrayString(List<String> arrayString) {
this.arrayString = arrayString;
@@ -282,7 +278,6 @@ public class DefaultValue {
this.arrayString = arrayString;
}
public DefaultValue arrayStringNullable(List<String> arrayStringNullable) {
this.arrayStringNullable = JsonNullable.<List<String>>of(arrayStringNullable);
@@ -328,7 +323,6 @@ public class DefaultValue {
this.arrayStringNullable = JsonNullable.<List<String>>of(arrayStringNullable);
}
public DefaultValue arrayStringExtensionNullable(List<String> arrayStringExtensionNullable) {
this.arrayStringExtensionNullable = JsonNullable.<List<String>>of(arrayStringExtensionNullable);
@@ -374,7 +368,6 @@ public class DefaultValue {
this.arrayStringExtensionNullable = JsonNullable.<List<String>>of(arrayStringExtensionNullable);
}
public DefaultValue stringNullable(String stringNullable) {
this.stringNullable = JsonNullable.<String>of(stringNullable);

View File

@@ -74,7 +74,6 @@ public class NumberPropertiesOnly {
this.number = number;
}
public NumberPropertiesOnly _float(Float _float) {
this._float = _float;
@@ -100,7 +99,6 @@ public class NumberPropertiesOnly {
this._float = _float;
}
public NumberPropertiesOnly _double(Double _double) {
this._double = _double;

View File

@@ -127,7 +127,6 @@ public class Pet {
this.id = id;
}
public Pet name(String name) {
this.name = name;
@@ -153,7 +152,6 @@ public class Pet {
this.name = name;
}
public Pet category(Category category) {
this.category = category;
@@ -179,7 +177,6 @@ public class Pet {
this.category = category;
}
public Pet photoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
@@ -213,7 +210,6 @@ public class Pet {
this.photoUrls = photoUrls;
}
public Pet tags(List<Tag> tags) {
this.tags = tags;
@@ -247,7 +243,6 @@ public class Pet {
this.tags = tags;
}
public Pet status(StatusEnum status) {
this.status = status;

View File

@@ -39,7 +39,7 @@ import java.util.StringJoiner;
@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
@@ -79,7 +79,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() {
}
@@ -109,7 +109,6 @@ public class Query {
this.id = id;
}
public Query outcomes(List<OutcomesEnum> outcomes) {
this.outcomes = outcomes;

View File

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

View File

@@ -78,7 +78,6 @@ public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
this.size = size;
}
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter color(String color) {
this.color = color;
@@ -104,7 +103,6 @@ public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
this.color = color;
}
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter id(Long id) {
this.id = id;
@@ -130,7 +128,6 @@ public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
this.id = id;
}
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter name(String name) {
this.name = name;