Skip to content

Commit

Permalink
update samples
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 committed Oct 1, 2024
1 parent a83fecf commit 29ba171
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 20 deletions.
8 changes: 2 additions & 6 deletions samples/client/petstore/java/okhttp-gson-3.1/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1099,9 +1099,7 @@ components:
ref_array_prefix_items:
description: |
An item that was added to the queue.
items:
description: TODO default missing array inner type to string
type: string
items: {}
maxItems: 5
minItems: 3
type: array
Expand All @@ -1112,9 +1110,7 @@ components:
ArrayPrefixItems:
description: |
An item that was added to the queue.
items:
description: TODO default missing array inner type to string
type: string
items: {}
maxItems: 5
minItems: 3
type: array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
|------------ | ------------- | ------------- | -------------|
|**anyTypeProperty** | **Object** | | [optional] |
|**arrayProp** | **List<String>** | test array in 3.1 spec | [optional] |
|**refArrayPrefixItems** | **List<String>** | An item that was added to the queue. | [optional] |
|**refArrayPrefixItems** | **List<Object>** | An item that was added to the queue. | [optional] |



Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public class AnyTypeTest {

public static final String SERIALIZED_NAME_REF_ARRAY_PREFIX_ITEMS = "ref_array_prefix_items";
@SerializedName(SERIALIZED_NAME_REF_ARRAY_PREFIX_ITEMS)
private List<String> refArrayPrefixItems = new ArrayList<>();
private List<Object> refArrayPrefixItems = new ArrayList<>();

public AnyTypeTest() {
}
Expand Down Expand Up @@ -114,12 +114,12 @@ public void setArrayProp(List<String> arrayProp) {
}


public AnyTypeTest refArrayPrefixItems(List<String> refArrayPrefixItems) {
public AnyTypeTest refArrayPrefixItems(List<Object> refArrayPrefixItems) {
this.refArrayPrefixItems = refArrayPrefixItems;
return this;
}

public AnyTypeTest addRefArrayPrefixItemsItem(String refArrayPrefixItemsItem) {
public AnyTypeTest addRefArrayPrefixItemsItem(Object refArrayPrefixItemsItem) {
if (this.refArrayPrefixItems == null) {
this.refArrayPrefixItems = new ArrayList<>();
}
Expand All @@ -132,11 +132,11 @@ public AnyTypeTest addRefArrayPrefixItemsItem(String refArrayPrefixItemsItem) {
* @return refArrayPrefixItems
*/
@javax.annotation.Nullable
public List<String> getRefArrayPrefixItems() {
public List<Object> getRefArrayPrefixItems() {
return refArrayPrefixItems;
}

public void setRefArrayPrefixItems(List<String> refArrayPrefixItems) {
public void setRefArrayPrefixItems(List<Object> refArrayPrefixItems) {
this.refArrayPrefixItems = refArrayPrefixItems;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ pub enum NumericEnumTesting {

}

impl ToString for NumericEnumTesting {
fn to_string(&self) -> String {
match self {
Self::Variant0 => String::from("0"),
Self::Variant1 => String::from("1"),
Self::Variant2 => String::from("2"),
Self::Variant3 => String::from("3"),
}
impl std::fmt::Display for NumericEnumTesting {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", match self {
Self::Variant0 => "0",
Self::Variant1 => "1",
Self::Variant2 => "2",
Self::Variant3 => "3",
})
}
}
impl Default for NumericEnumTesting {
Expand Down

0 comments on commit 29ba171

Please sign in to comment.