Skip to content

Commit 29ba171

Browse files
committed
update samples
1 parent a83fecf commit 29ba171

File tree

4 files changed

+16
-20
lines changed

4 files changed

+16
-20
lines changed

samples/client/petstore/java/okhttp-gson-3.1/api/openapi.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,9 +1099,7 @@ components:
10991099
ref_array_prefix_items:
11001100
description: |
11011101
An item that was added to the queue.
1102-
items:
1103-
description: TODO default missing array inner type to string
1104-
type: string
1102+
items: {}
11051103
maxItems: 5
11061104
minItems: 3
11071105
type: array
@@ -1112,9 +1110,7 @@ components:
11121110
ArrayPrefixItems:
11131111
description: |
11141112
An item that was added to the queue.
1115-
items:
1116-
description: TODO default missing array inner type to string
1117-
type: string
1113+
items: {}
11181114
maxItems: 5
11191115
minItems: 3
11201116
type: array

samples/client/petstore/java/okhttp-gson-3.1/docs/AnyTypeTest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
|------------ | ------------- | ------------- | -------------|
1010
|**anyTypeProperty** | **Object** | | [optional] |
1111
|**arrayProp** | **List<String>** | test array in 3.1 spec | [optional] |
12-
|**refArrayPrefixItems** | **List<String>** | An item that was added to the queue. | [optional] |
12+
|**refArrayPrefixItems** | **List<Object>** | An item that was added to the queue. | [optional] |
1313

1414

1515

samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/AnyTypeTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public class AnyTypeTest {
6363

6464
public static final String SERIALIZED_NAME_REF_ARRAY_PREFIX_ITEMS = "ref_array_prefix_items";
6565
@SerializedName(SERIALIZED_NAME_REF_ARRAY_PREFIX_ITEMS)
66-
private List<String> refArrayPrefixItems = new ArrayList<>();
66+
private List<Object> refArrayPrefixItems = new ArrayList<>();
6767

6868
public AnyTypeTest() {
6969
}
@@ -114,12 +114,12 @@ public void setArrayProp(List<String> arrayProp) {
114114
}
115115

116116

117-
public AnyTypeTest refArrayPrefixItems(List<String> refArrayPrefixItems) {
117+
public AnyTypeTest refArrayPrefixItems(List<Object> refArrayPrefixItems) {
118118
this.refArrayPrefixItems = refArrayPrefixItems;
119119
return this;
120120
}
121121

122-
public AnyTypeTest addRefArrayPrefixItemsItem(String refArrayPrefixItemsItem) {
122+
public AnyTypeTest addRefArrayPrefixItemsItem(Object refArrayPrefixItemsItem) {
123123
if (this.refArrayPrefixItems == null) {
124124
this.refArrayPrefixItems = new ArrayList<>();
125125
}
@@ -132,11 +132,11 @@ public AnyTypeTest addRefArrayPrefixItemsItem(String refArrayPrefixItemsItem) {
132132
* @return refArrayPrefixItems
133133
*/
134134
@javax.annotation.Nullable
135-
public List<String> getRefArrayPrefixItems() {
135+
public List<Object> getRefArrayPrefixItems() {
136136
return refArrayPrefixItems;
137137
}
138138

139-
public void setRefArrayPrefixItems(List<String> refArrayPrefixItems) {
139+
public void setRefArrayPrefixItems(List<Object> refArrayPrefixItems) {
140140
this.refArrayPrefixItems = refArrayPrefixItems;
141141
}
142142

samples/client/petstore/rust/reqwest/petstore-async-tokensource/src/models/numeric_enum_testing.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ pub enum NumericEnumTesting {
2424

2525
}
2626

27-
impl ToString for NumericEnumTesting {
28-
fn to_string(&self) -> String {
29-
match self {
30-
Self::Variant0 => String::from("0"),
31-
Self::Variant1 => String::from("1"),
32-
Self::Variant2 => String::from("2"),
33-
Self::Variant3 => String::from("3"),
34-
}
27+
impl std::fmt::Display for NumericEnumTesting {
28+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
29+
write!(f, "{}", match self {
30+
Self::Variant0 => "0",
31+
Self::Variant1 => "1",
32+
Self::Variant2 => "2",
33+
Self::Variant3 => "3",
34+
})
3535
}
3636
}
3737
impl Default for NumericEnumTesting {

0 commit comments

Comments
 (0)