Merge remote-tracking branch 'origin/master' into 5.4.x

This commit is contained in:
WILLIAM CHENG
2021-11-21 09:43:21 +08:00
2826 changed files with 72620 additions and 6604 deletions

View File

@@ -1,5 +1,6 @@
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'com.diffplug.spotless'
group = 'org.openapitools'
version = '1.0.0'
@@ -11,6 +12,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:2.3.+'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.diffplug.spotless:spotless-plugin-gradle:5.17.1'
}
}
@@ -129,3 +131,27 @@ dependencies {
javadoc {
options.tags = [ "http.response.details:a:Http Response Details" ]
}
// Use spotless plugin to automatically format code, remove unused import, etc
// To apply changes directly to the file, run `gradlew spotlessApply`
// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle
spotless {
// comment out below to run spotless as part of the `check` task
enforceCheck false
format 'misc', {
// define the files (e.g. '*.gradle', '*.md') to apply `misc` to
target '.gitignore'
// define the steps to apply to those files
trimTrailingWhitespace()
indentWithSpaces() // Takes an integer argument if you don't like 4
endWithNewline()
}
java {
// don't need to set target, it is inferred from java
// apply a specific flavor of google-java-format
googleJavaFormat('1.8').aosp().reflowLongStrings()
removeUnusedImports()
importOrder()
}
}

View File

@@ -183,6 +183,46 @@
</execution>
</executions>
</plugin>
<!-- Use spotless plugin to automatically format code, remove unused import, etc
To apply changes directly to the file, run `mvn spotless:apply`
Ref: https://github.com/diffplug/spotless/tree/main/plugin-maven
-->
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless.version}</version>
<configuration>
<formats>
<!-- you can define as many formats as you want, each is independent -->
<format>
<!-- define the files to apply to -->
<includes>
<include>.gitignore</include>
</includes>
<!-- define the steps to apply to those files -->
<trimTrailingWhitespace/>
<endWithNewline/>
<indent>
<spaces>true</spaces> <!-- or <tabs>true</tabs> -->
<spacesPerTab>4</spacesPerTab> <!-- optional, default is 4 -->
</indent>
</format>
</formats>
<!-- define a language-specific format -->
<java>
<!-- no need to specify files, inferred automatically, but you can if you want -->
<!-- apply a specific flavor of google-java-format and reflow long strings -->
<googleJavaFormat>
<version>1.8</version>
<style>AOSP</style>
<reflowLongStrings>true</reflowLongStrings>
</googleJavaFormat>
<removeUnusedImports/>
<importOrder/>
</java>
</configuration>
</plugin>
</plugins>
</build>
@@ -312,5 +352,6 @@
<junit-version>4.13.2</junit-version>
<http-signature-version>1.7</http-signature-version>
<scribejava-apis-version>8.3.1</scribejava-apis-version>
<spotless.version>2.17.3</spotless.version>
</properties>
</project>

View File

