[java] implement #18032 add builder pattern to java client and spring generator (#18650)

* add builder pattern to java client and spring generator

* regenerate samples

* update doc

---------

Co-authored-by: jpfinne <jeanpaul@finne.be>
This commit is contained in:
William Cheng
2024-05-14 11:38:30 +08:00
committed by GitHub
parent 2f734515a1
commit 51ef8683fb
276 changed files with 12819 additions and 38 deletions

View File

@@ -28,6 +28,10 @@ public class AdditionalPropertiesAnyType {
private String name;
public AdditionalPropertiesAnyType() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -29,6 +29,10 @@ public class AdditionalPropertiesArray {
private String name;
public AdditionalPropertiesArray() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -28,6 +28,10 @@ public class AdditionalPropertiesBoolean {
private String name;
public AdditionalPropertiesBoolean() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -59,6 +59,10 @@ public class AdditionalPropertiesClass {
private Object anytype3;
public AdditionalPropertiesClass() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -28,6 +28,10 @@ public class AdditionalPropertiesInteger {
private String name;
public AdditionalPropertiesInteger() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -29,6 +29,10 @@ public class AdditionalPropertiesNumber {
private String name;
public AdditionalPropertiesNumber() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -29,6 +29,10 @@ public class AdditionalPropertiesObject {
private String name;
public AdditionalPropertiesObject() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -28,6 +28,10 @@ public class AdditionalPropertiesString {
private String name;
public AdditionalPropertiesString() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -29,6 +29,10 @@ public class ArrayOfArrayOfNumberOnly {
@Valid
private List<List<BigDecimal>> arrayArrayNumber = new ArrayList<>();
public ArrayOfArrayOfNumberOnly() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -29,6 +29,10 @@ public class ArrayOfNumberOnly {
@Valid
private List<BigDecimal> arrayNumber = new ArrayList<>();
public ArrayOfNumberOnly() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -35,6 +35,10 @@ public class ArrayTest {
@Valid
private List<List<@Valid ReadOnlyFirst>> arrayArrayOfModel = new ArrayList<>();
public ArrayTest() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -34,6 +34,10 @@ public class Capitalization {
private String ATT_NAME;
public Capitalization() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -32,6 +32,10 @@ public class ChildWithNullable extends ParentWithNullable {
private String otherProperty;
public ChildWithNullable() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -25,6 +25,10 @@ public class ClassModel {
private String propertyClass;
public ClassModel() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -24,6 +24,10 @@ public class Client {
private String client;
public Client() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -101,6 +101,10 @@ public class EnumArrays {
@Valid
private List<ArrayEnumEnum> arrayEnum = new ArrayList<>();
public EnumArrays() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -25,6 +25,10 @@ public class File {
private String sourceURI;
public File() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -31,6 +31,10 @@ public class FileSchemaTestClass {
@Valid
private List<@Valid File> files = new ArrayList<>();
public FileSchemaTestClass() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -28,6 +28,10 @@ public class HasOnlyReadOnly {
private String foo;
public HasOnlyReadOnly() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -72,6 +72,10 @@ public class MapTest {
@Valid
private Map<String, Boolean> indirectMap = new HashMap<>();
public MapTest() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -36,6 +36,10 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
@Valid
private Map<String, Animal> map = new HashMap<>();
public MixedPropertiesAndAdditionalPropertiesClass() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -29,6 +29,10 @@ public class Model200Response {
private String propertyClass;
public Model200Response() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -30,6 +30,10 @@ public class ModelApiResponse {
private String message;
public ModelApiResponse() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -26,6 +26,10 @@ public class ModelList {
private String _123list;
public ModelList() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -27,6 +27,10 @@ public class ModelReturn {
private Integer _return;
public ModelReturn() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -30,6 +30,10 @@ public class NullableMapProperty {
@Valid
private JsonNullable<Map<String, String>> languageValues = JsonNullable.<Map<String, String>>undefined();
public NullableMapProperty() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -25,6 +25,10 @@ public class NumberOnly {
private BigDecimal justNumber;
public NumberOnly() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -75,6 +75,10 @@ public class Order {
private Boolean complete = false;
public Order() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -29,6 +29,10 @@ public class OuterComposite {
private Boolean myBoolean;
public OuterComposite() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -75,6 +75,10 @@ public class ParentWithNullable {
private JsonNullable<String> nullableProperty = JsonNullable.<String>undefined();
public ParentWithNullable() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -26,6 +26,10 @@ public class ReadOnlyFirst {
private String baz;
public ReadOnlyFirst() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -30,6 +30,10 @@ public class ResponseObjectWithDifferentFieldNames {
private String propertyNameWithSpaces;
public ResponseObjectWithDifferentFieldNames() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -26,6 +26,10 @@ public class SpecialModelName {
private Long $specialPropertyName;
public SpecialModelName() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -26,6 +26,10 @@ public class Tag {
private String name;
public Tag() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -38,6 +38,10 @@ public class User {
private Integer userStatus;
public User() {
super();
}
/**
* Constructor with all args parameters
*/

View File

@@ -93,6 +93,10 @@ public class XmlItem {
@Valid
private List<Integer> prefixNsWrappedArray = new ArrayList<>();
public XmlItem() {
super();
}
/**
* Constructor with all args parameters
*/