Skip to content

Commit f7cce2d

Browse files
committed
generate java clients with the updated fix
1 parent 6433b65 commit f7cce2d

File tree

61 files changed

+3735
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+3735
-0
lines changed

samples/client/petstore/java/jersey3/.openapi-generator/FILES

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ api/openapi.yaml
66
build.gradle
77
build.sbt
88
docs/AdditionalPropertiesClass.md
9+
docs/AllOfRefToDouble.md
10+
docs/AllOfRefToFloat.md
11+
docs/AllOfRefToLong.md
912
docs/Animal.md
1013
docs/AnotherFakeApi.md
1114
docs/Apple.md
@@ -125,6 +128,9 @@ src/main/java/org/openapitools/client/auth/OAuth.java
125128
src/main/java/org/openapitools/client/auth/OAuthFlow.java
126129
src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java
127130
src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
131+
src/main/java/org/openapitools/client/model/AllOfRefToDouble.java
132+
src/main/java/org/openapitools/client/model/AllOfRefToFloat.java
133+
src/main/java/org/openapitools/client/model/AllOfRefToLong.java
128134
src/main/java/org/openapitools/client/model/Animal.java
129135
src/main/java/org/openapitools/client/model/Apple.java
130136
src/main/java/org/openapitools/client/model/AppleReq.java
@@ -199,3 +205,6 @@ src/main/java/org/openapitools/client/model/TriangleInterface.java
199205
src/main/java/org/openapitools/client/model/User.java
200206
src/main/java/org/openapitools/client/model/Whale.java
201207
src/main/java/org/openapitools/client/model/Zebra.java
208+
src/test/java/org/openapitools/client/model/AllOfRefToDoubleTest.java
209+
src/test/java/org/openapitools/client/model/AllOfRefToFloatTest.java
210+
src/test/java/org/openapitools/client/model/AllOfRefToLongTest.java

samples/client/petstore/java/jersey3/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ Class | Method | HTTP request | Description
163163
## Documentation for Models
164164

