update samples

This commit is contained in:
William Cheng 2022-08-16 15:35:01 +08:00
parent 9d9e0a4335
commit cfb35f97ef
5 changed files with 8 additions and 9 deletions

View File

@ -43,7 +43,6 @@ module Petstore
# List of attributes with nullable: true
def self.openapi_nullable
Set.new([
:'single_ref_type'
])
end

View File

@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**action** | Option<[**crate::models::Baz**](Baz.md)> | |
**action** | [**crate::models::Baz**](Baz.md) | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -14,13 +14,13 @@
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct ActionContainer {
#[serde(rename = "action")]
pub action: Option<Box<crate::models::Baz>>,
pub action: Box<crate::models::Baz>,
}
impl ActionContainer {
pub fn new(action: Option<crate::models::Baz>) -> ActionContainer {
pub fn new(action: crate::models::Baz) -> ActionContainer {
ActionContainer {
action: if let Some(x) = action {Some(Box::new(x))} else {None},
action: Box::new(action),
}
}
}

View File

@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**action** | Option<[**crate::models::Baz**](Baz.md)> | |
**action** | [**crate::models::Baz**](Baz.md) | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -14,13 +14,13 @@
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct ActionContainer {
#[serde(rename = "action")]
pub action: Option<Box<crate::models::Baz>>,
pub action: Box<crate::models::Baz>,
}
impl ActionContainer {
pub fn new(action: Option<crate::models::Baz>) -> ActionContainer {
pub fn new(action: crate::models::Baz) -> ActionContainer {
ActionContainer {
action: if let Some(x) = action {Some(Box::new(x))} else {None},
action: Box::new(action),
}
}
}