Skip to content

Commit 0da60de

Browse files
committed
update samples
1 parent 7dac40e commit 0da60de

File tree

80 files changed

+646
-609
lines changed

Some content is hidden

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

80 files changed

+646
-609
lines changed

samples/client/others/rust/hyper/oneOf/docs/Bar.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**id** | **String** | |
8-
**bar_prop_a** | Option<**String**> | | [optional]
9-
**foo_prop_b** | Option<**String**> | | [optional]
10-
**foo** | Option<[**models::FooRefOrValue**](FooRefOrValue.md)> | | [optional]
117
**href** | Option<**String**> | Hyperlink reference | [optional]
8+
**id** | **String** | |
129
**at_schema_location** | Option<**String**> | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
1310
**at_base_type** | Option<**String**> | When sub-classing, this defines the super-class | [optional]
1411
**at_type** | **String** | When sub-classing, this defines the sub-class Extensible name |
12+
**bar_prop_a** | Option<**String**> | | [optional]
13+
**foo_prop_b** | Option<**String**> | | [optional]
14+
**foo** | Option<[**models::FooRefOrValue**](FooRefOrValue.md)> | | [optional]
1515

1616
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1717

samples/client/others/rust/hyper/oneOf/docs/BarCreate.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**bar_prop_a** | Option<**String**> | | [optional]
8-
**foo_prop_b** | Option<**String**> | | [optional]
9-
**foo** | Option<[**models::FooRefOrValue**](FooRefOrValue.md)> | | [optional]
107
**href** | Option<**String**> | Hyperlink reference | [optional]
118
**id** | Option<**String**> | unique identifier | [optional]
129
**at_schema_location** | Option<**String**> | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
1310
**at_base_type** | Option<**String**> | When sub-classing, this defines the super-class | [optional]
1411
**at_type** | **String** | When sub-classing, this defines the sub-class Extensible name |
12+
**bar_prop_a** | Option<**String**> | | [optional]
13+
**foo_prop_b** | Option<**String**> | | [optional]
14+
**foo** | Option<[**models::FooRefOrValue**](FooRefOrValue.md)> | | [optional]
1515

1616
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1717

samples/client/others/rust/hyper/oneOf/docs/BarRef.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**name** | Option<**String**> | Name of the related entity. | [optional]
8-
**at_referred_type** | Option<**String**> | The actual type of the target instance when needed for disambiguation. | [optional]
97
**href** | Option<**String**> | Hyperlink reference | [optional]
108
**id** | Option<**String**> | unique identifier | [optional]
119
**at_schema_location** | Option<**String**> | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
1210
**at_base_type** | Option<**String**> | When sub-classing, this defines the super-class | [optional]
1311
**at_type** | **String** | When sub-classing, this defines the sub-class Extensible name |
12+
**name** | Option<**String**> | Name of the related entity. | [optional]
13+
**at_referred_type** | Option<**String**> | The actual type of the target instance when needed for disambiguation. | [optional]
1414

1515
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1616

samples/client/others/rust/hyper/oneOf/docs/Foo.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**foo_prop_a** | Option<**String**> | | [optional]
8-
**foo_prop_b** | Option<**String**> | | [optional]
97
**href** | Option<**String**> | Hyperlink reference | [optional]
108
**id** | Option<**String**> | unique identifier | [optional]
119
**at_schema_location** | Option<**String**> | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
1210
**at_base_type** | Option<**String**> | When sub-classing, this defines the super-class | [optional]
1311
**at_type** | **String** | When sub-classing, this defines the sub-class Extensible name |
12+
**foo_prop_a** | Option<**String**> | | [optional]
13+
**foo_prop_b** | Option<**String**> | | [optional]
1414

1515
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1616

