mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-21 21:37:06 +00:00
fix(java): default values from allOfs are not correctly definied (#22200)
* fix: extend check for default values of integer and number schema * add testcases to openapi specs * generate java clients with the updated fix
This commit is contained in:
@@ -1359,20 +1359,20 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
|||||||
|
|
||||||
return String.format(Locale.ROOT, "new %s<>()",
|
return String.format(Locale.ROOT, "new %s<>()",
|
||||||
instantiationTypes().getOrDefault("map", "HashMap"));
|
instantiationTypes().getOrDefault("map", "HashMap"));
|
||||||
} else if (ModelUtils.isIntegerSchema(schema)) {
|
} else if (ModelUtils.isIntegerSchema(schema) || cp.isInteger || cp.isLong) {
|
||||||
if (schema.getDefault() != null) {
|
if (schema.getDefault() != null) {
|
||||||
if (SchemaTypeUtil.INTEGER64_FORMAT.equals(schema.getFormat())) {
|
if (SchemaTypeUtil.INTEGER64_FORMAT.equals(schema.getFormat()) || cp.isLong) {
|
||||||
return schema.getDefault().toString() + "l";
|
return schema.getDefault().toString() + "l";
|
||||||
} else {
|
} else {
|
||||||
return schema.getDefault().toString();
|
return schema.getDefault().toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
} else if (ModelUtils.isNumberSchema(schema)) {
|
} else if (ModelUtils.isNumberSchema(schema) || cp.isFloat || cp.isDouble) {
|
||||||
if (schema.getDefault() != null) {
|
if (schema.getDefault() != null) {
|
||||||
if (SchemaTypeUtil.FLOAT_FORMAT.equals(schema.getFormat())) {
|
if (SchemaTypeUtil.FLOAT_FORMAT.equals(schema.getFormat()) || cp.isFloat) {
|
||||||
return schema.getDefault().toString() + "f";
|
return schema.getDefault().toString() + "f";
|
||||||
} else if (SchemaTypeUtil.DOUBLE_FORMAT.equals(schema.getFormat())) {
|
} else if (SchemaTypeUtil.DOUBLE_FORMAT.equals(schema.getFormat()) || cp.isDouble) {
|
||||||
return schema.getDefault().toString() + "d";
|
return schema.getDefault().toString() + "d";
|
||||||
} else {
|
} else {
|
||||||
return "new BigDecimal(\"" + schema.getDefault().toString() + "\")";
|
return "new BigDecimal(\"" + schema.getDefault().toString() + "\")";
|
||||||
|
|||||||
@@ -2240,3 +2240,39 @@ components:
|
|||||||
deprecated: true
|
deprecated: true
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/Bar'
|
$ref: '#/components/schemas/Bar'
|
||||||
|
LongId:
|
||||||
|
description: "Id as long"
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
Weight:
|
||||||
|
description: "Weight as float"
|
||||||
|
format: float
|
||||||
|
type: number
|
||||||
|
Height:
|
||||||
|
description: "Height as double"
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
AllOfRefToLong:
|
||||||
|
description: "Object with allOf ref to long"
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/LongId'
|
||||||
|
default: 10
|
||||||
|
AllOfRefToFloat:
|
||||||
|
description: "Object with allOf ref to float"
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
weight:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/Weight'
|
||||||
|
default: 7.89
|
||||||
|
AllOfRefToDouble:
|
||||||
|
description: "Object with allOf ref to double"
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
height:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/Height'
|
||||||
|
default: 32.1
|
||||||
@@ -2830,3 +2830,39 @@ components:
|
|||||||
[ "h3", "Header 3" ],
|
[ "h3", "Header 3" ],
|
||||||
[ "h4", "Header 4" ]
|
[ "h4", "Header 4" ]
|
||||||
]
|
]
|
||||||
|
LongId:
|
||||||
|
description: "Id as long"
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
Weight:
|
||||||
|
description: "Weight as float"
|
||||||
|
format: float
|
||||||
|
type: number
|
||||||
|
Height:
|
||||||
|
description: "Height as double"
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
AllOfRefToLong:
|
||||||
|
description: "Object with allOf ref to long"
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/LongId'
|
||||||
|
default: 10
|
||||||
|
AllOfRefToFloat:
|
||||||
|
description: "Object with allOf ref to float"
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
weight:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/Weight'
|
||||||
|
default: 7.89
|
||||||
|
AllOfRefToDouble:
|
||||||
|
description: "Object with allOf ref to double"
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
height:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/Height'
|
||||||
|
default: 32.1
|
||||||
@@ -2231,3 +2231,39 @@ components:
|
|||||||
deprecated: true
|
deprecated: true
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/Bar'
|
$ref: '#/components/schemas/Bar'
|
||||||
|
LongId:
|
||||||
|
description: "Id as long"
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
Weight:
|
||||||
|
description: "Weight as float"
|
||||||
|
format: float
|
||||||
|
type: number
|
||||||
|
Height:
|
||||||
|
description: "Height as double"
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
AllOfRefToLong:
|
||||||
|
description: "Object with allOf ref to long"
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/LongId'
|
||||||
|
default: 10
|
||||||
|
AllOfRefToFloat:
|
||||||
|
description: "Object with allOf ref to float"
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
weight:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/Weight'
|
||||||
|
default: 7.89
|
||||||
|
AllOfRefToDouble:
|
||||||
|
description: "Object with allOf ref to double"
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
height:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/Height'
|
||||||
|
default: 32.1
|
||||||
@@ -6,6 +6,9 @@ api/openapi.yaml
|
|||||||
build.gradle
|
build.gradle
|
||||||
build.sbt
|
build.sbt
|
||||||
docs/AdditionalPropertiesClass.md
|
docs/AdditionalPropertiesClass.md
|
||||||
|
docs/AllOfRefToDouble.md
|
||||||
|
docs/AllOfRefToFloat.md
|
||||||
|
docs/AllOfRefToLong.md
|
||||||
docs/Animal.md
|
docs/Animal.md
|
||||||
docs/AnotherFakeApi.md
|
docs/AnotherFakeApi.md
|
||||||
docs/Apple.md
|
docs/Apple.md
|
||||||
@@ -125,6 +128,9 @@ src/main/java/org/openapitools/client/auth/OAuth.java
|
|||||||
src/main/java/org/openapitools/client/auth/OAuthFlow.java
|
src/main/java/org/openapitools/client/auth/OAuthFlow.java
|
||||||
src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java
|
src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java
|
||||||
src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
|
src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
|
||||||
|
src/main/java/org/openapitools/client/model/AllOfRefToDouble.java
|
||||||
|
src/main/java/org/openapitools/client/model/AllOfRefToFloat.java
|
||||||
|
src/main/java/org/openapitools/client/model/AllOfRefToLong.java
|
||||||
src/main/java/org/openapitools/client/model/Animal.java
|
src/main/java/org/openapitools/client/model/Animal.java
|
||||||
src/main/java/org/openapitools/client/model/Apple.java
|
src/main/java/org/openapitools/client/model/Apple.java
|
||||||
src/main/java/org/openapitools/client/model/AppleReq.java
|
src/main/java/org/openapitools/client/model/AppleReq.java
|
||||||
@@ -199,3 +205,6 @@ src/main/java/org/openapitools/client/model/TriangleInterface.java
|
|||||||
src/main/java/org/openapitools/client/model/User.java
|
src/main/java/org/openapitools/client/model/User.java
|
||||||
src/main/java/org/openapitools/client/model/Whale.java
|
src/main/java/org/openapitools/client/model/Whale.java
|
||||||
src/main/java/org/openapitools/client/model/Zebra.java
|
src/main/java/org/openapitools/client/model/Zebra.java
|
||||||
|
src/test/java/org/openapitools/client/model/AllOfRefToDoubleTest.java
|
||||||
|
src/test/java/org/openapitools/client/model/AllOfRefToFloatTest.java
|
||||||
|
src/test/java/org/openapitools/client/model/AllOfRefToLongTest.java
|
||||||
|
|||||||
@@ -163,6 +163,9 @@ Class | Method | HTTP request | Description
|
|||||||
## Documentation for Models
|
## Documentation for Models
|
||||||
|
|
||||||
- [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
|
- [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
|
||||||
|
- [AllOfRefToDouble](docs/AllOfRefToDouble.md)
|
||||||
|
- [AllOfRefToFloat](docs/AllOfRefToFloat.md)
|
||||||
|
- [AllOfRefToLong](docs/AllOfRefToLong.md)
|
||||||
- [Animal](docs/Animal.md)
|
- [Animal](docs/Animal.md)
|
||||||
- [Apple](docs/Apple.md)
|
- [Apple](docs/Apple.md)
|
||||||
- [AppleReq](docs/AppleReq.md)
|
- [AppleReq](docs/AppleReq.md)
|
||||||
|
|||||||
@@ -2293,6 +2293,42 @@ components:
|
|||||||
$ref: "#/components/schemas/Bar"
|
$ref: "#/components/schemas/Bar"
|
||||||
type: array
|
type: array
|
||||||
type: object
|
type: object
|
||||||
|
LongId:
|
||||||
|
description: Id as long
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
Weight:
|
||||||
|
description: Weight as float
|
||||||
|
format: float
|
||||||
|
type: number
|
||||||
|
Height:
|
||||||
|
description: Height as double
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
AllOfRefToLong:
|
||||||
|
description: Object with allOf ref to long
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
allOf:
|
||||||
|
- $ref: "#/components/schemas/LongId"
|
||||||
|
default: 10
|
||||||
|
type: object
|
||||||
|
AllOfRefToFloat:
|
||||||
|
description: Object with allOf ref to float
|
||||||
|
properties:
|
||||||
|
weight:
|
||||||
|
allOf:
|
||||||
|
- $ref: "#/components/schemas/Weight"
|
||||||
|
default: 7.89
|
||||||
|
type: object
|
||||||
|
AllOfRefToDouble:
|
||||||
|
description: Object with allOf ref to double
|
||||||
|
properties:
|
||||||
|
height:
|
||||||
|
allOf:
|
||||||
|
- $ref: "#/components/schemas/Height"
|
||||||
|
default: 32.1
|
||||||
|
type: object
|
||||||
_foo_get_default_response:
|
_foo_get_default_response:
|
||||||
example:
|
example:
|
||||||
string:
|
string:
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# AllOfRefToDouble
|
||||||
|
|
||||||
|
Object with allOf ref to double
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
| Name | Type | Description | Notes |
|
||||||
|
|------------ | ------------- | ------------- | -------------|
|
||||||
|
|**height** | **Double** | Height as double | [optional] |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
14
samples/client/petstore/java/jersey3/docs/AllOfRefToFloat.md
Normal file
14
samples/client/petstore/java/jersey3/docs/AllOfRefToFloat.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# AllOfRefToFloat
|
||||||
|
|
||||||
|
Object with allOf ref to float
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
| Name | Type | Description | Notes |
|
||||||
|
|------------ | ------------- | ------------- | -------------|
|
||||||
|
|**weight** | **Float** | Weight as float | [optional] |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
14
samples/client/petstore/java/jersey3/docs/AllOfRefToLong.md
Normal file
14
samples/client/petstore/java/jersey3/docs/AllOfRefToLong.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# AllOfRefToLong
|
||||||
|
|
||||||
|
Object with allOf ref to long
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
| Name | Type | Description | Notes |
|
||||||
|
|------------ | ------------- | ------------- | -------------|
|
||||||
|
|**id** | **Long** | Id as long | [optional] |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Locale;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import org.openapitools.client.JSON;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Object with allOf ref to double
|
||||||
|
*/
|
||||||
|
@JsonPropertyOrder({
|
||||||
|
AllOfRefToDouble.JSON_PROPERTY_HEIGHT
|
||||||
|
})
|
||||||
|
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0-SNAPSHOT")
|
||||||
|
public class AllOfRefToDouble {
|
||||||
|
public static final String JSON_PROPERTY_HEIGHT = "height";
|
||||||
|
@jakarta.annotation.Nullable
|
||||||
|
private Double height = 32.1d;
|
||||||
|
|
||||||
|
public AllOfRefToDouble() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllOfRefToDouble height(@jakarta.annotation.Nullable Double height) {
|
||||||
|
this.height = height;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Height as double
|
||||||
|
* @return height
|
||||||
|
*/
|
||||||
|
@jakarta.annotation.Nullable
|
||||||
|
|
||||||
|
@JsonProperty(value = JSON_PROPERTY_HEIGHT, required = false)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
|
||||||
|
public Double getHeight() {
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@JsonProperty(value = JSON_PROPERTY_HEIGHT, required = false)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setHeight(@jakarta.annotation.Nullable Double height) {
|
||||||
|
this.height = height;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if this AllOfRefToDouble object is equal to o.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
return EqualsBuilder.reflectionEquals(this, o, false, null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return HashCodeBuilder.reflectionHashCode(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class AllOfRefToDouble {\n");
|
||||||
|
sb.append(" height: ").append(toIndentedString(height)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Locale;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import org.openapitools.client.JSON;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Object with allOf ref to float
|
||||||
|
*/
|
||||||
|
@JsonPropertyOrder({
|
||||||
|
AllOfRefToFloat.JSON_PROPERTY_WEIGHT
|
||||||
|
})
|
||||||
|
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0-SNAPSHOT")
|
||||||
|
public class AllOfRefToFloat {
|
||||||
|
public static final String JSON_PROPERTY_WEIGHT = "weight";
|
||||||
|
@jakarta.annotation.Nullable
|
||||||
|
private Float weight = 7.89f;
|
||||||
|
|
||||||
|
public AllOfRefToFloat() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllOfRefToFloat weight(@jakarta.annotation.Nullable Float weight) {
|
||||||
|
this.weight = weight;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Weight as float
|
||||||
|
* @return weight
|
||||||
|
*/
|
||||||
|
@jakarta.annotation.Nullable
|
||||||
|
|
||||||
|
@JsonProperty(value = JSON_PROPERTY_WEIGHT, required = false)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
|
||||||
|
public Float getWeight() {
|
||||||
|
return weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@JsonProperty(value = JSON_PROPERTY_WEIGHT, required = false)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setWeight(@jakarta.annotation.Nullable Float weight) {
|
||||||
|
this.weight = weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if this AllOfRefToFloat object is equal to o.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
return EqualsBuilder.reflectionEquals(this, o, false, null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return HashCodeBuilder.reflectionHashCode(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class AllOfRefToFloat {\n");
|
||||||
|
sb.append(" weight: ").append(toIndentedString(weight)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Locale;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import org.openapitools.client.JSON;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Object with allOf ref to long
|
||||||
|
*/
|
||||||
|
@JsonPropertyOrder({
|
||||||
|
AllOfRefToLong.JSON_PROPERTY_ID
|
||||||
|
})
|
||||||
|
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0-SNAPSHOT")
|
||||||
|
public class AllOfRefToLong {
|
||||||
|
public static final String JSON_PROPERTY_ID = "id";
|
||||||
|
@jakarta.annotation.Nullable
|
||||||
|
private Long id = 10l;
|
||||||
|
|
||||||
|
public AllOfRefToLong() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllOfRefToLong id(@jakarta.annotation.Nullable Long id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Id as long
|
||||||
|
* @return id
|
||||||
|
*/
|
||||||
|
@jakarta.annotation.Nullable
|
||||||
|
|
||||||
|
@JsonProperty(value = JSON_PROPERTY_ID, required = false)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@JsonProperty(value = JSON_PROPERTY_ID, required = false)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setId(@jakarta.annotation.Nullable Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if this AllOfRefToLong object is equal to o.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
return EqualsBuilder.reflectionEquals(this, o, false, null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return HashCodeBuilder.reflectionHashCode(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class AllOfRefToLong {\n");
|
||||||
|
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToDouble
|
||||||
|
*/
|
||||||
|
public class AllOfRefToDoubleTest {
|
||||||
|
private final AllOfRefToDouble model = new AllOfRefToDouble();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToDouble
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testAllOfRefToDouble() {
|
||||||
|
// TODO: test AllOfRefToDouble
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'height'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void heightTest() {
|
||||||
|
// TODO: test height
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToFloat
|
||||||
|
*/
|
||||||
|
public class AllOfRefToFloatTest {
|
||||||
|
private final AllOfRefToFloat model = new AllOfRefToFloat();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToFloat
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testAllOfRefToFloat() {
|
||||||
|
// TODO: test AllOfRefToFloat
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'weight'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void weightTest() {
|
||||||
|
// TODO: test weight
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToLong
|
||||||
|
*/
|
||||||
|
public class AllOfRefToLongTest {
|
||||||
|
private final AllOfRefToLong model = new AllOfRefToLong();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToLong
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testAllOfRefToLong() {
|
||||||
|
// TODO: test AllOfRefToLong
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'id'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void idTest() {
|
||||||
|
// TODO: test id
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -6,6 +6,9 @@ api/openapi.yaml
|
|||||||
build.gradle
|
build.gradle
|
||||||
build.sbt
|
build.sbt
|
||||||
docs/AdditionalPropertiesClass.md
|
docs/AdditionalPropertiesClass.md
|
||||||
|
docs/AllOfRefToDouble.md
|
||||||
|
docs/AllOfRefToFloat.md
|
||||||
|
docs/AllOfRefToLong.md
|
||||||
docs/Animal.md
|
docs/Animal.md
|
||||||
docs/AnotherFakeApi.md
|
docs/AnotherFakeApi.md
|
||||||
docs/Apple.md
|
docs/Apple.md
|
||||||
@@ -116,6 +119,9 @@ src/main/java/org/openapitools/client/api/StoreApi.java
|
|||||||
src/main/java/org/openapitools/client/api/UserApi.java
|
src/main/java/org/openapitools/client/api/UserApi.java
|
||||||
src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java
|
src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java
|
||||||
src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
|
src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
|
||||||
|
src/main/java/org/openapitools/client/model/AllOfRefToDouble.java
|
||||||
|
src/main/java/org/openapitools/client/model/AllOfRefToFloat.java
|
||||||
|
src/main/java/org/openapitools/client/model/AllOfRefToLong.java
|
||||||
src/main/java/org/openapitools/client/model/Animal.java
|
src/main/java/org/openapitools/client/model/Animal.java
|
||||||
src/main/java/org/openapitools/client/model/Apple.java
|
src/main/java/org/openapitools/client/model/Apple.java
|
||||||
src/main/java/org/openapitools/client/model/AppleReq.java
|
src/main/java/org/openapitools/client/model/AppleReq.java
|
||||||
@@ -190,3 +196,6 @@ src/main/java/org/openapitools/client/model/TriangleInterface.java
|
|||||||
src/main/java/org/openapitools/client/model/User.java
|
src/main/java/org/openapitools/client/model/User.java
|
||||||
src/main/java/org/openapitools/client/model/Whale.java
|
src/main/java/org/openapitools/client/model/Whale.java
|
||||||
src/main/java/org/openapitools/client/model/Zebra.java
|
src/main/java/org/openapitools/client/model/Zebra.java
|
||||||
|
src/test/java/org/openapitools/client/model/AllOfRefToDoubleTest.java
|
||||||
|
src/test/java/org/openapitools/client/model/AllOfRefToFloatTest.java
|
||||||
|
src/test/java/org/openapitools/client/model/AllOfRefToLongTest.java
|
||||||
|
|||||||
@@ -201,6 +201,9 @@ Class | Method | HTTP request | Description
|
|||||||
## Documentation for Models
|
## Documentation for Models
|
||||||
|
|
||||||
- [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
|
- [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
|
||||||
|
- [AllOfRefToDouble](docs/AllOfRefToDouble.md)
|
||||||
|
- [AllOfRefToFloat](docs/AllOfRefToFloat.md)
|
||||||
|
- [AllOfRefToLong](docs/AllOfRefToLong.md)
|
||||||
- [Animal](docs/Animal.md)
|
- [Animal](docs/Animal.md)
|
||||||
- [Apple](docs/Apple.md)
|
- [Apple](docs/Apple.md)
|
||||||
- [AppleReq](docs/AppleReq.md)
|
- [AppleReq](docs/AppleReq.md)
|
||||||
|
|||||||
@@ -2295,6 +2295,42 @@ components:
|
|||||||
$ref: "#/components/schemas/Bar"
|
$ref: "#/components/schemas/Bar"
|
||||||
type: array
|
type: array
|
||||||
type: object
|
type: object
|
||||||
|
LongId:
|
||||||
|
description: Id as long
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
Weight:
|
||||||
|
description: Weight as float
|
||||||
|
format: float
|
||||||
|
type: number
|
||||||
|
Height:
|
||||||
|
description: Height as double
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
AllOfRefToLong:
|
||||||
|
description: Object with allOf ref to long
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
allOf:
|
||||||
|
- $ref: "#/components/schemas/LongId"
|
||||||
|
default: 10
|
||||||
|
type: object
|
||||||
|
AllOfRefToFloat:
|
||||||
|
description: Object with allOf ref to float
|
||||||
|
properties:
|
||||||
|
weight:
|
||||||
|
allOf:
|
||||||
|
- $ref: "#/components/schemas/Weight"
|
||||||
|
default: 7.89
|
||||||
|
type: object
|
||||||
|
AllOfRefToDouble:
|
||||||
|
description: Object with allOf ref to double
|
||||||
|
properties:
|
||||||
|
height:
|
||||||
|
allOf:
|
||||||
|
- $ref: "#/components/schemas/Height"
|
||||||
|
default: 32.1
|
||||||
|
type: object
|
||||||
_foo_get_default_response:
|
_foo_get_default_response:
|
||||||
example:
|
example:
|
||||||
string:
|
string:
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# AllOfRefToDouble
|
||||||
|
|
||||||
|
Object with allOf ref to double
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
| Name | Type | Description | Notes |
|
||||||
|
|------------ | ------------- | ------------- | -------------|
|
||||||
|
|**height** | **Double** | Height as double | [optional] |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# AllOfRefToFloat
|
||||||
|
|
||||||
|
Object with allOf ref to float
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
| Name | Type | Description | Notes |
|
||||||
|
|------------ | ------------- | ------------- | -------------|
|
||||||
|
|**weight** | **Float** | Weight as float | [optional] |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# AllOfRefToLong
|
||||||
|
|
||||||
|
Object with allOf ref to long
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
| Name | Type | Description | Notes |
|
||||||
|
|------------ | ------------- | ------------- | -------------|
|
||||||
|
|**id** | **Long** | Id as long | [optional] |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,152 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.StringJoiner;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Locale;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
|
|
||||||
|
|
||||||
|
import org.openapitools.client.ApiClient;
|
||||||
|
/**
|
||||||
|
* Object with allOf ref to double
|
||||||
|
*/
|
||||||
|
@JsonPropertyOrder({
|
||||||
|
AllOfRefToDouble.JSON_PROPERTY_HEIGHT
|
||||||
|
})
|
||||||
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0-SNAPSHOT")
|
||||||
|
public class AllOfRefToDouble {
|
||||||
|
public static final String JSON_PROPERTY_HEIGHT = "height";
|
||||||
|
@javax.annotation.Nullable
|
||||||
|
private Double height = 32.1d;
|
||||||
|
|
||||||
|
public AllOfRefToDouble() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllOfRefToDouble height(@javax.annotation.Nullable Double height) {
|
||||||
|
this.height = height;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Height as double
|
||||||
|
* @return height
|
||||||
|
*/
|
||||||
|
@javax.annotation.Nullable
|
||||||
|
@JsonProperty(value = JSON_PROPERTY_HEIGHT, required = false)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public Double getHeight() {
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@JsonProperty(value = JSON_PROPERTY_HEIGHT, required = false)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setHeight(@javax.annotation.Nullable Double height) {
|
||||||
|
this.height = height;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if this AllOfRefToDouble object is equal to o.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
AllOfRefToDouble allOfRefToDouble = (AllOfRefToDouble) o;
|
||||||
|
return Objects.equals(this.height, allOfRefToDouble.height);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(height);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class AllOfRefToDouble {\n");
|
||||||
|
sb.append(" height: ").append(toIndentedString(height)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the instance into URL query string.
|
||||||
|
*
|
||||||
|
* @return URL query string
|
||||||
|
*/
|
||||||
|
public String toUrlQueryString() {
|
||||||
|
return toUrlQueryString(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the instance into URL query string.
|
||||||
|
*
|
||||||
|
* @param prefix prefix of the query string
|
||||||
|
* @return URL query string
|
||||||
|
*/
|
||||||
|
public String toUrlQueryString(String prefix) {
|
||||||
|
String suffix = "";
|
||||||
|
String containerSuffix = "";
|
||||||
|
String containerPrefix = "";
|
||||||
|
if (prefix == null) {
|
||||||
|
// style=form, explode=true, e.g. /pet?name=cat&type=manx
|
||||||
|
prefix = "";
|
||||||
|
} else {
|
||||||
|
// deepObject style e.g. /pet?id[name]=cat&id[type]=manx
|
||||||
|
prefix = prefix + "[";
|
||||||
|
suffix = "]";
|
||||||
|
containerSuffix = "]";
|
||||||
|
containerPrefix = "[";
|
||||||
|
}
|
||||||
|
|
||||||
|
StringJoiner joiner = new StringJoiner("&");
|
||||||
|
|
||||||
|
// add `height` to the URL query string
|
||||||
|
if (getHeight() != null) {
|
||||||
|
joiner.add(String.format(Locale.ROOT, "%sheight%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getHeight()))));
|
||||||
|
}
|
||||||
|
|
||||||
|
return joiner.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,152 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.StringJoiner;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Locale;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
|
|
||||||
|
|
||||||
|
import org.openapitools.client.ApiClient;
|
||||||
|
/**
|
||||||
|
* Object with allOf ref to float
|
||||||
|
*/
|
||||||
|
@JsonPropertyOrder({
|
||||||
|
AllOfRefToFloat.JSON_PROPERTY_WEIGHT
|
||||||
|
})
|
||||||
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0-SNAPSHOT")
|
||||||
|
public class AllOfRefToFloat {
|
||||||
|
public static final String JSON_PROPERTY_WEIGHT = "weight";
|
||||||
|
@javax.annotation.Nullable
|
||||||
|
private Float weight = 7.89f;
|
||||||
|
|
||||||
|
public AllOfRefToFloat() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllOfRefToFloat weight(@javax.annotation.Nullable Float weight) {
|
||||||
|
this.weight = weight;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Weight as float
|
||||||
|
* @return weight
|
||||||
|
*/
|
||||||
|
@javax.annotation.Nullable
|
||||||
|
@JsonProperty(value = JSON_PROPERTY_WEIGHT, required = false)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public Float getWeight() {
|
||||||
|
return weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@JsonProperty(value = JSON_PROPERTY_WEIGHT, required = false)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setWeight(@javax.annotation.Nullable Float weight) {
|
||||||
|
this.weight = weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if this AllOfRefToFloat object is equal to o.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
AllOfRefToFloat allOfRefToFloat = (AllOfRefToFloat) o;
|
||||||
|
return Objects.equals(this.weight, allOfRefToFloat.weight);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(weight);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class AllOfRefToFloat {\n");
|
||||||
|
sb.append(" weight: ").append(toIndentedString(weight)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the instance into URL query string.
|
||||||
|
*
|
||||||
|
* @return URL query string
|
||||||
|
*/
|
||||||
|
public String toUrlQueryString() {
|
||||||
|
return toUrlQueryString(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the instance into URL query string.
|
||||||
|
*
|
||||||
|
* @param prefix prefix of the query string
|
||||||
|
* @return URL query string
|
||||||
|
*/
|
||||||
|
public String toUrlQueryString(String prefix) {
|
||||||
|
String suffix = "";
|
||||||
|
String containerSuffix = "";
|
||||||
|
String containerPrefix = "";
|
||||||
|
if (prefix == null) {
|
||||||
|
// style=form, explode=true, e.g. /pet?name=cat&type=manx
|
||||||
|
prefix = "";
|
||||||
|
} else {
|
||||||
|
// deepObject style e.g. /pet?id[name]=cat&id[type]=manx
|
||||||
|
prefix = prefix + "[";
|
||||||
|
suffix = "]";
|
||||||
|
containerSuffix = "]";
|
||||||
|
containerPrefix = "[";
|
||||||
|
}
|
||||||
|
|
||||||
|
StringJoiner joiner = new StringJoiner("&");
|
||||||
|
|
||||||
|
// add `weight` to the URL query string
|
||||||
|
if (getWeight() != null) {
|
||||||
|
joiner.add(String.format(Locale.ROOT, "%sweight%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWeight()))));
|
||||||
|
}
|
||||||
|
|
||||||
|
return joiner.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,152 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.StringJoiner;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Locale;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
|
|
||||||
|
|
||||||
|
import org.openapitools.client.ApiClient;
|
||||||
|
/**
|
||||||
|
* Object with allOf ref to long
|
||||||
|
*/
|
||||||
|
@JsonPropertyOrder({
|
||||||
|
AllOfRefToLong.JSON_PROPERTY_ID
|
||||||
|
})
|
||||||
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0-SNAPSHOT")
|
||||||
|
public class AllOfRefToLong {
|
||||||
|
public static final String JSON_PROPERTY_ID = "id";
|
||||||
|
@javax.annotation.Nullable
|
||||||
|
private Long id = 10l;
|
||||||
|
|
||||||
|
public AllOfRefToLong() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllOfRefToLong id(@javax.annotation.Nullable Long id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Id as long
|
||||||
|
* @return id
|
||||||
|
*/
|
||||||
|
@javax.annotation.Nullable
|
||||||
|
@JsonProperty(value = JSON_PROPERTY_ID, required = false)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@JsonProperty(value = JSON_PROPERTY_ID, required = false)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setId(@javax.annotation.Nullable Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if this AllOfRefToLong object is equal to o.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
AllOfRefToLong allOfRefToLong = (AllOfRefToLong) o;
|
||||||
|
return Objects.equals(this.id, allOfRefToLong.id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class AllOfRefToLong {\n");
|
||||||
|
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the instance into URL query string.
|
||||||
|
*
|
||||||
|
* @return URL query string
|
||||||
|
*/
|
||||||
|
public String toUrlQueryString() {
|
||||||
|
return toUrlQueryString(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the instance into URL query string.
|
||||||
|
*
|
||||||
|
* @param prefix prefix of the query string
|
||||||
|
* @return URL query string
|
||||||
|
*/
|
||||||
|
public String toUrlQueryString(String prefix) {
|
||||||
|
String suffix = "";
|
||||||
|
String containerSuffix = "";
|
||||||
|
String containerPrefix = "";
|
||||||
|
if (prefix == null) {
|
||||||
|
// style=form, explode=true, e.g. /pet?name=cat&type=manx
|
||||||
|
prefix = "";
|
||||||
|
} else {
|
||||||
|
// deepObject style e.g. /pet?id[name]=cat&id[type]=manx
|
||||||
|
prefix = prefix + "[";
|
||||||
|
suffix = "]";
|
||||||
|
containerSuffix = "]";
|
||||||
|
containerPrefix = "[";
|
||||||
|
}
|
||||||
|
|
||||||
|
StringJoiner joiner = new StringJoiner("&");
|
||||||
|
|
||||||
|
// add `id` to the URL query string
|
||||||
|
if (getId() != null) {
|
||||||
|
joiner.add(String.format(Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId()))));
|
||||||
|
}
|
||||||
|
|
||||||
|
return joiner.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToDouble
|
||||||
|
*/
|
||||||
|
class AllOfRefToDoubleTest {
|
||||||
|
private final AllOfRefToDouble model = new AllOfRefToDouble();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToDouble
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void testAllOfRefToDouble() {
|
||||||
|
// TODO: test AllOfRefToDouble
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'height'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void heightTest() {
|
||||||
|
// TODO: test height
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToFloat
|
||||||
|
*/
|
||||||
|
class AllOfRefToFloatTest {
|
||||||
|
private final AllOfRefToFloat model = new AllOfRefToFloat();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToFloat
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void testAllOfRefToFloat() {
|
||||||
|
// TODO: test AllOfRefToFloat
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'weight'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void weightTest() {
|
||||||
|
// TODO: test weight
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToLong
|
||||||
|
*/
|
||||||
|
class AllOfRefToLongTest {
|
||||||
|
private final AllOfRefToLong model = new AllOfRefToLong();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToLong
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void testAllOfRefToLong() {
|
||||||
|
// TODO: test AllOfRefToLong
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'id'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void idTest() {
|
||||||
|
// TODO: test id
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -6,6 +6,9 @@ api/openapi.yaml
|
|||||||
build.gradle
|
build.gradle
|
||||||
build.sbt
|
build.sbt
|
||||||
docs/AdditionalPropertiesClass.md
|
docs/AdditionalPropertiesClass.md
|
||||||
|
docs/AllOfRefToDouble.md
|
||||||
|
docs/AllOfRefToFloat.md
|
||||||
|
docs/AllOfRefToLong.md
|
||||||
docs/Animal.md
|
docs/Animal.md
|
||||||
docs/AnotherFakeApi.md
|
docs/AnotherFakeApi.md
|
||||||
docs/Apple.md
|
docs/Apple.md
|
||||||
@@ -116,6 +119,9 @@ src/main/java/org/openapitools/client/api/StoreApi.java
|
|||||||
src/main/java/org/openapitools/client/api/UserApi.java
|
src/main/java/org/openapitools/client/api/UserApi.java
|
||||||
src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java
|
src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java
|
||||||
src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
|
src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
|
||||||
|
src/main/java/org/openapitools/client/model/AllOfRefToDouble.java
|
||||||
|
src/main/java/org/openapitools/client/model/AllOfRefToFloat.java
|
||||||
|
src/main/java/org/openapitools/client/model/AllOfRefToLong.java
|
||||||
src/main/java/org/openapitools/client/model/Animal.java
|
src/main/java/org/openapitools/client/model/Animal.java
|
||||||
src/main/java/org/openapitools/client/model/Apple.java
|
src/main/java/org/openapitools/client/model/Apple.java
|
||||||
src/main/java/org/openapitools/client/model/AppleReq.java
|
src/main/java/org/openapitools/client/model/AppleReq.java
|
||||||
@@ -190,3 +196,6 @@ src/main/java/org/openapitools/client/model/TriangleInterface.java
|
|||||||
src/main/java/org/openapitools/client/model/User.java
|
src/main/java/org/openapitools/client/model/User.java
|
||||||
src/main/java/org/openapitools/client/model/Whale.java
|
src/main/java/org/openapitools/client/model/Whale.java
|
||||||
src/main/java/org/openapitools/client/model/Zebra.java
|
src/main/java/org/openapitools/client/model/Zebra.java
|
||||||
|
src/test/java/org/openapitools/client/model/AllOfRefToDoubleTest.java
|
||||||
|
src/test/java/org/openapitools/client/model/AllOfRefToFloatTest.java
|
||||||
|
src/test/java/org/openapitools/client/model/AllOfRefToLongTest.java
|
||||||
|
|||||||
@@ -200,6 +200,9 @@ Class | Method | HTTP request | Description
|
|||||||
## Documentation for Models
|
## Documentation for Models
|
||||||
|
|
||||||
- [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
|
- [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
|
||||||
|
- [AllOfRefToDouble](docs/AllOfRefToDouble.md)
|
||||||
|
- [AllOfRefToFloat](docs/AllOfRefToFloat.md)
|
||||||
|
- [AllOfRefToLong](docs/AllOfRefToLong.md)
|
||||||
- [Animal](docs/Animal.md)
|
- [Animal](docs/Animal.md)
|
||||||
- [Apple](docs/Apple.md)
|
- [Apple](docs/Apple.md)
|
||||||
- [AppleReq](docs/AppleReq.md)
|
- [AppleReq](docs/AppleReq.md)
|
||||||
|
|||||||
@@ -2295,6 +2295,42 @@ components:
|
|||||||
$ref: "#/components/schemas/Bar"
|
$ref: "#/components/schemas/Bar"
|
||||||
type: array
|
type: array
|
||||||
type: object
|
type: object
|
||||||
|
LongId:
|
||||||
|
description: Id as long
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
Weight:
|
||||||
|
description: Weight as float
|
||||||
|
format: float
|
||||||
|
type: number
|
||||||
|
Height:
|
||||||
|
description: Height as double
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
AllOfRefToLong:
|
||||||
|
description: Object with allOf ref to long
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
allOf:
|
||||||
|
- $ref: "#/components/schemas/LongId"
|
||||||
|
default: 10
|
||||||
|
type: object
|
||||||
|
AllOfRefToFloat:
|
||||||
|
description: Object with allOf ref to float
|
||||||
|
properties:
|
||||||
|
weight:
|
||||||
|
allOf:
|
||||||
|
- $ref: "#/components/schemas/Weight"
|
||||||
|
default: 7.89
|
||||||
|
type: object
|
||||||
|
AllOfRefToDouble:
|
||||||
|
description: Object with allOf ref to double
|
||||||
|
properties:
|
||||||
|
height:
|
||||||
|
allOf:
|
||||||
|
- $ref: "#/components/schemas/Height"
|
||||||
|
default: 32.1
|
||||||
|
type: object
|
||||||
_foo_get_default_response:
|
_foo_get_default_response:
|
||||||
example:
|
example:
|
||||||
string:
|
string:
|
||||||
|
|||||||
14
samples/client/petstore/java/native/docs/AllOfRefToDouble.md
Normal file
14
samples/client/petstore/java/native/docs/AllOfRefToDouble.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# AllOfRefToDouble
|
||||||
|
|
||||||
|
Object with allOf ref to double
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
| Name | Type | Description | Notes |
|
||||||
|
|------------ | ------------- | ------------- | -------------|
|
||||||
|
|**height** | **Double** | Height as double | [optional] |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
14
samples/client/petstore/java/native/docs/AllOfRefToFloat.md
Normal file
14
samples/client/petstore/java/native/docs/AllOfRefToFloat.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# AllOfRefToFloat
|
||||||
|
|
||||||
|
Object with allOf ref to float
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
| Name | Type | Description | Notes |
|
||||||
|
|------------ | ------------- | ------------- | -------------|
|
||||||
|
|**weight** | **Float** | Weight as float | [optional] |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
14
samples/client/petstore/java/native/docs/AllOfRefToLong.md
Normal file
14
samples/client/petstore/java/native/docs/AllOfRefToLong.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# AllOfRefToLong
|
||||||
|
|
||||||
|
Object with allOf ref to long
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
| Name | Type | Description | Notes |
|
||||||
|
|------------ | ------------- | ------------- | -------------|
|
||||||
|
|**id** | **Long** | Id as long | [optional] |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,201 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.StringJoiner;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Locale;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
|
|
||||||
|
|
||||||
|
import org.openapitools.client.ApiClient;
|
||||||
|
/**
|
||||||
|
* Object with allOf ref to double
|
||||||
|
*/
|
||||||
|
@JsonPropertyOrder({
|
||||||
|
AllOfRefToDouble.JSON_PROPERTY_HEIGHT
|
||||||
|
})
|
||||||
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0-SNAPSHOT")
|
||||||
|
public class AllOfRefToDouble {
|
||||||
|
public static final String JSON_PROPERTY_HEIGHT = "height";
|
||||||
|
@javax.annotation.Nullable
|
||||||
|
private Double height = 32.1d;
|
||||||
|
|
||||||
|
public AllOfRefToDouble() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllOfRefToDouble height(@javax.annotation.Nullable Double height) {
|
||||||
|
this.height = height;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Height as double
|
||||||
|
* @return height
|
||||||
|
*/
|
||||||
|
@javax.annotation.Nullable
|
||||||
|
@JsonProperty(value = JSON_PROPERTY_HEIGHT, required = false)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public Double getHeight() {
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@JsonProperty(value = JSON_PROPERTY_HEIGHT, required = false)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setHeight(@javax.annotation.Nullable Double height) {
|
||||||
|
this.height = height;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if this AllOfRefToDouble object is equal to o.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
return EqualsBuilder.reflectionEquals(this, o, false, null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return HashCodeBuilder.reflectionHashCode(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class AllOfRefToDouble {\n");
|
||||||
|
sb.append(" height: ").append(toIndentedString(height)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the instance into URL query string.
|
||||||
|
*
|
||||||
|
* @return URL query string
|
||||||
|
*/
|
||||||
|
public String toUrlQueryString() {
|
||||||
|
return toUrlQueryString(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the instance into URL query string.
|
||||||
|
*
|
||||||
|
* @param prefix prefix of the query string
|
||||||
|
* @return URL query string
|
||||||
|
*/
|
||||||
|
public String toUrlQueryString(String prefix) {
|
||||||
|
String suffix = "";
|
||||||
|
String containerSuffix = "";
|
||||||
|
String containerPrefix = "";
|
||||||
|
if (prefix == null) {
|
||||||
|
// style=form, explode=true, e.g. /pet?name=cat&type=manx
|
||||||
|
prefix = "";
|
||||||
|
} else {
|
||||||
|
// deepObject style e.g. /pet?id[name]=cat&id[type]=manx
|
||||||
|
prefix = prefix + "[";
|
||||||
|
suffix = "]";
|
||||||
|
containerSuffix = "]";
|
||||||
|
containerPrefix = "[";
|
||||||
|
}
|
||||||
|
|
||||||
|
StringJoiner joiner = new StringJoiner("&");
|
||||||
|
|
||||||
|
// add `height` to the URL query string
|
||||||
|
if (getHeight() != null) {
|
||||||
|
joiner.add(String.format(Locale.ROOT, "%sheight%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getHeight()))));
|
||||||
|
}
|
||||||
|
|
||||||
|
return joiner.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class Builder {
|
||||||
|
|
||||||
|
private AllOfRefToDouble instance;
|
||||||
|
|
||||||
|
public Builder() {
|
||||||
|
this(new AllOfRefToDouble());
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Builder(AllOfRefToDouble instance) {
|
||||||
|
this.instance = instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllOfRefToDouble.Builder height(Double height) {
|
||||||
|
this.instance.height = height;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* returns a built AllOfRefToDouble instance.
|
||||||
|
*
|
||||||
|
* The builder is not reusable.
|
||||||
|
*/
|
||||||
|
public AllOfRefToDouble build() {
|
||||||
|
try {
|
||||||
|
return this.instance;
|
||||||
|
} finally {
|
||||||
|
// ensure that this.instance is not reused
|
||||||
|
this.instance = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return getClass() + "=(" + instance + ")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a builder with no initialized field.
|
||||||
|
*/
|
||||||
|
public static AllOfRefToDouble.Builder builder() {
|
||||||
|
return new AllOfRefToDouble.Builder();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a builder with a shallow copy of this instance.
|
||||||
|
*/
|
||||||
|
public AllOfRefToDouble.Builder toBuilder() {
|
||||||
|
return new AllOfRefToDouble.Builder()
|
||||||
|
.height(getHeight());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,201 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.StringJoiner;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Locale;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
|
|
||||||
|
|
||||||
|
import org.openapitools.client.ApiClient;
|
||||||
|
/**
|
||||||
|
* Object with allOf ref to float
|
||||||
|
*/
|
||||||
|
@JsonPropertyOrder({
|
||||||
|
AllOfRefToFloat.JSON_PROPERTY_WEIGHT
|
||||||
|
})
|
||||||
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0-SNAPSHOT")
|
||||||
|
public class AllOfRefToFloat {
|
||||||
|
public static final String JSON_PROPERTY_WEIGHT = "weight";
|
||||||
|
@javax.annotation.Nullable
|
||||||
|
private Float weight = 7.89f;
|
||||||
|
|
||||||
|
public AllOfRefToFloat() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllOfRefToFloat weight(@javax.annotation.Nullable Float weight) {
|
||||||
|
this.weight = weight;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Weight as float
|
||||||
|
* @return weight
|
||||||
|
*/
|
||||||
|
@javax.annotation.Nullable
|
||||||
|
@JsonProperty(value = JSON_PROPERTY_WEIGHT, required = false)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public Float getWeight() {
|
||||||
|
return weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@JsonProperty(value = JSON_PROPERTY_WEIGHT, required = false)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setWeight(@javax.annotation.Nullable Float weight) {
|
||||||
|
this.weight = weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if this AllOfRefToFloat object is equal to o.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
return EqualsBuilder.reflectionEquals(this, o, false, null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return HashCodeBuilder.reflectionHashCode(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class AllOfRefToFloat {\n");
|
||||||
|
sb.append(" weight: ").append(toIndentedString(weight)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the instance into URL query string.
|
||||||
|
*
|
||||||
|
* @return URL query string
|
||||||
|
*/
|
||||||
|
public String toUrlQueryString() {
|
||||||
|
return toUrlQueryString(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the instance into URL query string.
|
||||||
|
*
|
||||||
|
* @param prefix prefix of the query string
|
||||||
|
* @return URL query string
|
||||||
|
*/
|
||||||
|
public String toUrlQueryString(String prefix) {
|
||||||
|
String suffix = "";
|
||||||
|
String containerSuffix = "";
|
||||||
|
String containerPrefix = "";
|
||||||
|
if (prefix == null) {
|
||||||
|
// style=form, explode=true, e.g. /pet?name=cat&type=manx
|
||||||
|
prefix = "";
|
||||||
|
} else {
|
||||||
|
// deepObject style e.g. /pet?id[name]=cat&id[type]=manx
|
||||||
|
prefix = prefix + "[";
|
||||||
|
suffix = "]";
|
||||||
|
containerSuffix = "]";
|
||||||
|
containerPrefix = "[";
|
||||||
|
}
|
||||||
|
|
||||||
|
StringJoiner joiner = new StringJoiner("&");
|
||||||
|
|
||||||
|
// add `weight` to the URL query string
|
||||||
|
if (getWeight() != null) {
|
||||||
|
joiner.add(String.format(Locale.ROOT, "%sweight%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getWeight()))));
|
||||||
|
}
|
||||||
|
|
||||||
|
return joiner.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class Builder {
|
||||||
|
|
||||||
|
private AllOfRefToFloat instance;
|
||||||
|
|
||||||
|
public Builder() {
|
||||||
|
this(new AllOfRefToFloat());
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Builder(AllOfRefToFloat instance) {
|
||||||
|
this.instance = instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllOfRefToFloat.Builder weight(Float weight) {
|
||||||
|
this.instance.weight = weight;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* returns a built AllOfRefToFloat instance.
|
||||||
|
*
|
||||||
|
* The builder is not reusable.
|
||||||
|
*/
|
||||||
|
public AllOfRefToFloat build() {
|
||||||
|
try {
|
||||||
|
return this.instance;
|
||||||
|
} finally {
|
||||||
|
// ensure that this.instance is not reused
|
||||||
|
this.instance = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return getClass() + "=(" + instance + ")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a builder with no initialized field.
|
||||||
|
*/
|
||||||
|
public static AllOfRefToFloat.Builder builder() {
|
||||||
|
return new AllOfRefToFloat.Builder();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a builder with a shallow copy of this instance.
|
||||||
|
*/
|
||||||
|
public AllOfRefToFloat.Builder toBuilder() {
|
||||||
|
return new AllOfRefToFloat.Builder()
|
||||||
|
.weight(getWeight());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,201 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.StringJoiner;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Locale;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
|
|
||||||
|
|
||||||
|
import org.openapitools.client.ApiClient;
|
||||||
|
/**
|
||||||
|
* Object with allOf ref to long
|
||||||
|
*/
|
||||||
|
@JsonPropertyOrder({
|
||||||
|
AllOfRefToLong.JSON_PROPERTY_ID
|
||||||
|
})
|
||||||
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0-SNAPSHOT")
|
||||||
|
public class AllOfRefToLong {
|
||||||
|
public static final String JSON_PROPERTY_ID = "id";
|
||||||
|
@javax.annotation.Nullable
|
||||||
|
private Long id = 10l;
|
||||||
|
|
||||||
|
public AllOfRefToLong() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllOfRefToLong id(@javax.annotation.Nullable Long id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Id as long
|
||||||
|
* @return id
|
||||||
|
*/
|
||||||
|
@javax.annotation.Nullable
|
||||||
|
@JsonProperty(value = JSON_PROPERTY_ID, required = false)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@JsonProperty(value = JSON_PROPERTY_ID, required = false)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setId(@javax.annotation.Nullable Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if this AllOfRefToLong object is equal to o.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
return EqualsBuilder.reflectionEquals(this, o, false, null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return HashCodeBuilder.reflectionHashCode(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class AllOfRefToLong {\n");
|
||||||
|
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the instance into URL query string.
|
||||||
|
*
|
||||||
|
* @return URL query string
|
||||||
|
*/
|
||||||
|
public String toUrlQueryString() {
|
||||||
|
return toUrlQueryString(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the instance into URL query string.
|
||||||
|
*
|
||||||
|
* @param prefix prefix of the query string
|
||||||
|
* @return URL query string
|
||||||
|
*/
|
||||||
|
public String toUrlQueryString(String prefix) {
|
||||||
|
String suffix = "";
|
||||||
|
String containerSuffix = "";
|
||||||
|
String containerPrefix = "";
|
||||||
|
if (prefix == null) {
|
||||||
|
// style=form, explode=true, e.g. /pet?name=cat&type=manx
|
||||||
|
prefix = "";
|
||||||
|
} else {
|
||||||
|
// deepObject style e.g. /pet?id[name]=cat&id[type]=manx
|
||||||
|
prefix = prefix + "[";
|
||||||
|
suffix = "]";
|
||||||
|
containerSuffix = "]";
|
||||||
|
containerPrefix = "[";
|
||||||
|
}
|
||||||
|
|
||||||
|
StringJoiner joiner = new StringJoiner("&");
|
||||||
|
|
||||||
|
// add `id` to the URL query string
|
||||||
|
if (getId() != null) {
|
||||||
|
joiner.add(String.format(Locale.ROOT, "%sid%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId()))));
|
||||||
|
}
|
||||||
|
|
||||||
|
return joiner.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class Builder {
|
||||||
|
|
||||||
|
private AllOfRefToLong instance;
|
||||||
|
|
||||||
|
public Builder() {
|
||||||
|
this(new AllOfRefToLong());
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Builder(AllOfRefToLong instance) {
|
||||||
|
this.instance = instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllOfRefToLong.Builder id(Long id) {
|
||||||
|
this.instance.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* returns a built AllOfRefToLong instance.
|
||||||
|
*
|
||||||
|
* The builder is not reusable.
|
||||||
|
*/
|
||||||
|
public AllOfRefToLong build() {
|
||||||
|
try {
|
||||||
|
return this.instance;
|
||||||
|
} finally {
|
||||||
|
// ensure that this.instance is not reused
|
||||||
|
this.instance = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return getClass() + "=(" + instance + ")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a builder with no initialized field.
|
||||||
|
*/
|
||||||
|
public static AllOfRefToLong.Builder builder() {
|
||||||
|
return new AllOfRefToLong.Builder();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a builder with a shallow copy of this instance.
|
||||||
|
*/
|
||||||
|
public AllOfRefToLong.Builder toBuilder() {
|
||||||
|
return new AllOfRefToLong.Builder()
|
||||||
|
.id(getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToDouble
|
||||||
|
*/
|
||||||
|
class AllOfRefToDoubleTest {
|
||||||
|
private final AllOfRefToDouble model = new AllOfRefToDouble();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToDouble
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void testAllOfRefToDouble() {
|
||||||
|
// TODO: test AllOfRefToDouble
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'height'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void heightTest() {
|
||||||
|
// TODO: test height
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToFloat
|
||||||
|
*/
|
||||||
|
class AllOfRefToFloatTest {
|
||||||
|
private final AllOfRefToFloat model = new AllOfRefToFloat();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToFloat
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void testAllOfRefToFloat() {
|
||||||
|
// TODO: test AllOfRefToFloat
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'weight'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void weightTest() {
|
||||||
|
// TODO: test weight
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToLong
|
||||||
|
*/
|
||||||
|
class AllOfRefToLongTest {
|
||||||
|
private final AllOfRefToLong model = new AllOfRefToLong();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToLong
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void testAllOfRefToLong() {
|
||||||
|
// TODO: test AllOfRefToLong
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'id'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
void idTest() {
|
||||||
|
// TODO: test id
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -11,6 +11,9 @@ docs/AllOfModelArrayAnyOfAllOfAttributes.md
|
|||||||
docs/AllOfModelArrayAnyOfAllOfAttributesC.md
|
docs/AllOfModelArrayAnyOfAllOfAttributesC.md
|
||||||
docs/AllOfModelArrayAnyOfAllOfLinkListColumn1.md
|
docs/AllOfModelArrayAnyOfAllOfLinkListColumn1.md
|
||||||
docs/AllOfModelArrayAnyOfAllOfLinkListColumn1Value.md
|
docs/AllOfModelArrayAnyOfAllOfLinkListColumn1Value.md
|
||||||
|
docs/AllOfRefToDouble.md
|
||||||
|
docs/AllOfRefToFloat.md
|
||||||
|
docs/AllOfRefToLong.md
|
||||||
docs/Animal.md
|
docs/Animal.md
|
||||||
docs/AnotherFakeApi.md
|
docs/AnotherFakeApi.md
|
||||||
docs/Apple.md
|
docs/Apple.md
|
||||||
@@ -161,6 +164,9 @@ src/main/java/org/openapitools/client/model/AllOfModelArrayAnyOfAllOfAttributes.
|
|||||||
src/main/java/org/openapitools/client/model/AllOfModelArrayAnyOfAllOfAttributesC.java
|
src/main/java/org/openapitools/client/model/AllOfModelArrayAnyOfAllOfAttributesC.java
|
||||||
src/main/java/org/openapitools/client/model/AllOfModelArrayAnyOfAllOfLinkListColumn1.java
|
src/main/java/org/openapitools/client/model/AllOfModelArrayAnyOfAllOfLinkListColumn1.java
|
||||||
src/main/java/org/openapitools/client/model/AllOfModelArrayAnyOfAllOfLinkListColumn1Value.java
|
src/main/java/org/openapitools/client/model/AllOfModelArrayAnyOfAllOfLinkListColumn1Value.java
|
||||||
|
src/main/java/org/openapitools/client/model/AllOfRefToDouble.java
|
||||||
|
src/main/java/org/openapitools/client/model/AllOfRefToFloat.java
|
||||||
|
src/main/java/org/openapitools/client/model/AllOfRefToLong.java
|
||||||
src/main/java/org/openapitools/client/model/Animal.java
|
src/main/java/org/openapitools/client/model/Animal.java
|
||||||
src/main/java/org/openapitools/client/model/Apple.java
|
src/main/java/org/openapitools/client/model/Apple.java
|
||||||
src/main/java/org/openapitools/client/model/AppleReq.java
|
src/main/java/org/openapitools/client/model/AppleReq.java
|
||||||
|
|||||||
@@ -177,6 +177,9 @@ Class | Method | HTTP request | Description
|
|||||||
- [AllOfModelArrayAnyOfAllOfAttributesC](docs/AllOfModelArrayAnyOfAllOfAttributesC.md)
|
- [AllOfModelArrayAnyOfAllOfAttributesC](docs/AllOfModelArrayAnyOfAllOfAttributesC.md)
|
||||||
- [AllOfModelArrayAnyOfAllOfLinkListColumn1](docs/AllOfModelArrayAnyOfAllOfLinkListColumn1.md)
|
- [AllOfModelArrayAnyOfAllOfLinkListColumn1](docs/AllOfModelArrayAnyOfAllOfLinkListColumn1.md)
|
||||||
- [AllOfModelArrayAnyOfAllOfLinkListColumn1Value](docs/AllOfModelArrayAnyOfAllOfLinkListColumn1Value.md)
|
- [AllOfModelArrayAnyOfAllOfLinkListColumn1Value](docs/AllOfModelArrayAnyOfAllOfLinkListColumn1Value.md)
|
||||||
|
- [AllOfRefToDouble](docs/AllOfRefToDouble.md)
|
||||||
|
- [AllOfRefToFloat](docs/AllOfRefToFloat.md)
|
||||||
|
- [AllOfRefToLong](docs/AllOfRefToLong.md)
|
||||||
- [Animal](docs/Animal.md)
|
- [Animal](docs/Animal.md)
|
||||||
- [Apple](docs/Apple.md)
|
- [Apple](docs/Apple.md)
|
||||||
- [AppleReq](docs/AppleReq.md)
|
- [AppleReq](docs/AppleReq.md)
|
||||||
|
|||||||
@@ -2941,6 +2941,42 @@ components:
|
|||||||
type: array
|
type: array
|
||||||
type: array
|
type: array
|
||||||
type: object
|
type: object
|
||||||
|
LongId:
|
||||||
|
description: Id as long
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
Weight:
|
||||||
|
description: Weight as float
|
||||||
|
format: float
|
||||||
|
type: number
|
||||||
|
Height:
|
||||||
|
description: Height as double
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
AllOfRefToLong:
|
||||||
|
description: Object with allOf ref to long
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
allOf:
|
||||||
|
- $ref: "#/components/schemas/LongId"
|
||||||
|
default: 10
|
||||||
|
type: object
|
||||||
|
AllOfRefToFloat:
|
||||||
|
description: Object with allOf ref to float
|
||||||
|
properties:
|
||||||
|
weight:
|
||||||
|
allOf:
|
||||||
|
- $ref: "#/components/schemas/Weight"
|
||||||
|
default: 7.89
|
||||||
|
type: object
|
||||||
|
AllOfRefToDouble:
|
||||||
|
description: Object with allOf ref to double
|
||||||
|
properties:
|
||||||
|
height:
|
||||||
|
allOf:
|
||||||
|
- $ref: "#/components/schemas/Height"
|
||||||
|
default: 32.1
|
||||||
|
type: object
|
||||||
_foo_get_default_response:
|
_foo_get_default_response:
|
||||||
example:
|
example:
|
||||||
string:
|
string:
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# AllOfRefToDouble
|
||||||
|
|
||||||
|
Object with allOf ref to double
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
| Name | Type | Description | Notes |
|
||||||
|
|------------ | ------------- | ------------- | -------------|
|
||||||
|
|**height** | **Double** | Height as double | [optional] |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# AllOfRefToFloat
|
||||||
|
|
||||||
|
Object with allOf ref to float
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
| Name | Type | Description | Notes |
|
||||||
|
|------------ | ------------- | ------------- | -------------|
|
||||||
|
|**weight** | **Float** | Weight as float | [optional] |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# AllOfRefToLong
|
||||||
|
|
||||||
|
Object with allOf ref to long
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
| Name | Type | Description | Notes |
|
||||||
|
|------------ | ------------- | ------------- | -------------|
|
||||||
|
|**id** | **Long** | Id as long | [optional] |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -250,6 +250,9 @@ public class JSON {
|
|||||||
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AllOfModelArrayAnyOfAllOfAttributesC.CustomTypeAdapterFactory());
|
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AllOfModelArrayAnyOfAllOfAttributesC.CustomTypeAdapterFactory());
|
||||||
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AllOfModelArrayAnyOfAllOfLinkListColumn1.CustomTypeAdapterFactory());
|
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AllOfModelArrayAnyOfAllOfLinkListColumn1.CustomTypeAdapterFactory());
|
||||||
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AllOfModelArrayAnyOfAllOfLinkListColumn1Value.CustomTypeAdapterFactory());
|
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AllOfModelArrayAnyOfAllOfLinkListColumn1Value.CustomTypeAdapterFactory());
|
||||||
|
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AllOfRefToDouble.CustomTypeAdapterFactory());
|
||||||
|
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AllOfRefToFloat.CustomTypeAdapterFactory());
|
||||||
|
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AllOfRefToLong.CustomTypeAdapterFactory());
|
||||||
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Apple.CustomTypeAdapterFactory());
|
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Apple.CustomTypeAdapterFactory());
|
||||||
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AppleReq.CustomTypeAdapterFactory());
|
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AppleReq.CustomTypeAdapterFactory());
|
||||||
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayAnyOf.CustomTypeAdapterFactory());
|
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayAnyOf.CustomTypeAdapterFactory());
|
||||||
|
|||||||
@@ -0,0 +1,285 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Locale;
|
||||||
|
import com.google.gson.TypeAdapter;
|
||||||
|
import com.google.gson.annotations.JsonAdapter;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import com.google.gson.stream.JsonReader;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.GsonBuilder;
|
||||||
|
import com.google.gson.JsonArray;
|
||||||
|
import com.google.gson.JsonDeserializationContext;
|
||||||
|
import com.google.gson.JsonDeserializer;
|
||||||
|
import com.google.gson.JsonElement;
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import com.google.gson.JsonParseException;
|
||||||
|
import com.google.gson.TypeAdapterFactory;
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
import com.google.gson.TypeAdapter;
|
||||||
|
import com.google.gson.stream.JsonReader;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
import org.openapitools.client.JSON;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Object with allOf ref to double
|
||||||
|
*/
|
||||||
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0-SNAPSHOT")
|
||||||
|
public class AllOfRefToDouble {
|
||||||
|
public static final String SERIALIZED_NAME_HEIGHT = "height";
|
||||||
|
@SerializedName(SERIALIZED_NAME_HEIGHT)
|
||||||
|
@javax.annotation.Nullable
|
||||||
|
private Double height = 32.1d;
|
||||||
|
|
||||||
|
public AllOfRefToDouble() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllOfRefToDouble height(@javax.annotation.Nullable Double height) {
|
||||||
|
this.height = height;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Height as double
|
||||||
|
* @return height
|
||||||
|
*/
|
||||||
|
@javax.annotation.Nullable
|
||||||
|
public Double getHeight() {
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHeight(@javax.annotation.Nullable Double height) {
|
||||||
|
this.height = height;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A container for additional, undeclared properties.
|
||||||
|
* This is a holder for any undeclared properties as specified with
|
||||||
|
* the 'additionalProperties' keyword in the OAS document.
|
||||||
|
*/
|
||||||
|
private Map<String, Object> additionalProperties;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the additional (undeclared) property with the specified name and value.
|
||||||
|
* If the property does not already exist, create it otherwise replace it.
|
||||||
|
*
|
||||||
|
* @param key name of the property
|
||||||
|
* @param value value of the property
|
||||||
|
* @return the AllOfRefToDouble instance itself
|
||||||
|
*/
|
||||||
|
public AllOfRefToDouble putAdditionalProperty(String key, Object value) {
|
||||||
|
if (this.additionalProperties == null) {
|
||||||
|
this.additionalProperties = new HashMap<String, Object>();
|
||||||
|
}
|
||||||
|
this.additionalProperties.put(key, value);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the additional (undeclared) property.
|
||||||
|
*
|
||||||
|
* @return a map of objects
|
||||||
|
*/
|
||||||
|
public Map<String, Object> getAdditionalProperties() {
|
||||||
|
return additionalProperties;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the additional (undeclared) property with the specified name.
|
||||||
|
*
|
||||||
|
* @param key name of the property
|
||||||
|
* @return an object
|
||||||
|
*/
|
||||||
|
public Object getAdditionalProperty(String key) {
|
||||||
|
if (this.additionalProperties == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return this.additionalProperties.get(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
AllOfRefToDouble allOfRefToDouble = (AllOfRefToDouble) o;
|
||||||
|
return Objects.equals(this.height, allOfRefToDouble.height)&&
|
||||||
|
Objects.equals(this.additionalProperties, allOfRefToDouble.additionalProperties);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(height, additionalProperties);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class AllOfRefToDouble {\n");
|
||||||
|
sb.append(" height: ").append(toIndentedString(height)).append("\n");
|
||||||
|
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static HashSet<String> openapiFields;
|
||||||
|
public static HashSet<String> openapiRequiredFields;
|
||||||
|
|
||||||
|
static {
|
||||||
|
// a set of all properties/fields (JSON key names)
|
||||||
|
openapiFields = new HashSet<String>(Arrays.asList("height"));
|
||||||
|
|
||||||
|
// a set of required properties/fields (JSON key names)
|
||||||
|
openapiRequiredFields = new HashSet<String>(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validates the JSON Element and throws an exception if issues found
|
||||||
|
*
|
||||||
|
* @param jsonElement JSON Element
|
||||||
|
* @throws IOException if the JSON Element is invalid with respect to AllOfRefToDouble
|
||||||
|
*/
|
||||||
|
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
|
||||||
|
if (jsonElement == null) {
|
||||||
|
if (!AllOfRefToDouble.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
|
||||||
|
throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AllOfRefToDouble is not found in the empty JSON string", AllOfRefToDouble.openapiRequiredFields.toString()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
JsonObject jsonObj = jsonElement.getAsJsonObject();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
@Override
|
||||||
|
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
||||||
|
if (!AllOfRefToDouble.class.isAssignableFrom(type.getRawType())) {
|
||||||
|
return null; // this class only serializes 'AllOfRefToDouble' and its subtypes
|
||||||
|
}
|
||||||
|
final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
|
||||||
|
final TypeAdapter<AllOfRefToDouble> thisAdapter
|
||||||
|
= gson.getDelegateAdapter(this, TypeToken.get(AllOfRefToDouble.class));
|
||||||
|
|
||||||
|
return (TypeAdapter<T>) new TypeAdapter<AllOfRefToDouble>() {
|
||||||
|
@Override
|
||||||
|
public void write(JsonWriter out, AllOfRefToDouble value) throws IOException {
|
||||||
|
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
|
||||||
|
obj.remove("additionalProperties");
|
||||||
|
// serialize additional properties
|
||||||
|
if (value.getAdditionalProperties() != null) {
|
||||||
|
for (Map.Entry<String, Object> entry : value.getAdditionalProperties().entrySet()) {
|
||||||
|
if (entry.getValue() instanceof String)
|
||||||
|
obj.addProperty(entry.getKey(), (String) entry.getValue());
|
||||||
|
else if (entry.getValue() instanceof Number)
|
||||||
|
obj.addProperty(entry.getKey(), (Number) entry.getValue());
|
||||||
|
else if (entry.getValue() instanceof Boolean)
|
||||||
|
obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
|
||||||
|
else if (entry.getValue() instanceof Character)
|
||||||
|
obj.addProperty(entry.getKey(), (Character) entry.getValue());
|
||||||
|
else {
|
||||||
|
JsonElement jsonElement = gson.toJsonTree(entry.getValue());
|
||||||
|
if (jsonElement.isJsonArray()) {
|
||||||
|
obj.add(entry.getKey(), jsonElement.getAsJsonArray());
|
||||||
|
} else {
|
||||||
|
obj.add(entry.getKey(), jsonElement.getAsJsonObject());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elementAdapter.write(out, obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AllOfRefToDouble read(JsonReader in) throws IOException {
|
||||||
|
JsonElement jsonElement = elementAdapter.read(in);
|
||||||
|
validateJsonElement(jsonElement);
|
||||||
|
JsonObject jsonObj = jsonElement.getAsJsonObject();
|
||||||
|
// store additional fields in the deserialized instance
|
||||||
|
AllOfRefToDouble instance = thisAdapter.fromJsonTree(jsonObj);
|
||||||
|
for (Map.Entry<String, JsonElement> entry : jsonObj.entrySet()) {
|
||||||
|
if (!openapiFields.contains(entry.getKey())) {
|
||||||
|
if (entry.getValue().isJsonPrimitive()) { // primitive type
|
||||||
|
if (entry.getValue().getAsJsonPrimitive().isString())
|
||||||
|
instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
|
||||||
|
else if (entry.getValue().getAsJsonPrimitive().isNumber())
|
||||||
|
instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
|
||||||
|
else if (entry.getValue().getAsJsonPrimitive().isBoolean())
|
||||||
|
instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
|
||||||
|
else
|
||||||
|
throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
|
||||||
|
} else if (entry.getValue().isJsonArray()) {
|
||||||
|
instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
|
||||||
|
} else { // JSON object
|
||||||
|
instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
}.nullSafe();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an instance of AllOfRefToDouble given an JSON string
|
||||||
|
*
|
||||||
|
* @param jsonString JSON string
|
||||||
|
* @return An instance of AllOfRefToDouble
|
||||||
|
* @throws IOException if the JSON string is invalid with respect to AllOfRefToDouble
|
||||||
|
*/
|
||||||
|
public static AllOfRefToDouble fromJson(String jsonString) throws IOException {
|
||||||
|
return JSON.getGson().fromJson(jsonString, AllOfRefToDouble.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert an instance of AllOfRefToDouble to an JSON string
|
||||||
|
*
|
||||||
|
* @return JSON string
|
||||||
|
*/
|
||||||
|
public String toJson() {
|
||||||
|
return JSON.getGson().toJson(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,285 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Locale;
|
||||||
|
import com.google.gson.TypeAdapter;
|
||||||
|
import com.google.gson.annotations.JsonAdapter;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import com.google.gson.stream.JsonReader;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.GsonBuilder;
|
||||||
|
import com.google.gson.JsonArray;
|
||||||
|
import com.google.gson.JsonDeserializationContext;
|
||||||
|
import com.google.gson.JsonDeserializer;
|
||||||
|
import com.google.gson.JsonElement;
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import com.google.gson.JsonParseException;
|
||||||
|
import com.google.gson.TypeAdapterFactory;
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
import com.google.gson.TypeAdapter;
|
||||||
|
import com.google.gson.stream.JsonReader;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
import org.openapitools.client.JSON;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Object with allOf ref to float
|
||||||
|
*/
|
||||||
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0-SNAPSHOT")
|
||||||
|
public class AllOfRefToFloat {
|
||||||
|
public static final String SERIALIZED_NAME_WEIGHT = "weight";
|
||||||
|
@SerializedName(SERIALIZED_NAME_WEIGHT)
|
||||||
|
@javax.annotation.Nullable
|
||||||
|
private Float weight = 7.89f;
|
||||||
|
|
||||||
|
public AllOfRefToFloat() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllOfRefToFloat weight(@javax.annotation.Nullable Float weight) {
|
||||||
|
this.weight = weight;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Weight as float
|
||||||
|
* @return weight
|
||||||
|
*/
|
||||||
|
@javax.annotation.Nullable
|
||||||
|
public Float getWeight() {
|
||||||
|
return weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWeight(@javax.annotation.Nullable Float weight) {
|
||||||
|
this.weight = weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A container for additional, undeclared properties.
|
||||||
|
* This is a holder for any undeclared properties as specified with
|
||||||
|
* the 'additionalProperties' keyword in the OAS document.
|
||||||
|
*/
|
||||||
|
private Map<String, Object> additionalProperties;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the additional (undeclared) property with the specified name and value.
|
||||||
|
* If the property does not already exist, create it otherwise replace it.
|
||||||
|
*
|
||||||
|
* @param key name of the property
|
||||||
|
* @param value value of the property
|
||||||
|
* @return the AllOfRefToFloat instance itself
|
||||||
|
*/
|
||||||
|
public AllOfRefToFloat putAdditionalProperty(String key, Object value) {
|
||||||
|
if (this.additionalProperties == null) {
|
||||||
|
this.additionalProperties = new HashMap<String, Object>();
|
||||||
|
}
|
||||||
|
this.additionalProperties.put(key, value);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the additional (undeclared) property.
|
||||||
|
*
|
||||||
|
* @return a map of objects
|
||||||
|
*/
|
||||||
|
public Map<String, Object> getAdditionalProperties() {
|
||||||
|
return additionalProperties;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the additional (undeclared) property with the specified name.
|
||||||
|
*
|
||||||
|
* @param key name of the property
|
||||||
|
* @return an object
|
||||||
|
*/
|
||||||
|
public Object getAdditionalProperty(String key) {
|
||||||
|
if (this.additionalProperties == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return this.additionalProperties.get(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
AllOfRefToFloat allOfRefToFloat = (AllOfRefToFloat) o;
|
||||||
|
return Objects.equals(this.weight, allOfRefToFloat.weight)&&
|
||||||
|
Objects.equals(this.additionalProperties, allOfRefToFloat.additionalProperties);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(weight, additionalProperties);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class AllOfRefToFloat {\n");
|
||||||
|
sb.append(" weight: ").append(toIndentedString(weight)).append("\n");
|
||||||
|
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static HashSet<String> openapiFields;
|
||||||
|
public static HashSet<String> openapiRequiredFields;
|
||||||
|
|
||||||
|
static {
|
||||||
|
// a set of all properties/fields (JSON key names)
|
||||||
|
openapiFields = new HashSet<String>(Arrays.asList("weight"));
|
||||||
|
|
||||||
|
// a set of required properties/fields (JSON key names)
|
||||||
|
openapiRequiredFields = new HashSet<String>(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validates the JSON Element and throws an exception if issues found
|
||||||
|
*
|
||||||
|
* @param jsonElement JSON Element
|
||||||
|
* @throws IOException if the JSON Element is invalid with respect to AllOfRefToFloat
|
||||||
|
*/
|
||||||
|
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
|
||||||
|
if (jsonElement == null) {
|
||||||
|
if (!AllOfRefToFloat.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
|
||||||
|
throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AllOfRefToFloat is not found in the empty JSON string", AllOfRefToFloat.openapiRequiredFields.toString()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
JsonObject jsonObj = jsonElement.getAsJsonObject();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
@Override
|
||||||
|
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
||||||
|
if (!AllOfRefToFloat.class.isAssignableFrom(type.getRawType())) {
|
||||||
|
return null; // this class only serializes 'AllOfRefToFloat' and its subtypes
|
||||||
|
}
|
||||||
|
final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
|
||||||
|
final TypeAdapter<AllOfRefToFloat> thisAdapter
|
||||||
|
= gson.getDelegateAdapter(this, TypeToken.get(AllOfRefToFloat.class));
|
||||||
|
|
||||||
|
return (TypeAdapter<T>) new TypeAdapter<AllOfRefToFloat>() {
|
||||||
|
@Override
|
||||||
|
public void write(JsonWriter out, AllOfRefToFloat value) throws IOException {
|
||||||
|
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
|
||||||
|
obj.remove("additionalProperties");
|
||||||
|
// serialize additional properties
|
||||||
|
if (value.getAdditionalProperties() != null) {
|
||||||
|
for (Map.Entry<String, Object> entry : value.getAdditionalProperties().entrySet()) {
|
||||||
|
if (entry.getValue() instanceof String)
|
||||||
|
obj.addProperty(entry.getKey(), (String) entry.getValue());
|
||||||
|
else if (entry.getValue() instanceof Number)
|
||||||
|
obj.addProperty(entry.getKey(), (Number) entry.getValue());
|
||||||
|
else if (entry.getValue() instanceof Boolean)
|
||||||
|
obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
|
||||||
|
else if (entry.getValue() instanceof Character)
|
||||||
|
obj.addProperty(entry.getKey(), (Character) entry.getValue());
|
||||||
|
else {
|
||||||
|
JsonElement jsonElement = gson.toJsonTree(entry.getValue());
|
||||||
|
if (jsonElement.isJsonArray()) {
|
||||||
|
obj.add(entry.getKey(), jsonElement.getAsJsonArray());
|
||||||
|
} else {
|
||||||
|
obj.add(entry.getKey(), jsonElement.getAsJsonObject());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elementAdapter.write(out, obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AllOfRefToFloat read(JsonReader in) throws IOException {
|
||||||
|
JsonElement jsonElement = elementAdapter.read(in);
|
||||||
|
validateJsonElement(jsonElement);
|
||||||
|
JsonObject jsonObj = jsonElement.getAsJsonObject();
|
||||||
|
// store additional fields in the deserialized instance
|
||||||
|
AllOfRefToFloat instance = thisAdapter.fromJsonTree(jsonObj);
|
||||||
|
for (Map.Entry<String, JsonElement> entry : jsonObj.entrySet()) {
|
||||||
|
if (!openapiFields.contains(entry.getKey())) {
|
||||||
|
if (entry.getValue().isJsonPrimitive()) { // primitive type
|
||||||
|
if (entry.getValue().getAsJsonPrimitive().isString())
|
||||||
|
instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
|
||||||
|
else if (entry.getValue().getAsJsonPrimitive().isNumber())
|
||||||
|
instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
|
||||||
|
else if (entry.getValue().getAsJsonPrimitive().isBoolean())
|
||||||
|
instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
|
||||||
|
else
|
||||||
|
throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
|
||||||
|
} else if (entry.getValue().isJsonArray()) {
|
||||||
|
instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
|
||||||
|
} else { // JSON object
|
||||||
|
instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
}.nullSafe();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an instance of AllOfRefToFloat given an JSON string
|
||||||
|
*
|
||||||
|
* @param jsonString JSON string
|
||||||
|
* @return An instance of AllOfRefToFloat
|
||||||
|
* @throws IOException if the JSON string is invalid with respect to AllOfRefToFloat
|
||||||
|
*/
|
||||||
|
public static AllOfRefToFloat fromJson(String jsonString) throws IOException {
|
||||||
|
return JSON.getGson().fromJson(jsonString, AllOfRefToFloat.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert an instance of AllOfRefToFloat to an JSON string
|
||||||
|
*
|
||||||
|
* @return JSON string
|
||||||
|
*/
|
||||||
|
public String toJson() {
|
||||||
|
return JSON.getGson().toJson(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,285 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Locale;
|
||||||
|
import com.google.gson.TypeAdapter;
|
||||||
|
import com.google.gson.annotations.JsonAdapter;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import com.google.gson.stream.JsonReader;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.GsonBuilder;
|
||||||
|
import com.google.gson.JsonArray;
|
||||||
|
import com.google.gson.JsonDeserializationContext;
|
||||||
|
import com.google.gson.JsonDeserializer;
|
||||||
|
import com.google.gson.JsonElement;
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import com.google.gson.JsonParseException;
|
||||||
|
import com.google.gson.TypeAdapterFactory;
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
import com.google.gson.TypeAdapter;
|
||||||
|
import com.google.gson.stream.JsonReader;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
import org.openapitools.client.JSON;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Object with allOf ref to long
|
||||||
|
*/
|
||||||
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0-SNAPSHOT")
|
||||||
|
public class AllOfRefToLong {
|
||||||
|
public static final String SERIALIZED_NAME_ID = "id";
|
||||||
|
@SerializedName(SERIALIZED_NAME_ID)
|
||||||
|
@javax.annotation.Nullable
|
||||||
|
private Long id = 10l;
|
||||||
|
|
||||||
|
public AllOfRefToLong() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllOfRefToLong id(@javax.annotation.Nullable Long id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Id as long
|
||||||
|
* @return id
|
||||||
|
*/
|
||||||
|
@javax.annotation.Nullable
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(@javax.annotation.Nullable Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A container for additional, undeclared properties.
|
||||||
|
* This is a holder for any undeclared properties as specified with
|
||||||
|
* the 'additionalProperties' keyword in the OAS document.
|
||||||
|
*/
|
||||||
|
private Map<String, Object> additionalProperties;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the additional (undeclared) property with the specified name and value.
|
||||||
|
* If the property does not already exist, create it otherwise replace it.
|
||||||
|
*
|
||||||
|
* @param key name of the property
|
||||||
|
* @param value value of the property
|
||||||
|
* @return the AllOfRefToLong instance itself
|
||||||
|
*/
|
||||||
|
public AllOfRefToLong putAdditionalProperty(String key, Object value) {
|
||||||
|
if (this.additionalProperties == null) {
|
||||||
|
this.additionalProperties = new HashMap<String, Object>();
|
||||||
|
}
|
||||||
|
this.additionalProperties.put(key, value);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the additional (undeclared) property.
|
||||||
|
*
|
||||||
|
* @return a map of objects
|
||||||
|
*/
|
||||||
|
public Map<String, Object> getAdditionalProperties() {
|
||||||
|
return additionalProperties;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the additional (undeclared) property with the specified name.
|
||||||
|
*
|
||||||
|
* @param key name of the property
|
||||||
|
* @return an object
|
||||||
|
*/
|
||||||
|
public Object getAdditionalProperty(String key) {
|
||||||
|
if (this.additionalProperties == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return this.additionalProperties.get(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
AllOfRefToLong allOfRefToLong = (AllOfRefToLong) o;
|
||||||
|
return Objects.equals(this.id, allOfRefToLong.id)&&
|
||||||
|
Objects.equals(this.additionalProperties, allOfRefToLong.additionalProperties);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(id, additionalProperties);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class AllOfRefToLong {\n");
|
||||||
|
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||||
|
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static HashSet<String> openapiFields;
|
||||||
|
public static HashSet<String> openapiRequiredFields;
|
||||||
|
|
||||||
|
static {
|
||||||
|
// a set of all properties/fields (JSON key names)
|
||||||
|
openapiFields = new HashSet<String>(Arrays.asList("id"));
|
||||||
|
|
||||||
|
// a set of required properties/fields (JSON key names)
|
||||||
|
openapiRequiredFields = new HashSet<String>(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validates the JSON Element and throws an exception if issues found
|
||||||
|
*
|
||||||
|
* @param jsonElement JSON Element
|
||||||
|
* @throws IOException if the JSON Element is invalid with respect to AllOfRefToLong
|
||||||
|
*/
|
||||||
|
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
|
||||||
|
if (jsonElement == null) {
|
||||||
|
if (!AllOfRefToLong.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
|
||||||
|
throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AllOfRefToLong is not found in the empty JSON string", AllOfRefToLong.openapiRequiredFields.toString()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
JsonObject jsonObj = jsonElement.getAsJsonObject();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
@Override
|
||||||
|
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
||||||
|
if (!AllOfRefToLong.class.isAssignableFrom(type.getRawType())) {
|
||||||
|
return null; // this class only serializes 'AllOfRefToLong' and its subtypes
|
||||||
|
}
|
||||||
|
final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
|
||||||
|
final TypeAdapter<AllOfRefToLong> thisAdapter
|
||||||
|
= gson.getDelegateAdapter(this, TypeToken.get(AllOfRefToLong.class));
|
||||||
|
|
||||||
|
return (TypeAdapter<T>) new TypeAdapter<AllOfRefToLong>() {
|
||||||
|
@Override
|
||||||
|
public void write(JsonWriter out, AllOfRefToLong value) throws IOException {
|
||||||
|
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
|
||||||
|
obj.remove("additionalProperties");
|
||||||
|
// serialize additional properties
|
||||||
|
if (value.getAdditionalProperties() != null) {
|
||||||
|
for (Map.Entry<String, Object> entry : value.getAdditionalProperties().entrySet()) {
|
||||||
|
if (entry.getValue() instanceof String)
|
||||||
|
obj.addProperty(entry.getKey(), (String) entry.getValue());
|
||||||
|
else if (entry.getValue() instanceof Number)
|
||||||
|
obj.addProperty(entry.getKey(), (Number) entry.getValue());
|
||||||
|
else if (entry.getValue() instanceof Boolean)
|
||||||
|
obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
|
||||||
|
else if (entry.getValue() instanceof Character)
|
||||||
|
obj.addProperty(entry.getKey(), (Character) entry.getValue());
|
||||||
|
else {
|
||||||
|
JsonElement jsonElement = gson.toJsonTree(entry.getValue());
|
||||||
|
if (jsonElement.isJsonArray()) {
|
||||||
|
obj.add(entry.getKey(), jsonElement.getAsJsonArray());
|
||||||
|
} else {
|
||||||
|
obj.add(entry.getKey(), jsonElement.getAsJsonObject());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elementAdapter.write(out, obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AllOfRefToLong read(JsonReader in) throws IOException {
|
||||||
|
JsonElement jsonElement = elementAdapter.read(in);
|
||||||
|
validateJsonElement(jsonElement);
|
||||||
|
JsonObject jsonObj = jsonElement.getAsJsonObject();
|
||||||
|
// store additional fields in the deserialized instance
|
||||||
|
AllOfRefToLong instance = thisAdapter.fromJsonTree(jsonObj);
|
||||||
|
for (Map.Entry<String, JsonElement> entry : jsonObj.entrySet()) {
|
||||||
|
if (!openapiFields.contains(entry.getKey())) {
|
||||||
|
if (entry.getValue().isJsonPrimitive()) { // primitive type
|
||||||
|
if (entry.getValue().getAsJsonPrimitive().isString())
|
||||||
|
instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
|
||||||
|
else if (entry.getValue().getAsJsonPrimitive().isNumber())
|
||||||
|
instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
|
||||||
|
else if (entry.getValue().getAsJsonPrimitive().isBoolean())
|
||||||
|
instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
|
||||||
|
else
|
||||||
|
throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
|
||||||
|
} else if (entry.getValue().isJsonArray()) {
|
||||||
|
instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
|
||||||
|
} else { // JSON object
|
||||||
|
instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
}.nullSafe();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an instance of AllOfRefToLong given an JSON string
|
||||||
|
*
|
||||||
|
* @param jsonString JSON string
|
||||||
|
* @return An instance of AllOfRefToLong
|
||||||
|
* @throws IOException if the JSON string is invalid with respect to AllOfRefToLong
|
||||||
|
*/
|
||||||
|
public static AllOfRefToLong fromJson(String jsonString) throws IOException {
|
||||||
|
return JSON.getGson().fromJson(jsonString, AllOfRefToLong.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert an instance of AllOfRefToLong to an JSON string
|
||||||
|
*
|
||||||
|
* @return JSON string
|
||||||
|
*/
|
||||||
|
public String toJson() {
|
||||||
|
return JSON.getGson().toJson(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import com.google.gson.TypeAdapter;
|
||||||
|
import com.google.gson.annotations.JsonAdapter;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import com.google.gson.stream.JsonReader;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToDouble
|
||||||
|
*/
|
||||||
|
public class AllOfRefToDoubleTest {
|
||||||
|
private final AllOfRefToDouble model = new AllOfRefToDouble();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToDouble
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testAllOfRefToDouble() {
|
||||||
|
// TODO: test AllOfRefToDouble
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'height'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void heightTest() {
|
||||||
|
// TODO: test height
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import com.google.gson.TypeAdapter;
|
||||||
|
import com.google.gson.annotations.JsonAdapter;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import com.google.gson.stream.JsonReader;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToFloat
|
||||||
|
*/
|
||||||
|
public class AllOfRefToFloatTest {
|
||||||
|
private final AllOfRefToFloat model = new AllOfRefToFloat();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToFloat
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testAllOfRefToFloat() {
|
||||||
|
// TODO: test AllOfRefToFloat
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'weight'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void weightTest() {
|
||||||
|
// TODO: test weight
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import com.google.gson.TypeAdapter;
|
||||||
|
import com.google.gson.annotations.JsonAdapter;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import com.google.gson.stream.JsonReader;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToLong
|
||||||
|
*/
|
||||||
|
public class AllOfRefToLongTest {
|
||||||
|
private final AllOfRefToLong model = new AllOfRefToLong();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToLong
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testAllOfRefToLong() {
|
||||||
|
// TODO: test AllOfRefToLong
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'id'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void idTest() {
|
||||||
|
// TODO: test id
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -6,6 +6,9 @@ api/openapi.yaml
|
|||||||
build.gradle
|
build.gradle
|
||||||
build.sbt
|
build.sbt
|
||||||
docs/AdditionalPropertiesClass.md
|
docs/AdditionalPropertiesClass.md
|
||||||
|
docs/AllOfRefToDouble.md
|
||||||
|
docs/AllOfRefToFloat.md
|
||||||
|
docs/AllOfRefToLong.md
|
||||||
docs/Animal.md
|
docs/Animal.md
|
||||||
docs/AnotherFakeApi.md
|
docs/AnotherFakeApi.md
|
||||||
docs/Apple.md
|
docs/Apple.md
|
||||||
@@ -125,6 +128,9 @@ src/main/java/org/openapitools/client/auth/OAuth.java
|
|||||||
src/main/java/org/openapitools/client/auth/OAuthFlow.java
|
src/main/java/org/openapitools/client/auth/OAuthFlow.java
|
||||||
src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java
|
src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java
|
||||||
src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
|
src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
|
||||||
|
src/main/java/org/openapitools/client/model/AllOfRefToDouble.java
|
||||||
|
src/main/java/org/openapitools/client/model/AllOfRefToFloat.java
|
||||||
|
src/main/java/org/openapitools/client/model/AllOfRefToLong.java
|
||||||
src/main/java/org/openapitools/client/model/Animal.java
|
src/main/java/org/openapitools/client/model/Animal.java
|
||||||
src/main/java/org/openapitools/client/model/Apple.java
|
src/main/java/org/openapitools/client/model/Apple.java
|
||||||
src/main/java/org/openapitools/client/model/AppleReq.java
|
src/main/java/org/openapitools/client/model/AppleReq.java
|
||||||
@@ -199,3 +205,6 @@ src/main/java/org/openapitools/client/model/TriangleInterface.java
|
|||||||
src/main/java/org/openapitools/client/model/User.java
|
src/main/java/org/openapitools/client/model/User.java
|
||||||
src/main/java/org/openapitools/client/model/Whale.java
|
src/main/java/org/openapitools/client/model/Whale.java
|
||||||
src/main/java/org/openapitools/client/model/Zebra.java
|
src/main/java/org/openapitools/client/model/Zebra.java
|
||||||
|
src/test/java/org/openapitools/client/model/AllOfRefToDoubleTest.java
|
||||||
|
src/test/java/org/openapitools/client/model/AllOfRefToFloatTest.java
|
||||||
|
src/test/java/org/openapitools/client/model/AllOfRefToLongTest.java
|
||||||
|
|||||||
@@ -188,6 +188,9 @@ Class | Method | HTTP request | Description
|
|||||||
## Documentation for Models
|
## Documentation for Models
|
||||||
|
|
||||||
- [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
|
- [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
|
||||||
|
- [AllOfRefToDouble](docs/AllOfRefToDouble.md)
|
||||||
|
- [AllOfRefToFloat](docs/AllOfRefToFloat.md)
|
||||||
|
- [AllOfRefToLong](docs/AllOfRefToLong.md)
|
||||||
- [Animal](docs/Animal.md)
|
- [Animal](docs/Animal.md)
|
||||||
- [Apple](docs/Apple.md)
|
- [Apple](docs/Apple.md)
|
||||||
- [AppleReq](docs/AppleReq.md)
|
- [AppleReq](docs/AppleReq.md)
|
||||||
|
|||||||
@@ -2293,6 +2293,42 @@ components:
|
|||||||
$ref: "#/components/schemas/Bar"
|
$ref: "#/components/schemas/Bar"
|
||||||
type: array
|
type: array
|
||||||
type: object
|
type: object
|
||||||
|
LongId:
|
||||||
|
description: Id as long
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
Weight:
|
||||||
|
description: Weight as float
|
||||||
|
format: float
|
||||||
|
type: number
|
||||||
|
Height:
|
||||||
|
description: Height as double
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
AllOfRefToLong:
|
||||||
|
description: Object with allOf ref to long
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
allOf:
|
||||||
|
- $ref: "#/components/schemas/LongId"
|
||||||
|
default: 10
|
||||||
|
type: object
|
||||||
|
AllOfRefToFloat:
|
||||||
|
description: Object with allOf ref to float
|
||||||
|
properties:
|
||||||
|
weight:
|
||||||
|
allOf:
|
||||||
|
- $ref: "#/components/schemas/Weight"
|
||||||
|
default: 7.89
|
||||||
|
type: object
|
||||||
|
AllOfRefToDouble:
|
||||||
|
description: Object with allOf ref to double
|
||||||
|
properties:
|
||||||
|
height:
|
||||||
|
allOf:
|
||||||
|
- $ref: "#/components/schemas/Height"
|
||||||
|
default: 32.1
|
||||||
|
type: object
|
||||||
_foo_get_default_response:
|
_foo_get_default_response:
|
||||||
example:
|
example:
|
||||||
string:
|
string:
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# AllOfRefToDouble
|
||||||
|
|
||||||
|
Object with allOf ref to double
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
| Name | Type | Description | Notes |
|
||||||
|
|------------ | ------------- | ------------- | -------------|
|
||||||
|
|**height** | **Double** | Height as double | [optional] |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# AllOfRefToFloat
|
||||||
|
|
||||||
|
Object with allOf ref to float
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
| Name | Type | Description | Notes |
|
||||||
|
|------------ | ------------- | ------------- | -------------|
|
||||||
|
|**weight** | **Float** | Weight as float | [optional] |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# AllOfRefToLong
|
||||||
|
|
||||||
|
Object with allOf ref to long
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
| Name | Type | Description | Notes |
|
||||||
|
|------------ | ------------- | ------------- | -------------|
|
||||||
|
|**id** | **Long** | Id as long | [optional] |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Locale;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
|
import org.openapitools.client.JSON;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Object with allOf ref to double
|
||||||
|
*/
|
||||||
|
@JsonPropertyOrder({
|
||||||
|
AllOfRefToDouble.JSON_PROPERTY_HEIGHT
|
||||||
|
})
|
||||||
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0-SNAPSHOT")
|
||||||
|
public class AllOfRefToDouble {
|
||||||
|
public static final String JSON_PROPERTY_HEIGHT = "height";
|
||||||
|
@javax.annotation.Nullable
|
||||||
|
private Double height = 32.1d;
|
||||||
|
|
||||||
|
public AllOfRefToDouble() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllOfRefToDouble height(@javax.annotation.Nullable Double height) {
|
||||||
|
this.height = height;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Height as double
|
||||||
|
* @return height
|
||||||
|
*/
|
||||||
|
@javax.annotation.Nullable
|
||||||
|
@JsonProperty(value = JSON_PROPERTY_HEIGHT, required = false)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
|
||||||
|
public Double getHeight() {
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@JsonProperty(value = JSON_PROPERTY_HEIGHT, required = false)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setHeight(@javax.annotation.Nullable Double height) {
|
||||||
|
this.height = height;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if this AllOfRefToDouble object is equal to o.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
return EqualsBuilder.reflectionEquals(this, o, false, null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return HashCodeBuilder.reflectionHashCode(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class AllOfRefToDouble {\n");
|
||||||
|
sb.append(" height: ").append(toIndentedString(height)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Locale;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
|
import org.openapitools.client.JSON;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Object with allOf ref to float
|
||||||
|
*/
|
||||||
|
@JsonPropertyOrder({
|
||||||
|
AllOfRefToFloat.JSON_PROPERTY_WEIGHT
|
||||||
|
})
|
||||||
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0-SNAPSHOT")
|
||||||
|
public class AllOfRefToFloat {
|
||||||
|
public static final String JSON_PROPERTY_WEIGHT = "weight";
|
||||||
|
@javax.annotation.Nullable
|
||||||
|
private Float weight = 7.89f;
|
||||||
|
|
||||||
|
public AllOfRefToFloat() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllOfRefToFloat weight(@javax.annotation.Nullable Float weight) {
|
||||||
|
this.weight = weight;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Weight as float
|
||||||
|
* @return weight
|
||||||
|
*/
|
||||||
|
@javax.annotation.Nullable
|
||||||
|
@JsonProperty(value = JSON_PROPERTY_WEIGHT, required = false)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
|
||||||
|
public Float getWeight() {
|
||||||
|
return weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@JsonProperty(value = JSON_PROPERTY_WEIGHT, required = false)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setWeight(@javax.annotation.Nullable Float weight) {
|
||||||
|
this.weight = weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if this AllOfRefToFloat object is equal to o.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
return EqualsBuilder.reflectionEquals(this, o, false, null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return HashCodeBuilder.reflectionHashCode(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class AllOfRefToFloat {\n");
|
||||||
|
sb.append(" weight: ").append(toIndentedString(weight)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Locale;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||||
|
import org.openapitools.client.JSON;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Object with allOf ref to long
|
||||||
|
*/
|
||||||
|
@JsonPropertyOrder({
|
||||||
|
AllOfRefToLong.JSON_PROPERTY_ID
|
||||||
|
})
|
||||||
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0-SNAPSHOT")
|
||||||
|
public class AllOfRefToLong {
|
||||||
|
public static final String JSON_PROPERTY_ID = "id";
|
||||||
|
@javax.annotation.Nullable
|
||||||
|
private Long id = 10l;
|
||||||
|
|
||||||
|
public AllOfRefToLong() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllOfRefToLong id(@javax.annotation.Nullable Long id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Id as long
|
||||||
|
* @return id
|
||||||
|
*/
|
||||||
|
@javax.annotation.Nullable
|
||||||
|
@JsonProperty(value = JSON_PROPERTY_ID, required = false)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@JsonProperty(value = JSON_PROPERTY_ID, required = false)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
public void setId(@javax.annotation.Nullable Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if this AllOfRefToLong object is equal to o.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
return EqualsBuilder.reflectionEquals(this, o, false, null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return HashCodeBuilder.reflectionHashCode(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class AllOfRefToLong {\n");
|
||||||
|
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToDouble
|
||||||
|
*/
|
||||||
|
public class AllOfRefToDoubleTest {
|
||||||
|
private final AllOfRefToDouble model = new AllOfRefToDouble();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToDouble
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testAllOfRefToDouble() {
|
||||||
|
// TODO: test AllOfRefToDouble
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'height'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void heightTest() {
|
||||||
|
// TODO: test height
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToFloat
|
||||||
|
*/
|
||||||
|
public class AllOfRefToFloatTest {
|
||||||
|
private final AllOfRefToFloat model = new AllOfRefToFloat();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToFloat
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testAllOfRefToFloat() {
|
||||||
|
// TODO: test AllOfRefToFloat
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'weight'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void weightTest() {
|
||||||
|
// TODO: test weight
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package org.openapitools.client.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToLong
|
||||||
|
*/
|
||||||
|
public class AllOfRefToLongTest {
|
||||||
|
private final AllOfRefToLong model = new AllOfRefToLong();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model tests for AllOfRefToLong
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testAllOfRefToLong() {
|
||||||
|
// TODO: test AllOfRefToLong
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the property 'id'
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void idTest() {
|
||||||
|
// TODO: test id
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user