Skip to content

Commit 028f490

Browse files
committed
Updated tests and samples
1 parent 3249aab commit 028f490

21 files changed

Lines changed: 54 additions & 0 deletions

File tree

modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -915,6 +915,10 @@ components:
915915
bytes:
916916
type: string
917917
format: byte
918+
nullableBytes: # Regression test for bug report in #20500
919+
type: string
920+
format: byte
921+
nullable: true
918922
decimal:
919923
type: string
920924
format: number

samples/client/petstore/rust/hyper/petstore/docs/TypeTesting.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Name | Type | Description | Notes
1212
**boolean** | **bool** | |
1313
**uuid** | [**uuid::Uuid**](uuid::Uuid.md) | |
1414
**bytes** | **String** | |
15+
**nullable_bytes** | Option<**String**> | | [optional]
1516
**decimal** | **String** | |
1617

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

samples/client/petstore/rust/hyper/petstore/src/models/type_testing.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ pub struct TypeTesting {
3434
#[serde_as(as = "serde_with::base64::Base64")]
3535
#[serde(rename = "bytes")]
3636
pub bytes: Vec<u8>,
37+
#[serde_as(as = "Option<Option<serde_with::base64::Base64>>")]
38+
#[serde(rename = "nullableBytes", default, skip_serializing_if = "Option::is_none")]
39+
pub nullable_bytes: Option<Option<Vec<u8>>>,
3740
#[serde(rename = "decimal")]
3841
pub decimal: String,
3942
}
@@ -50,6 +53,7 @@ impl TypeTesting {
5053
boolean,
5154
uuid,
5255
bytes,
56+
nullable_bytes: None,
5357
decimal,
5458
}
5559
}

samples/client/petstore/rust/hyper0x/petstore/docs/TypeTesting.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Name | Type | Description | Notes
1212
**boolean** | **bool** | |
1313
**uuid** | [**uuid::Uuid**](uuid::Uuid.md) | |
1414
**bytes** | **String** | |
15+
**nullable_bytes** | Option<**String**> | | [optional]
1516
**decimal** | **String** | |
1617

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

samples/client/petstore/rust/hyper0x/petstore/src/models/type_testing.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ pub struct TypeTesting {
3434
#[serde_as(as = "serde_with::base64::Base64")]
3535
#[serde(rename = "bytes")]
3636
pub bytes: Vec<u8>,
37+
#[serde_as(as = "Option<Option<serde_with::base64::Base64>>")]
38+
#[serde(rename = "nullableBytes", default, skip_serializing_if = "Option::is_none")]
39+
pub nullable_bytes: Option<Option<Vec<u8>>>,
3740
#[serde(rename = "decimal")]
3841
pub decimal: String,
3942
}
@@ -50,6 +53,7 @@ impl TypeTesting {
5053
boolean,
5154
uuid,
5255
bytes,
56+
nullable_bytes: None,
5357
decimal,
5458
}
5559
}

samples/client/petstore/rust/reqwest-trait/petstore/docs/TypeTesting.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Name | Type | Description | Notes
1212
**boolean** | **bool** | |
1313
**uuid** | [**uuid::Uuid**](uuid::Uuid.md) | |
1414
**bytes** | **String** | |
15+
**nullable_bytes** | Option<**String**> | | [optional]
1516
**decimal** | **String** | |
1617

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

samples/client/petstore/rust/reqwest-trait/petstore/src/models/type_testing.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ pub struct TypeTesting {
3434
#[serde_as(as = "serde_with::base64::Base64")]
3535
#[serde(rename = "bytes")]
3636
pub bytes: Vec<u8>,
37+
#[serde_as(as = "Option<Option<serde_with::base64::Base64>>")]
38+
#[serde(rename = "nullableBytes", default, skip_serializing_if = "Option::is_none")]
39+
pub nullable_bytes: Option<Option<Vec<u8>>>,
3740
#[serde(rename = "decimal")]
3841
pub decimal: String,
3942
}
@@ -50,6 +53,7 @@ impl TypeTesting {
5053
boolean,
5154
uuid,
5255
bytes,
56+
nullable_bytes: None,
5357
decimal,
5458
}
5559
}

samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/TypeTesting.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Name | Type | Description | Notes
1212
**boolean** | **bool** | |
1313
**uuid** | [**uuid::Uuid**](uuid::Uuid.md) | |
1414
**bytes** | **String** | |
15+
**nullable_bytes** | Option<**String**> | | [optional]
1516
**decimal** | **String** | |
1617

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

samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/type_testing.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ pub struct TypeTesting {
3434
#[serde_as(as = "serde_with::base64::Base64")]
3535
#[serde(rename = "bytes")]
3636
pub bytes: Vec<u8>,
37+
#[serde_as(as = "Option<Option<serde_with::base64::Base64>>")]
38+
#[serde(rename = "nullableBytes", default, skip_serializing_if = "Option::is_none")]
39+
pub nullable_bytes: Option<Option<Vec<u8>>>,
3740
#[serde(rename = "decimal")]
3841
pub decimal: String,
3942
}
@@ -50,6 +53,7 @@ impl TypeTesting {
5053
boolean,
5154
uuid,
5255
bytes,
56+
nullable_bytes: None,
5357
decimal,
5458
}
5559
}

samples/client/petstore/rust/reqwest/petstore-async-tokensource/docs/TypeTesting.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Name | Type | Description | Notes
1212
**boolean** | **bool** | |
1313
**uuid** | [**uuid::Uuid**](uuid::Uuid.md) | |
1414
**bytes** | **String** | |
15+
**nullable_bytes** | Option<**String**> | | [optional]
1516
**decimal** | **String** | |
1617

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

0 commit comments

Comments
 (0)