diff --git a/modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml b/modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml
index a22fbc7896c6bd5a20a3cd55bc96d33b44c7b96f..8cbd1e18b15e8ac88e5169efd08b769e948dc4b5 100644
--- a/modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml
+++ b/modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml
@@ -777,3 +777,17 @@ components:
         uuid:
           type: string
           format: uuid 
+    ActionContainer:
+      required:
+      - action
+      type: object
+      properties:
+        action:
+          allOf:
+          - $ref: '#/components/schemas/Baz'
+          - nullable: false
+    Baz:
+      enum:
+      - A
+      - B
+      type: string
diff --git a/samples/client/petstore/rust/hyper/petstore/.openapi-generator/FILES b/samples/client/petstore/rust/hyper/petstore/.openapi-generator/FILES
index 5345a60cd980f633092ddcfb2f2fbf762eae9f93..639c687762532ce7dac257954f5768a199bd1cfc 100644
--- a/samples/client/petstore/rust/hyper/petstore/.openapi-generator/FILES
+++ b/samples/client/petstore/rust/hyper/petstore/.openapi-generator/FILES
@@ -2,7 +2,9 @@
 .travis.yml
 Cargo.toml
 README.md
+docs/ActionContainer.md
 docs/ApiResponse.md
+docs/Baz.md
 docs/Category.md
 docs/FakeApi.md
 docs/Order.md
@@ -23,7 +25,9 @@ src/apis/request.rs
 src/apis/store_api.rs
 src/apis/user_api.rs
 src/lib.rs
+src/models/action_container.rs
 src/models/api_response.rs
+src/models/baz.rs
 src/models/category.rs
 src/models/mod.rs
 src/models/order.rs
diff --git a/samples/client/petstore/rust/hyper/petstore/README.md b/samples/client/petstore/rust/hyper/petstore/README.md
index 2fe69e24cc8da61d2f44226e744599b78f6493fb..b068ac70fa7fc9cf2dab05c822a875ade2bb1568 100644
--- a/samples/client/petstore/rust/hyper/petstore/README.md
+++ b/samples/client/petstore/rust/hyper/petstore/README.md
@@ -50,7 +50,9 @@ Class | Method | HTTP request | Description
 
 ## Documentation For Models
 
+ - [ActionContainer](docs/ActionContainer.md)
  - [ApiResponse](docs/ApiResponse.md)
+ - [Baz](docs/Baz.md)
  - [Category](docs/Category.md)
  - [Order](docs/Order.md)
  - [Pet](docs/Pet.md)