165165
- [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
166+
- [AllOfRefToDouble](docs/AllOfRefToDouble.md)
167+
- [AllOfRefToFloat](docs/AllOfRefToFloat.md)
168+
- [AllOfRefToLong](docs/AllOfRefToLong.md)
166169
- [Animal](docs/Animal.md)
167170
- [Apple](docs/Apple.md)
168171
- [AppleReq](docs/AppleReq.md)

samples/client/petstore/java/jersey3/api/openapi.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2293,6 +2293,42 @@ components:
22932293
$ref: "#/components/schemas/Bar"
22942294
type: array
22952295
type: object
2296+
LongId:
2297+
description: Id as long
2298+
format: int64
2299+
type: integer
2300+
Weight:
2301+
description: Weight as float
2302+
format: float
2303+
type: number
2304+
Height:
2305+
description: Height as double
2306+
format: double
2307+
type: number
2308+
AllOfRefToLong:
2309+
description: Object with allOf ref to long
2310+
properties:
2311+
id:
2312+
allOf:
2313+
- $ref: "#/components/schemas/LongId"
2314+
default: 10
2315+
type: object
2316+
AllOfRefToFloat:
2317+
description: Object with allOf ref to float
2318+
properties:
2319+
weight:
2320+
allOf:
2321+
- $ref: "#/components/schemas/Weight"
2322+
default: 7.89
2323+
type: object
2324+
AllOfRefToDouble:
2325+
description: Object with allOf ref to double
2326+
properties:
2327+
height:
2328+
allOf:
2329+
- $ref: "#/components/schemas/Height"
2330+
default: 32.1
2331+
type: object
22962332
_foo_get_default_response:
22972333
example:
22982334
string:
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
3+
# AllOfRefToDouble
4+
5+
Object with allOf ref to double
6+
7+
## Properties
8+
9+
| Name | Type | Description | Notes |
10+
|------------ | ------------- | ------------- | -------------|
11+
|**height** | **Double** | Height as double | [optional] |
12+
13+
14+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
3+
# AllOfRefToFloat
4+
5+
Object with allOf ref to float
6+
7+
## Properties
8+
9+
| Name | Type | Description | Notes |
10+
|------------ | ------------- | ------------- | -------------|
11+
|**weight** | **Float** | Weight as float | [optional] |
12+
13+
14+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
3+
# AllOfRefToLong
4+
5+
Object with allOf ref to long
6+
7+
## Properties
8+
9+
| Name | Type | Description | Notes |
10+
|------------ | ------------- | ------------- | -------------|
11+
|**id** | **Long** | Id as long | [optional] |
12+
13+
14+
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
/*
2+
* OpenAPI Petstore
3+
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
4+
*
5+
* The version of the OpenAPI document: 1.0.0
6+
*
7+
*
8+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9+
* https://openapi-generator.tech
10+
* Do not edit the class manually.
11+
*/
12+
13+
14+
package org.openapitools.client.model;
15+
16+
import org.apache.commons.lang3.builder.EqualsBuilder;
17+
import org.apache.commons.lang3.builder.HashCodeBuilder;
18+
import java.util.Objects;
19+
import java.util.Map;
20+
import java.util.HashMap;
21+
import java.util.Locale;
22+
import com.fasterxml.jackson.annotation.JsonInclude;
23+
import com.fasterxml.jackson.annotation.JsonProperty;
24+
import com.fasterxml.jackson.annotation.JsonCreator;
25+
import com.fasterxml.jackson.annotation.JsonTypeName;
26+
import com.fasterxml.jackson.annotation.JsonValue;
27+
import java.util.Arrays;
28+
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
29+
import jakarta.validation.constraints.*;
30+
import jakarta.validation.Valid;
31+
import org.openapitools.client.JSON;
32+
33+
34+
/**
35+
* Object with allOf ref to double
36+
*/
37+
@JsonPropertyOrder({
38+
AllOfRefToDouble.JSON_PROPERTY_HEIGHT
39+
})
40+
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0-SNAPSHOT")
41+
public class AllOfRefToDouble {
42+
public static final String JSON_PROPERTY_HEIGHT = "height";
43+
@jakarta.annotation.Nullable
44+
private Double height = 32.1d;
45+
46+
public AllOfRefToDouble() {
47+
}
48+
49+
public AllOfRefToDouble height(@jakarta.annotation.Nullable Double height) {
50+
this.height = height;
51+
return this;
52+
}
53+
54+
/**
55+
* Height as double
56+
* @return height
57+
*/
58+
@jakarta.annotation.Nullable
59+
60+
@JsonProperty(value = JSON_PROPERTY_HEIGHT, required = false)
61+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
62+
63+
public Double getHeight() {
64+
return height;
65+
}
66+
67+
68+
@JsonProperty(value = JSON_PROPERTY_HEIGHT, required = false)
69+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
70+
public void setHeight(@jakarta.annotation.Nullable Double height) {
71+
this.height = height;
72+
}
73+
74+
75+
/**
76+
* Return true if this AllOfRefToDouble object is equal to o.
77+
*/
78+
@Override
79+
public boolean equals(Object o) {
80+
return EqualsBuilder.reflectionEquals(this, o, false, null, true);
81+
}
82+
83+
@Override
84+
public int hashCode() {
85+
return HashCodeBuilder.reflectionHashCode(this);
86+
}
87+
88+
@Override
89+
public String toString() {
90+
StringBuilder sb = new StringBuilder();
91+
sb.append("class AllOfRefToDouble {\n");
92+
sb.append(" height: ").append(toIndentedString(height)).append("\n");
93+
sb.append("}");
94+
return sb.toString();
95+
}
96+
97+
/**
98+
* Convert the given object to string with each line indented by 4 spaces
99+
* (except the first line).
100+
*/
101+
private String toIndentedString(Object o) {
102+
if (o == null) {
103+
return "null";
104+
}
105+
return o.toString().replace("\n", "\n ");
106+
}
107+
108+
}
109+
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
/*
2+
* OpenAPI Petstore
3+
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
4+
*
5+
* The version of the OpenAPI document: 1.0.0
6+
*
7+
*
8+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9+
* https://openapi-generator.tech
10+
* Do not edit the class manually.
11+
*/
12+
13+
14+
package org.openapitools.client.model;
15+
16+
import org.apache.commons.lang3.builder.EqualsBuilder;
17+
import org.apache.commons.lang3.builder.HashCodeBuilder;
18+
import java.util.Objects;
19+
import java.util.Map;
20+
import java.util.HashMap;
21+
import java.util.Locale;
22+
import com.fasterxml.jackson.annotation.JsonInclude;
23+
import com.fasterxml.jackson.annotation.JsonProperty;
24+
import com.fasterxml.jackson.annotation.JsonCreator;
25+
import com.fasterxml.jackson.annotation.JsonTypeName;
26+
import com.fasterxml.jackson.annotation.JsonValue;
27+
import java.util.Arrays;
28+
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
29+
import jakarta.validation.constraints.*;
30+
import jakarta.validation.Valid;
31+
import org.openapitools.client.JSON;
32+
33+
34+
/**
35+
* Object with allOf ref to float
36+
*/
37+
@JsonPropertyOrder({
38+
AllOfRefToFloat.JSON_PROPERTY_WEIGHT
39+
})
40+
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0-SNAPSHOT")
41+
public class AllOfRefToFloat {
42+
public static final String JSON_PROPERTY_WEIGHT = "weight";
43+
@jakarta.annotation.Nullable
44+
private Float weight = 7.89f;
45+
46+
public AllOfRefToFloat() {
47+
}
48+
49+
public AllOfRefToFloat weight(@jakarta.annotation.Nullable Float weight) {
50+
this.weight = weight;
51+
return this;
52+
}
53+
54+
/**
55+
* Weight as float
56+
* @return weight
57+
*/
58+
@jakarta.annotation.Nullable
59+
60+
@JsonProperty(value = JSON_PROPERTY_WEIGHT, required = false)
61+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
62+
63+
public Float getWeight() {
64+
return weight;
65+
}
66+
67+
68+
@JsonProperty(value = JSON_PROPERTY_WEIGHT, required = false)
69+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
70+
public void setWeight(@jakarta.annotation.Nullable Float weight) {
71+
this.weight = weight;
72+
}
73+
74+
75+
/**
76+
* Return true if this AllOfRefToFloat object is equal to o.
77+
*/
78+
@Override
79+
public boolean equals(Object o) {
80+
return EqualsBuilder.reflectionEquals(this, o, false, null, true);
81+
}
82+
83+
@Override
84+
public int hashCode() {
85+
return HashCodeBuilder.reflectionHashCode(this);
86+
}
87+
88+
@Override
89+
public String toString() {
90+
StringBuilder sb = new StringBuilder();
91+
sb.append("class AllOfRefToFloat {\n");
92+
sb.append(" weight: ").append(toIndentedString(weight)).append("\n");
93+
sb.append("}");
94+
return sb.toString();
95+
}
96+
97+
/**
98+
* Convert the given object to string with each line indented by 4 spaces
99+
* (except the first line).
100+
*/
101+
private String toIndentedString(Object o) {
102+
if (o == null) {
103+
return "null";
104+
}
105+
return o.toString().replace("\n", "\n ");
106+
}
107+
108+
}
109+

0 commit comments

Comments
 (0)