samples/client/others/rust/hyper/oneOf/docs/FooRef.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**fooref_prop_a** | Option<**String**> | | [optional]
8-
**name** | Option<**String**> | Name of the related entity. | [optional]
9-
**at_referred_type** | Option<**String**> | The actual type of the target instance when needed for disambiguation. | [optional]
107
**href** | Option<**String**> | Hyperlink reference | [optional]
118
**id** | Option<**String**> | unique identifier | [optional]
129
**at_schema_location** | Option<**String**> | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
1310
**at_base_type** | Option<**String**> | When sub-classing, this defines the super-class | [optional]
1411
**at_type** | **String** | When sub-classing, this defines the sub-class Extensible name |
12+
**name** | Option<**String**> | Name of the related entity. | [optional]
13+
**at_referred_type** | Option<**String**> | The actual type of the target instance when needed for disambiguation. | [optional]
14+
**fooref_prop_a** | Option<**String**> | | [optional]
1515

1616
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1717

samples/client/others/rust/hyper/oneOf/docs/Pasta.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**vendor** | Option<**String**> | | [optional]
87
**href** | Option<**String**> | Hyperlink reference | [optional]
98
**id** | Option<**String**> | unique identifier | [optional]
109
**at_schema_location** | Option<**String**> | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
1110
**at_base_type** | Option<**String**> | When sub-classing, this defines the super-class | [optional]
1211
**at_type** | **String** | When sub-classing, this defines the sub-class Extensible name |
12+
**vendor** | Option<**String**> | | [optional]
1313

1414
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1515

samples/client/others/rust/hyper/oneOf/docs/Pizza.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**pizza_size** | Option<**f64**> | | [optional]
87
**href** | Option<**String**> | Hyperlink reference | [optional]
98
**id** | Option<**String**> | unique identifier | [optional]
109
**at_schema_location** | Option<**String**> | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
1110
**at_base_type** | Option<**String**> | When sub-classing, this defines the super-class | [optional]
1211
**at_type** | **String** | When sub-classing, this defines the sub-class Extensible name |
12+
**pizza_size** | Option<**f64**> | | [optional]
1313

1414
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1515

samples/client/others/rust/hyper/oneOf/docs/PizzaSpeziale.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**toppings** | Option<**String**> | | [optional]
8-
**pizza_size** | Option<**f64**> | | [optional]
97
**href** | Option<**String**> | Hyperlink reference | [optional]
108
**id** | Option<**String**> | unique identifier | [optional]
119
**at_schema_location** | Option<**String**> | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
1210
**at_base_type** | Option<**String**> | When sub-classing, this defines the super-class | [optional]
1311
**at_type** | **String** | When sub-classing, this defines the sub-class Extensible name |
12+
**pizza_size** | Option<**f64**> | | [optional]
13+
**toppings** | Option<**String**> | | [optional]
1414

1515
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1616

samples/client/others/rust/hyper/oneOf/src/models/bar.rs

+12-12
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,11 @@ use serde::{Deserialize, Serialize};
1313