@@ -74,6 +74,8 @@ public class AdditionalPropertiesClass {
public static final String JSON_PROPERTY_MAP_WITH_UNDECLARED_PROPERTIES_STRING = "map_with_undeclared_properties_string";
private Map<String, String> mapWithUndeclaredPropertiesString = null;
public AdditionalPropertiesClass() {
}
public AdditionalPropertiesClass mapProperty(Map<String, String> mapProperty) {
this.mapProperty = mapProperty;

View File

@@ -53,6 +53,8 @@ public class Animal {
public static final String JSON_PROPERTY_COLOR = "color";
private String color = "red";
public Animal() {
}
public Animal className(String className) {
this.className = className;

View File

@@ -43,6 +43,8 @@ public class Apple {
public static final String JSON_PROPERTY_ORIGIN = "origin";
private String origin;
public Apple() {
}
public Apple cultivar(String cultivar) {
this.cultivar = cultivar;

View File

@@ -43,6 +43,8 @@ public class AppleReq {
public static final String JSON_PROPERTY_MEALY = "mealy";
private Boolean mealy;
public AppleReq() {
}
public AppleReq cultivar(String cultivar) {
this.cultivar = cultivar;

View File

@@ -42,6 +42,8 @@ public class ArrayOfArrayOfNumberOnly {
public static final String JSON_PROPERTY_ARRAY_ARRAY_NUMBER = "ArrayArrayNumber";
private List<List<BigDecimal>> arrayArrayNumber = null;
public ArrayOfArrayOfNumberOnly() {
}
public ArrayOfArrayOfNumberOnly arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
this.arrayArrayNumber = arrayArrayNumber;

View File

@@ -42,6 +42,8 @@ public class ArrayOfNumberOnly {
public static final String JSON_PROPERTY_ARRAY_NUMBER = "ArrayNumber";
private List<BigDecimal> arrayNumber = null;
public ArrayOfNumberOnly() {
}
public ArrayOfNumberOnly arrayNumber(List<BigDecimal> arrayNumber) {
this.arrayNumber = arrayNumber;

View File

@@ -50,6 +50,8 @@ public class ArrayTest {
public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL = "array_array_of_model";
private List<List<ReadOnlyFirst>> arrayArrayOfModel = null;
public ArrayTest() {
}
public ArrayTest arrayOfString(List<String> arrayOfString) {
this.arrayOfString = arrayOfString;

View File

@@ -40,6 +40,8 @@ public class Banana {
public static final String JSON_PROPERTY_LENGTH_CM = "lengthCm";
private BigDecimal lengthCm;
public Banana() {
}
public Banana lengthCm(BigDecimal lengthCm) {
this.lengthCm = lengthCm;

View File

@@ -44,6 +44,8 @@ public class BananaReq {
public static final String JSON_PROPERTY_SWEET = "sweet";
private Boolean sweet;
public BananaReq() {
}
public BananaReq lengthCm(BigDecimal lengthCm) {
this.lengthCm = lengthCm;

View File

@@ -39,6 +39,8 @@ public class BasquePig {
public static final String JSON_PROPERTY_CLASS_NAME = "className";
private String className;
public BasquePig() {
}
public BasquePig className(String className) {
this.className = className;

View File

@@ -59,6 +59,8 @@ public class Capitalization {
public static final String JSON_PROPERTY_A_T_T_N_A_M_E = "ATT_NAME";
private String ATT_NAME;
public Capitalization() {
}
public Capitalization smallCamel(String smallCamel) {
this.smallCamel = smallCamel;

View File

@@ -49,6 +49,8 @@ public class Cat extends Animal {
public static final String JSON_PROPERTY_DECLAWED = "declawed";
private Boolean declawed;
public Cat() {
}
public Cat declawed(Boolean declawed) {
this.declawed = declawed;

View File

@@ -39,6 +39,8 @@ public class CatAllOf {
public static final String JSON_PROPERTY_DECLAWED = "declawed";
private Boolean declawed;
public CatAllOf() {
}
public CatAllOf declawed(Boolean declawed) {
this.declawed = declawed;

View File

@@ -43,6 +43,8 @@ public class Category {
public static final String JSON_PROPERTY_NAME = "name";
private String name = "default-name";
public Category() {
}
public Category id(Long id) {
this.id = id;

View File

@@ -55,6 +55,8 @@ public class ChildCat extends ParentPet {
public static final String JSON_PROPERTY_PET_TYPE = "pet_type";
private String petType = "ChildCat";
public ChildCat() {
}
public ChildCat name(String name) {
this.name = name;

View File

@@ -45,6 +45,8 @@ public class ChildCatAllOf {
public static final String JSON_PROPERTY_PET_TYPE = "pet_type";
private String petType = "ChildCat";
public ChildCatAllOf() {
}
public ChildCatAllOf name(String name) {
this.name = name;

View File

@@ -40,6 +40,8 @@ public class ClassModel {
public static final String JSON_PROPERTY_PROPERTY_CLASS = "_class";
private String propertyClass;
public ClassModel() {
}
public ClassModel propertyClass(String propertyClass) {
this.propertyClass = propertyClass;

View File

@@ -39,6 +39,8 @@ public class Client {
public static final String JSON_PROPERTY_CLIENT = "client";
private String client;
public Client() {
}
public Client client(String client) {
this.client = client;

View File

@@ -49,6 +49,8 @@ public class ComplexQuadrilateral {
public static final String JSON_PROPERTY_QUADRILATERAL_TYPE = "quadrilateralType";
private String quadrilateralType;
public ComplexQuadrilateral() {
}
public ComplexQuadrilateral shapeType(String shapeType) {
this.shapeType = shapeType;

View File

@@ -39,6 +39,8 @@ public class DanishPig {
public static final String JSON_PROPERTY_CLASS_NAME = "className";
private String className;
public DanishPig() {
}
public DanishPig className(String className) {
this.className = className;

View File

@@ -41,6 +41,8 @@ public class DeprecatedObject {
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public DeprecatedObject() {
}
public DeprecatedObject name(String name) {
this.name = name;

View File

@@ -49,6 +49,8 @@ public class Dog extends Animal {
public static final String JSON_PROPERTY_BREED = "breed";
private String breed;
public Dog() {
}
public Dog breed(String breed) {
this.breed = breed;

View File

@@ -39,6 +39,8 @@ public class DogAllOf {
public static final String JSON_PROPERTY_BREED = "breed";
private String breed;
public DogAllOf() {
}
public DogAllOf breed(String breed) {
this.breed = breed;

View File

@@ -65,6 +65,8 @@ public class Drawing {
public static final String JSON_PROPERTY_SHAPES = "shapes";
private List<Shape> shapes = null;
public Drawing() {
}
public Drawing mainShape(Shape mainShape) {
this.mainShape = mainShape;

View File

@@ -115,6 +115,8 @@ public class EnumArrays {
public static final String JSON_PROPERTY_ARRAY_ENUM = "array_enum";
private List<ArrayEnumEnum> arrayEnum = null;
public EnumArrays() {
}
public EnumArrays justSymbol(JustSymbolEnum justSymbol) {
this.justSymbol = justSymbol;

View File

@@ -258,6 +258,8 @@ public class EnumTest {
public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE = "outerEnumIntegerDefaultValue";
private OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = OuterEnumIntegerDefaultValue.NUMBER_0;
public EnumTest() {
}
public EnumTest enumString(EnumStringEnum enumString) {
this.enumString = enumString;

View File

@@ -49,6 +49,8 @@ public class EquilateralTriangle {
public static final String JSON_PROPERTY_TRIANGLE_TYPE = "triangleType";
private String triangleType;
public EquilateralTriangle() {
}
public EquilateralTriangle shapeType(String shapeType) {
this.shapeType = shapeType;

View File

@@ -45,6 +45,8 @@ public class FileSchemaTestClass {
public static final String JSON_PROPERTY_FILES = "files";
private List<java.io.File> files = null;
public FileSchemaTestClass() {
}
public FileSchemaTestClass file(java.io.File file) {
this.file = file;

View File

@@ -39,6 +39,8 @@ public class Foo {
public static final String JSON_PROPERTY_BAR = "bar";
private String bar = "bar";
public Foo() {
}
public Foo bar(String bar) {
this.bar = bar;

View File

@@ -104,6 +104,8 @@ public class FormatTest {
public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER = "pattern_with_digits_and_delimiter";
private String patternWithDigitsAndDelimiter;
public FormatTest() {
}
public FormatTest integer(Integer integer) {
this.integer = integer;

View File

@@ -49,6 +49,8 @@ public class GrandparentAnimal {
public static final String JSON_PROPERTY_PET_TYPE = "pet_type";
private String petType;
public GrandparentAnimal() {
}
public GrandparentAnimal petType(String petType) {
this.petType = petType;

View File

@@ -43,6 +43,18 @@ public class HasOnlyReadOnly {
public static final String JSON_PROPERTY_FOO = "foo";
private String foo;
public HasOnlyReadOnly() {
}
@JsonCreator
public HasOnlyReadOnly(
@JsonProperty(JSON_PROPERTY_BAR) String bar,
@JsonProperty(JSON_PROPERTY_FOO) String foo
) {
this();
this.bar = bar;
this.foo = foo;
}
/**
* Get bar

View File

@@ -44,6 +44,8 @@ public class HealthCheckResult {
public static final String JSON_PROPERTY_NULLABLE_MESSAGE = "NullableMessage";
private JsonNullable<String> nullableMessage = JsonNullable.<String>undefined();
public HealthCheckResult() {
}
public HealthCheckResult nullableMessage(String nullableMessage) {
this.nullableMessage = JsonNullable.<String>of(nullableMessage);

View File

@@ -40,6 +40,8 @@ public class InlineResponseDefault {
public static final String JSON_PROPERTY_STRING = "string";
private Foo string;
public InlineResponseDefault() {
}
public InlineResponseDefault string(Foo string) {
this.string = string;

View File

@@ -45,6 +45,8 @@ public class IsoscelesTriangle {
public static final String JSON_PROPERTY_TRIANGLE_TYPE = "triangleType";
private String triangleType;
public IsoscelesTriangle() {
}
public IsoscelesTriangle shapeType(String shapeType) {
this.shapeType = shapeType;

View File

@@ -89,6 +89,8 @@ public class MapTest {
public static final String JSON_PROPERTY_INDIRECT_MAP = "indirect_map";
private Map<String, Boolean> indirectMap = null;
public MapTest() {
}
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
this.mapMapOfString = mapMapOfString;

View File

@@ -53,6 +53,8 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
public static final String JSON_PROPERTY_MAP = "map";
private Map<String, Animal> map = null;
public MixedPropertiesAndAdditionalPropertiesClass() {
}
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
this.uuid = uuid;

View File

@@ -44,6 +44,8 @@ public class Model200Response {
public static final String JSON_PROPERTY_PROPERTY_CLASS = "class";
private String propertyClass;
public Model200Response() {
}
public Model200Response name(Integer name) {
this.name = name;

View File

@@ -47,6 +47,8 @@ public class ModelApiResponse {
public static final String JSON_PROPERTY_MESSAGE = "message";
private String message;
public ModelApiResponse() {
}
public ModelApiResponse code(Integer code) {
this.code = code;

View File

@@ -40,6 +40,8 @@ public class ModelReturn {
public static final String JSON_PROPERTY_RETURN = "return";
private Integer _return;
public ModelReturn() {
}
public ModelReturn _return(Integer _return) {
this._return = _return;

View File

@@ -52,6 +52,18 @@ public class Name {
public static final String JSON_PROPERTY_123NUMBER = "123Number";
private Integer _123number;
public Name() {
}
@JsonCreator
public Name(
@JsonProperty(JSON_PROPERTY_SNAKE_CASE) Integer snakeCase,
@JsonProperty(JSON_PROPERTY_123NUMBER) Integer _123number
) {
this();
this.snakeCase = snakeCase;
this._123number = _123number;
}
public Name name(Integer name) {
this.name = name;

View File

@@ -98,6 +98,8 @@ public class NullableClass {
public static final String JSON_PROPERTY_OBJECT_ITEMS_NULLABLE = "object_items_nullable";
private Map<String, Object> objectItemsNullable = null;
public NullableClass() {
}
public NullableClass integerProp(Integer integerProp) {
this.integerProp = JsonNullable.<Integer>of(integerProp);

View File

@@ -40,6 +40,8 @@ public class NumberOnly {
public static final String JSON_PROPERTY_JUST_NUMBER = "JustNumber";
private BigDecimal justNumber;
public NumberOnly() {
}
public NumberOnly justNumber(BigDecimal justNumber) {
this.justNumber = justNumber;

View File

@@ -55,6 +55,8 @@ public class ObjectWithDeprecatedFields {
public static final String JSON_PROPERTY_BARS = "bars";
private List<String> bars = null;
public ObjectWithDeprecatedFields() {
}
public ObjectWithDeprecatedFields uuid(String uuid) {
this.uuid = uuid;

View File

@@ -97,6 +97,8 @@ public class Order {
public static final String JSON_PROPERTY_COMPLETE = "complete";
private Boolean complete = false;
public Order() {
}
public Order id(Long id) {
this.id = id;

View File

@@ -48,6 +48,8 @@ public class OuterComposite {
public static final String JSON_PROPERTY_MY_BOOLEAN = "my_boolean";
private Boolean myBoolean;
public OuterComposite() {
}
public OuterComposite myNumber(BigDecimal myNumber) {
this.myNumber = myNumber;

View File

@@ -48,6 +48,8 @@ import org.openapitools.client.JSON;
})
public class ParentPet extends GrandparentAnimal {
public ParentPet() {
}
/**
* A container for additional, undeclared properties.
* This is a holder for any undeclared properties as specified with

View File

@@ -100,6 +100,8 @@ public class Pet {
public static final String JSON_PROPERTY_STATUS = "status";
private StatusEnum status;
public Pet() {
}
public Pet id(Long id) {
this.id = id;

View File

@@ -39,6 +39,8 @@ public class QuadrilateralInterface {
public static final String JSON_PROPERTY_QUADRILATERAL_TYPE = "quadrilateralType";
private String quadrilateralType;
public QuadrilateralInterface() {
}
public QuadrilateralInterface quadrilateralType(String quadrilateralType) {
this.quadrilateralType = quadrilateralType;

View File

@@ -43,6 +43,16 @@ public class ReadOnlyFirst {
public static final String JSON_PROPERTY_BAZ = "baz";
private String baz;
public ReadOnlyFirst() {
}
@JsonCreator
public ReadOnlyFirst(
@JsonProperty(JSON_PROPERTY_BAR) String bar
) {
this();
this.bar = bar;
}
/**
* Get bar

View File

@@ -49,6 +49,8 @@ public class ScaleneTriangle {
public static final String JSON_PROPERTY_TRIANGLE_TYPE = "triangleType";
private String triangleType;
public ScaleneTriangle() {
}
public ScaleneTriangle shapeType(String shapeType) {
this.shapeType = shapeType;

View File

@@ -39,6 +39,8 @@ public class ShapeInterface {
public static final String JSON_PROPERTY_SHAPE_TYPE = "shapeType";
private String shapeType;
public ShapeInterface() {
}
public ShapeInterface shapeType(String shapeType) {
this.shapeType = shapeType;

View File

@@ -49,6 +49,8 @@ public class SimpleQuadrilateral {
public static final String JSON_PROPERTY_QUADRILATERAL_TYPE = "quadrilateralType";
private String quadrilateralType;
public SimpleQuadrilateral() {
}
public SimpleQuadrilateral shapeType(String shapeType) {
this.shapeType = shapeType;

View File

@@ -43,6 +43,8 @@ public class SpecialModelName {
public static final String JSON_PROPERTY_SPECIAL_MODEL_NAME = "_special_model.name_";
private String specialModelName;
public SpecialModelName() {
}
public SpecialModelName $specialPropertyName(Long $specialPropertyName) {
this.$specialPropertyName = $specialPropertyName;

View File

@@ -43,6 +43,8 @@ public class Tag {
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public Tag() {
}
public Tag id(Long id) {
this.id = id;

View File

@@ -39,6 +39,8 @@ public class TriangleInterface {
public static final String JSON_PROPERTY_TRIANGLE_TYPE = "triangleType";
private String triangleType;
public TriangleInterface() {
}
public TriangleInterface triangleType(String triangleType) {
this.triangleType = triangleType;

View File

@@ -87,6 +87,8 @@ public class User {
public static final String JSON_PROPERTY_ANY_TYPE_PROP_NULLABLE = "anyTypePropNullable";
private JsonNullable<Object> anyTypePropNullable = JsonNullable.<Object>of(null);
public User() {
}
public User id(Long id) {
this.id = id;

View File

@@ -47,6 +47,8 @@ public class Whale {
public static final String JSON_PROPERTY_CLASS_NAME = "className";
private String className;
public Whale() {
}
public Whale hasBaleen(Boolean hasBaleen) {
this.hasBaleen = hasBaleen;

View File

@@ -84,6 +84,8 @@ public class Zebra {
public static final String JSON_PROPERTY_CLASS_NAME = "className";
private String className;
public Zebra() {
}
public Zebra type(TypeEnum type) {
this.type = type;