diff --git a/samples/client/petstore/rust/hyper/petstore/docs/ActionContainer.md b/samples/client/petstore/rust/hyper/petstore/docs/ActionContainer.md
new file mode 100644
index 0000000000000000000000000000000000000000..d705faa58f2586be38b390f5769b172c11c2e3c8
--- /dev/null
+++ b/samples/client/petstore/rust/hyper/petstore/docs/ActionContainer.md
@@ -0,0 +1,11 @@
+# ActionContainer
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**action** | Option<[**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)
+
+
diff --git a/samples/client/petstore/rust/hyper/petstore/docs/Baz.md b/samples/client/petstore/rust/hyper/petstore/docs/Baz.md
new file mode 100644
index 0000000000000000000000000000000000000000..68c84b1b1b07da334a47b4628ece25cf27941910
--- /dev/null
+++ b/samples/client/petstore/rust/hyper/petstore/docs/Baz.md
@@ -0,0 +1,10 @@
+# Baz
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/rust/hyper/petstore/src/models/action_container.rs b/samples/client/petstore/rust/hyper/petstore/src/models/action_container.rs
new file mode 100644
index 0000000000000000000000000000000000000000..b63126c05e9d9bb5ff7198c23e7e76e910ea8ba4
--- /dev/null
+++ b/samples/client/petstore/rust/hyper/petstore/src/models/action_container.rs
@@ -0,0 +1,28 @@
+/*
+ * OpenAPI Petstore
+ *
+ * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ * 
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+
+
+#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
+pub struct ActionContainer {
+    #[serde(rename = "action")]
+    pub action: Option<Box<crate::models::Baz>>,
+}
+
+impl ActionContainer {
+    pub fn new(action: Option<crate::models::Baz>) -> ActionContainer {
+        ActionContainer {
+            action: if let Some(x) = action {Some(Box::new(x))} else {None},
+        }
+    }
+}
+
+
diff --git a/samples/client/petstore/rust/hyper/petstore/src/models/baz.rs b/samples/client/petstore/rust/hyper/petstore/src/models/baz.rs
new file mode 100644
index 0000000000000000000000000000000000000000..8a07bf66198d1b8c4034e59ec40a7bc3379524ba
--- /dev/null
+++ b/samples/client/petstore/rust/hyper/petstore/src/models/baz.rs
@@ -0,0 +1,39 @@
+/*
+ * OpenAPI Petstore
+ *
+ * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ * 
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+/// 
+#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
+pub enum Baz {
+    #[serde(rename = "A")]
+    A,
+    #[serde(rename = "B")]
+    B,
+
+}
+
+impl ToString for Baz {
+    fn to_string(&self) -> String {
+        match self {
+            Self::A => String::from("A"),
+            Self::B => String::from("B"),
+        }
+    }
+}
+
+impl Default for Baz {
+    fn default() -> Baz {
+        Self::A
+    }
+}
+
+
+
+
diff --git a/samples/client/petstore/rust/hyper/petstore/src/models/mod.rs b/samples/client/petstore/rust/hyper/petstore/src/models/mod.rs
index 37334443da29fd7d0438890ec6b30988fd80ea4f..10b2293873fb45e1c980ee9500c1b7733f9f3352 100644
--- a/samples/client/petstore/rust/hyper/petstore/src/models/mod.rs
+++ b/samples/client/petstore/rust/hyper/petstore/src/models/mod.rs
@@ -1,5 +1,9 @@
+pub mod action_container;
+pub use self::action_container::ActionContainer;
 pub mod api_response;
 pub use self::api_response::ApiResponse;
+pub mod baz;
+pub use self::baz::Baz;
 pub mod category;
 pub use self::category::Category;
 pub mod order;
diff --git a/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/FILES b/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/FILES
index 75bd989a45f7ca69bf8a49689bfca9d9f71b216c..dc1444953f780313c6ad44a0a17a77f2b34fcf69 100644
--- a/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/FILES
+++ b/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/FILES
@@ -2,7 +2,9 @@
 .travis.yml
 Cargo.toml
 README.md
+docs/ActionContainer.md
 docs/ApiResponse.md
+docs/Baz.md
 docs/Category.md
 docs/FakeApi.md
 docs/Order.md
@@ -21,7 +23,9 @@ src/apis/pet_api.rs
 src/apis/store_api.rs
 src/apis/user_api.rs
 src/lib.rs
+src/models/action_container.rs
 src/models/api_response.rs
+src/models/baz.rs
 src/models/category.rs
 src/models/mod.rs
 src/models/order.rs
diff --git a/samples/client/petstore/rust/reqwest/petstore/README.md b/samples/client/petstore/rust/reqwest/petstore/README.md
index af68b013a2d196576d86a7262d1c30937bc1c592..cd952b20964e0de66cee1da4e9e9775ee51e35f6 100644
--- a/samples/client/petstore/rust/reqwest/petstore/README.md
+++ b/samples/client/petstore/rust/reqwest/petstore/README.md
@@ -50,7 +50,9 @@ Class | Method | HTTP request | Description
 
 ## Documentation For Models
 
+ - [ActionContainer](docs/ActionContainer.md)
  - [ApiResponse](docs/ApiResponse.md)
+ - [Baz](docs/Baz.md)
  - [Category](docs/Category.md)
  - [Order](docs/Order.md)
  - [Pet](docs/Pet.md)
diff --git a/samples/client/petstore/rust/reqwest/petstore/docs/ActionContainer.md b/samples/client/petstore/rust/reqwest/petstore/docs/ActionContainer.md
new file mode 100644
index 0000000000000000000000000000000000000000..d705faa58f2586be38b390f5769b172c11c2e3c8
--- /dev/null
+++ b/samples/client/petstore/rust/reqwest/petstore/docs/ActionContainer.md
@@ -0,0 +1,11 @@
+# ActionContainer
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**action** | Option<[**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)
+
+
diff --git a/samples/client/petstore/rust/reqwest/petstore/docs/Baz.md b/samples/client/petstore/rust/reqwest/petstore/docs/Baz.md
new file mode 100644
index 0000000000000000000000000000000000000000..68c84b1b1b07da334a47b4628ece25cf27941910
--- /dev/null
+++ b/samples/client/petstore/rust/reqwest/petstore/docs/Baz.md
@@ -0,0 +1,10 @@
+# Baz
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/rust/reqwest/petstore/src/models/action_container.rs b/samples/client/petstore/rust/reqwest/petstore/src/models/action_container.rs
new file mode 100644
index 0000000000000000000000000000000000000000..b63126c05e9d9bb5ff7198c23e7e76e910ea8ba4
--- /dev/null
+++ b/samples/client/petstore/rust/reqwest/petstore/src/models/action_container.rs
@@ -0,0 +1,28 @@
+/*
+ * OpenAPI Petstore
+ *
+ * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ * 
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+
+
+#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
+pub struct ActionContainer {
+    #[serde(rename = "action")]
+    pub action: Option<Box<crate::models::Baz>>,
+}
+
+impl ActionContainer {
+    pub fn new(action: Option<crate::models::Baz>) -> ActionContainer {
+        ActionContainer {
+            action: if let Some(x) = action {Some(Box::new(x))} else {None},
+        }
+    }
+}
+
+
diff --git a/samples/client/petstore/rust/reqwest/petstore/src/models/baz.rs b/samples/client/petstore/rust/reqwest/petstore/src/models/baz.rs
new file mode 100644
index 0000000000000000000000000000000000000000..8a07bf66198d1b8c4034e59ec40a7bc3379524ba
--- /dev/null
+++ b/samples/client/petstore/rust/reqwest/petstore/src/models/baz.rs
@@ -0,0 +1,39 @@
+/*
+ * OpenAPI Petstore
+ *
+ * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ * 
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+/// 
+#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
+pub enum Baz {
+    #[serde(rename = "A")]
+    A,
+    #[serde(rename = "B")]
+    B,
+
+}
+
+impl ToString for Baz {
+    fn to_string(&self) -> String {
+        match self {
+            Self::A => String::from("A"),
+            Self::B => String::from("B"),
+        }
+    }
+}
+
+impl Default for Baz {
+    fn default() -> Baz {
+        Self::A
+    }
+}
+
+
+
+
diff --git a/samples/client/petstore/rust/reqwest/petstore/src/models/mod.rs b/samples/client/petstore/rust/reqwest/petstore/src/models/mod.rs
index 37334443da29fd7d0438890ec6b30988fd80ea4f..10b2293873fb45e1c980ee9500c1b7733f9f3352 100644
--- a/samples/client/petstore/rust/reqwest/petstore/src/models/mod.rs
+++ b/samples/client/petstore/rust/reqwest/petstore/src/models/mod.rs
@@ -1,5 +1,9 @@
+pub mod action_container;
+pub use self::action_container::ActionContainer;
 pub mod api_response;
 pub use self::api_response::ApiResponse;
+pub mod baz;
+pub use self::baz::Baz;
 pub mod category;
 pub use self::category::Category;
 pub mod order;