1414
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
1515
pub struct Bar {
16-
#[serde(rename = "id")]
17-
pub id: String,
18-
#[serde(rename = "barPropA", skip_serializing_if = "Option::is_none")]
19-
pub bar_prop_a: Option<String>,
20-
#[serde(rename = "fooPropB", skip_serializing_if = "Option::is_none")]
21-
pub foo_prop_b: Option<String>,
22-
#[serde(rename = "foo", skip_serializing_if = "Option::is_none")]
23-
pub foo: Option<Box<models::FooRefOrValue>>,
2416
/// Hyperlink reference
2517
#[serde(rename = "href", skip_serializing_if = "Option::is_none")]
2618
pub href: Option<String>,
19+
#[serde(rename = "id")]
20+
pub id: String,
2721
/// A URI to a JSON-Schema file that defines additional attributes and relationships
2822
#[serde(rename = "@schemaLocation", skip_serializing_if = "Option::is_none")]
2923
pub at_schema_location: Option<String>,
@@ -33,19 +27,25 @@ pub struct Bar {
3327
/// When sub-classing, this defines the sub-class Extensible name
3428
#[serde(rename = "@type")]
3529
pub at_type: String,
30+
#[serde(rename = "barPropA", skip_serializing_if = "Option::is_none")]
31+
pub bar_prop_a: Option<String>,
32+
#[serde(rename = "fooPropB", skip_serializing_if = "Option::is_none")]
33+
pub foo_prop_b: Option<String>,
34+
#[serde(rename = "foo", skip_serializing_if = "Option::is_none")]
35+
pub foo: Option<Box<models::FooRefOrValue>>,
3636
}
3737

3838
impl Bar {
3939
pub fn new(id: String, at_type: String) -> Bar {
4040
Bar {
41-
id,
42-
bar_prop_a: None,
43-
foo_prop_b: None,
44-
foo: None,
4541
href: None,
42+
id,
4643
at_schema_location: None,
4744
at_base_type: None,
4845
at_type,
46+
bar_prop_a: None,
47+
foo_prop_b: None,
48+
foo: None,
4949
}
5050
}
5151
}

samples/client/others/rust/hyper/oneOf/src/models/bar_create.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ use serde::{Deserialize, Serialize};
1313

1414
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
1515
pub struct BarCreate {
16-
#[serde(rename = "barPropA", skip_serializing_if = "Option::is_none")]
17-
pub bar_prop_a: Option<String>,
18-
#[serde(rename = "fooPropB", skip_serializing_if = "Option::is_none")]
19-
pub foo_prop_b: Option<String>,
20-
#[serde(rename = "foo", skip_serializing_if = "Option::is_none")]
21-
pub foo: Option<Box<models::FooRefOrValue>>,
2216
/// Hyperlink reference
2317
#[serde(rename = "href", skip_serializing_if = "Option::is_none")]
2418
pub href: Option<String>,
@@ -34,19 +28,25 @@ pub struct BarCreate {
3428
/// When sub-classing, this defines the sub-class Extensible name
3529
#[serde(rename = "@type")]
3630
pub at_type: String,
31+
#[serde(rename = "barPropA", skip_serializing_if = "Option::is_none")]
32+
pub bar_prop_a: Option<String>,
33+
#[serde(rename = "fooPropB", skip_serializing_if = "Option::is_none")]
34+
pub foo_prop_b: Option<String>,
35+
#[serde(rename = "foo", skip_serializing_if = "Option::is_none")]
36+
pub foo: Option<Box<models::FooRefOrValue>>,
3737
}
3838

3939
impl BarCreate {
4040
pub fn new(at_type: String) -> BarCreate {
4141
BarCreate {
42-
bar_prop_a: None,
43-
foo_prop_b: None,
44-
foo: None,
4542
href: None,
4643
id: None,
4744
at_schema_location: None,
4845
at_base_type: None,
4946
at_type,
47+
bar_prop_a: None,
48+
foo_prop_b: None,
49+
foo: None,
5050
}
5151
}
5252
}

samples/client/others/rust/hyper/oneOf/src/models/bar_ref.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ use serde::{Deserialize, Serialize};
1313

1414
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
1515
pub struct BarRef {
16-
/// Name of the related entity.
17-
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
18-
pub name: Option<String>,
19-
/// The actual type of the target instance when needed for disambiguation.
20-
#[serde(rename = "@referredType", skip_serializing_if = "Option::is_none")]
21-
pub at_referred_type: Option<String>,
2216
/// Hyperlink reference
2317
#[serde(rename = "href", skip_serializing_if = "Option::is_none")]
2418
pub href: Option<String>,
@@ -34,18 +28,24 @@ pub struct BarRef {
3428
/// When sub-classing, this defines the sub-class Extensible name
3529
#[serde(rename = "@type")]
3630
pub at_type: String,
31+
/// Name of the related entity.
32+
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
33+
pub name: Option<String>,
34+
/// The actual type of the target instance when needed for disambiguation.
35+
#[serde(rename = "@referredType", skip_serializing_if = "Option::is_none")]
36+
pub at_referred_type: Option<String>,
3737
}
3838

3939
impl BarRef {
4040
pub fn new(at_type: String) -> BarRef {
4141
BarRef {
42-
name: None,
43-
at_referred_type: None,
4442
href: None,
4543
id: None,
4644
at_schema_location: None,
4745
at_base_type: None,
4846
at_type,
47+
name: None,
48+
at_referred_type: None,
4949
}
5050
}
5151
}

samples/client/others/rust/hyper/oneOf/src/models/entity_ref.rs

+11-12
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,11 @@
1111
use crate::models;
1212
use serde::{Deserialize, Serialize};
1313

14-
/// EntityRef : Entity reference schema to be use for all entityRef class.
1514
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1615
#[serde(tag = "@type")]
1716
pub enum EntityRef {
1817
#[serde(rename="BarRef")]
1918
BarRef {
20-
/// Name of the related entity.
21-
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
22-
name: Option<String>,
23-
/// The actual type of the target instance when needed for disambiguation.
24-
#[serde(rename = "@referredType", skip_serializing_if = "Option::is_none")]
25-
at_referred_type: Option<String>,
2619
/// Hyperlink reference
2720
#[serde(rename = "href", skip_serializing_if = "Option::is_none")]
2821
href: Option<String>,
@@ -35,15 +28,15 @@ pub enum EntityRef {
3528
/// When sub-classing, this defines the super-class
3629
#[serde(rename = "@baseType", skip_serializing_if = "Option::is_none")]
3730
at_base_type: Option<String>,
38-
},
39-
#[serde(rename="FooRef")]
40-
FooRef {
4131
/// Name of the related entity.
4232
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
4333
name: Option<String>,
4434
/// The actual type of the target instance when needed for disambiguation.
4535
#[serde(rename = "@referredType", skip_serializing_if = "Option::is_none")]
4636
at_referred_type: Option<String>,
37+
},
38+
#[serde(rename="FooRef")]
39+
FooRef {
4740
/// Hyperlink reference
4841
#[serde(rename = "href", skip_serializing_if = "Option::is_none")]
4942
href: Option<String>,
@@ -56,18 +49,24 @@ pub enum EntityRef {
5649
/// When sub-classing, this defines the super-class
5750
#[serde(rename = "@baseType", skip_serializing_if = "Option::is_none")]
5851
at_base_type: Option<String>,
52+
/// Name of the related entity.
53+
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
54+
name: Option<String>,
55+
/// The actual type of the target instance when needed for disambiguation.
56+
#[serde(rename = "@referredType", skip_serializing_if = "Option::is_none")]
57+
at_referred_type: Option<String>,
5958
},
6059
}
6160

6261
impl Default for EntityRef {
6362
fn default() -> Self {
6463
Self::BarRef {
65-
name: Default::default(),
66-
at_referred_type: Default::default(),
6764
href: Default::default(),
6865
id: Default::default(),
6966
at_schema_location: Default::default(),
7067
at_base_type: Default::default(),
68+
name: Default::default(),
69+
at_referred_type: Default::default(),
7170
}
7271

7372
}

samples/client/others/rust/hyper/oneOf/src/models/foo.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ use serde::{Deserialize, Serialize};
1313

1414
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
1515
pub struct Foo {
16-
#[serde(rename = "fooPropA", skip_serializing_if = "Option::is_none")]
17-
pub foo_prop_a: Option<String>,
18-
#[serde(rename = "fooPropB", skip_serializing_if = "Option::is_none")]
19-
pub foo_prop_b: Option<String>,
2016
/// Hyperlink reference
2117
#[serde(rename = "href", skip_serializing_if = "Option::is_none")]
2218
pub href: Option<String>,
@@ -32,18 +28,22 @@ pub struct Foo {
3228
/// When sub-classing, this defines the sub-class Extensible name
3329
#[serde(rename = "@type")]
3430
pub at_type: String,
31+
#[serde(rename = "fooPropA", skip_serializing_if = "Option::is_none")]
32+
pub foo_prop_a: Option<String>,
33+
#[serde(rename = "fooPropB", skip_serializing_if = "Option::is_none")]
34+
pub foo_prop_b: Option<String>,
3535
}
3636

3737
impl Foo {
3838
pub fn new(at_type: String) -> Foo {
3939
Foo {
40-
foo_prop_a: None,
41-
foo_prop_b: None,
4240
href: None,
4341
id: None,
4442
at_schema_location: None,
4543
at_base_type: None,
4644
at_type,
45+
foo_prop_a: None,
46+
foo_prop_b: None,
4747
}
4848
}
4949
}

0 commit comments

Comments
 (0)