Skip to content

Commit fa57560

Browse files
Update samples
1 parent f099ee7 commit fa57560

30 files changed

Lines changed: 1862 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Apple2
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**seeds** | **i32** | |
8+
**fruit_type** | [**models::FruitType**](FruitType.md) | |
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Banana2
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**length** | **i32** | |
8+
**fruit_type** | [**models::FruitType**](FruitType.md) | |
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Fruit2
2+
3+
## Enum Variants
4+
5+
| Name | Value |
6+
|---- | -----|
7+
8+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
9+
10+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* ByRefOrValue
3+
*
4+
* This tests for a oneOf interface representation
5+
*
6+
* The version of the OpenAPI document: 0.0.1
7+
*
8+
* Generated by: https://openapi-generator.tech
9+
*/
10+
11+
use crate::models;
12+
use serde::{Deserialize, Serialize};
13+
14+
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15+
pub struct Apple2 {
16+
#[serde(rename = "seeds")]
17+
pub seeds: i32,
18+
#[serde(rename = "fruitType")]
19+
pub fruit_type: models::FruitType,
20+
}
21+
22+
impl Apple2 {
23+
pub fn new(seeds: i32, fruit_type: models::FruitType) -> Apple2 {
24+
Apple2 {
25+
seeds,
26+
fruit_type,
27+
}
28+
}
29+
}
30+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* ByRefOrValue
3+
*
4+
* This tests for a oneOf interface representation
5+
*
6+
* The version of the OpenAPI document: 0.0.1
7+
*
8+
* Generated by: https://openapi-generator.tech
9+
*/
10+
11+
use crate::models;
12+
use serde::{Deserialize, Serialize};
13+
14+
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15+
pub struct Banana2 {
16+
#[serde(rename = "length")]
17+
pub length: i32,
18+
#[serde(rename = "fruitType")]
19+
pub fruit_type: models::FruitType,
20+
}
21+
22+
impl Banana2 {
23+
pub fn new(length: i32, fruit_type: models::FruitType) -> Banana2 {
24+
Banana2 {
25+
length,
26+
fruit_type,
27+
}
28+
}
29+
}
30+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* ByRefOrValue
3+
*
4+
* This tests for a oneOf interface representation
5+
*
6+
* The version of the OpenAPI document: 0.0.1
7+
*
8+
* Generated by: https://openapi-generator.tech
9+
*/
10+
11+
use crate::models;
12+
use serde::{Deserialize, Serialize};
13+
14+
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15+
#[serde(tag = "fruitType")]
16+
pub enum Fruit2 {
17+
#[serde(rename="APPLE")]
18+
Apple(Box<models::Apple2>),
19+
#[serde(rename="BANANA")]
20+
Banana(Box<models::Banana2>),
21+
}
22+
23+
impl Default for Fruit2 {
24+
fn default() -> Self {
25+
Self::Apple(Default::default())
26+
}
27+
}
28+
29+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Apple2
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**seeds** | **i32** | |
8+
**fruit_type** | [**models::FruitType**](FruitType.md) | |
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Banana2
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**length** | **i32** | |
8+
**fruit_type** | [**models::FruitType**](FruitType.md) | |
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Fruit2
2+
3+
## Enum Variants
4+
5+
| Name | Value |
6+
|---- | -----|
7+
8+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
9+
10+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* ByRefOrValue
3+
*
4+
* This tests for a oneOf interface representation
5+
*
6+
* The version of the OpenAPI document: 0.0.1
7+
*
8+
* Generated by: https://openapi-generator.tech
9+
*/
10+
11+
use crate::models;
12+
use serde::{Deserialize, Serialize};
13+
14+
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15+
pub struct Apple2 {
16+
#[serde(rename = "seeds")]
17+
pub seeds: i32,
18+
#[serde(rename = "fruitType")]
19+
pub fruit_type: models::FruitType,
20+
}
21+
22+
impl Apple2 {
23+
pub fn new(seeds: i32, fruit_type: models::FruitType) -> Apple2 {
24+
Apple2 {
25+
seeds,
26+
fruit_type,
27+
}
28+
}
29+
}
30+

0 commit comments

Comments
 (0)