diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java index 841ad961a290..7135f5261789 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java @@ -19,10 +19,7 @@ import com.samskivert.mustache.Mustache; import com.samskivert.mustache.Template; -import io.swagger.v3.oas.models.media.ArraySchema; -import io.swagger.v3.oas.models.media.FileSchema; -import io.swagger.v3.oas.models.media.Schema; -import io.swagger.v3.oas.models.media.StringSchema; +import io.swagger.v3.oas.models.media.*; import io.swagger.v3.parser.util.SchemaTypeUtil; import joptsimple.internal.Strings; import org.openapitools.codegen.*; @@ -42,6 +39,7 @@ import java.math.BigDecimal; import java.math.BigInteger; import java.util.*; +import java.util.stream.Collectors; public class RustClientCodegen extends AbstractRustCodegen implements CodegenConfig { private final Logger LOGGER = LoggerFactory.getLogger(RustClientCodegen.class); @@ -221,6 +219,14 @@ public CodegenModel fromModel(String name, Schema model) { throw new RuntimeException("oneOf size does not match the model"); } + Map mappedNameByRef = Optional.ofNullable(model.getDiscriminator()) + .map(Discriminator::getMapping) + .map(mapping -> mapping.entrySet() + .stream() + .collect(Collectors.toMap(Map.Entry::getValue, Map.Entry::getKey)) + ) + .orElse(Collections.emptyMap()); + for (int i = 0; i < oneOfs.size(); i++) { CodegenProperty oneOf = oneOfs.get(i); Schema schema = schemas.get(i); @@ -228,6 +234,9 @@ public CodegenModel fromModel(String name, Schema model) { if (aliasType.startsWith("models::")) { aliasType = aliasType.substring("models::".length()); } + if (oneOf.getRef() != null) { + oneOf.setBaseName(mappedNameByRef.get(oneOf.getRef())); + } oneOf.setName(aliasType); } } @@ -239,10 +248,6 @@ public CodegenModel fromModel(String name, Schema model) { public ModelsMap postProcessModels(ModelsMap objs) { // Remove the discriminator field from the model, serde will take care of this for (ModelMap model : objs.getModels()) { - System.out.println("\nMODEL: \n\n"); - System.out.println(model); - System.out.println("\n\n\n"); - CodegenModel cm = model.getModel(); if (cm.discriminator != null) { diff --git a/modules/openapi-generator/src/main/resources/rust/hyper/api.mustache b/modules/openapi-generator/src/main/resources/rust/hyper/api.mustache index dffab3ce8a7a..57d9e9af5c8b 100644 --- a/modules/openapi-generator/src/main/resources/rust/hyper/api.mustache +++ b/modules/openapi-generator/src/main/resources/rust/hyper/api.mustache @@ -8,6 +8,7 @@ use std::option::Option; use hyper; use futures::Future; +use crate::models; use super::{Error, configuration}; use super::request as __internal_request; diff --git a/modules/openapi-generator/src/main/resources/rust/model.mustache b/modules/openapi-generator/src/main/resources/rust/model.mustache index 3b46e0c61cb5..4bb93ff6e967 100644 --- a/modules/openapi-generator/src/main/resources/rust/model.mustache +++ b/modules/openapi-generator/src/main/resources/rust/model.mustache @@ -60,21 +60,15 @@ pub enum {{{classname}}} { {{/mappedModels}} {{/oneOf}} {{^oneOf.isEmpty}} - {{#mappedModels}} - {{#description}} - /// {{{.}}} - {{/description}} - #[serde(rename="{{mappingName}}")] - {{{modelName}}}(Box<{{{modelName}}}>), - {{/mappedModels}} - {{^mappedModels}} {{#composedSchemas.oneOf}} {{#description}} /// {{{.}}} {{/description}} + {{#baseName}} + #[serde(rename="{{{.}}}")] + {{/baseName}} {{{name}}}(Box<{{{dataType}}}>), {{/composedSchemas.oneOf}} - {{/mappedModels}} {{/oneOf.isEmpty}} } diff --git a/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache b/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache index f848674e1371..44cae73cbaa5 100644 --- a/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache +++ b/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache @@ -2,7 +2,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; {{#operations}} diff --git a/samples/client/others/rust/Cargo.lock b/samples/client/others/rust/Cargo.lock index 5c3045aa7c89..fd0e7be93694 100644 --- a/samples/client/others/rust/Cargo.lock +++ b/samples/client/others/rust/Cargo.lock @@ -615,6 +615,34 @@ version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +[[package]] +name = "oneof-array-map-hyper" +version = "0.0.1" +dependencies = [ + "base64 0.7.0", + "futures", + "http", + "hyper", + "hyper-tls", + "serde", + "serde_derive", + "serde_json", + "url", + "uuid", +] + +[[package]] +name = "oneof-array-map-reqwest" +version = "0.0.1" +dependencies = [ + "reqwest", + "serde", + "serde_derive", + "serde_json", + "url", + "uuid", +] + [[package]] name = "oneof-hyper" version = "0.0.1" diff --git a/samples/client/others/rust/hyper/composed-oneof/src/apis/default_api.rs b/samples/client/others/rust/hyper/composed-oneof/src/apis/default_api.rs index bc7d7d735ecd..2a1f81b06bf6 100644 --- a/samples/client/others/rust/hyper/composed-oneof/src/apis/default_api.rs +++ b/samples/client/others/rust/hyper/composed-oneof/src/apis/default_api.rs @@ -17,6 +17,7 @@ use std::option::Option; use hyper; use futures::Future; +use crate::models; use super::{Error, configuration}; use super::request as __internal_request; diff --git a/samples/client/others/rust/hyper/composed-oneof/src/models/create_state_request.rs b/samples/client/others/rust/hyper/composed-oneof/src/models/create_state_request.rs index 7a83f9a4d045..751362a22d5d 100644 --- a/samples/client/others/rust/hyper/composed-oneof/src/models/create_state_request.rs +++ b/samples/client/others/rust/hyper/composed-oneof/src/models/create_state_request.rs @@ -16,9 +16,9 @@ use crate::models; #[serde(tag = "realtype")] pub enum CreateStateRequest { #[serde(rename="a-type")] - ObjA(Box), + ObjA(Box), #[serde(rename="b-type")] - ObjB(Box), + ObjB(Box), } impl Default for CreateStateRequest { diff --git a/samples/client/others/rust/hyper/composed-oneof/src/models/custom_one_of_array_schema_inner.rs b/samples/client/others/rust/hyper/composed-oneof/src/models/custom_one_of_array_schema_inner.rs index 6147d36e4596..255030da6686 100644 --- a/samples/client/others/rust/hyper/composed-oneof/src/models/custom_one_of_array_schema_inner.rs +++ b/samples/client/others/rust/hyper/composed-oneof/src/models/custom_one_of_array_schema_inner.rs @@ -16,11 +16,11 @@ use crate::models; #[serde(tag = "realtype")] pub enum CustomOneOfArraySchemaInner { #[serde(rename="a-type")] - ObjA(Box), + ObjA(Box), #[serde(rename="b-type")] - ObjB(Box), + ObjB(Box), #[serde(rename="c-type")] - ObjC(Box), + ObjC(Box), } impl Default for CustomOneOfArraySchemaInner { diff --git a/samples/client/others/rust/hyper/composed-oneof/src/models/custom_one_of_schema.rs b/samples/client/others/rust/hyper/composed-oneof/src/models/custom_one_of_schema.rs index bedfbfbe287b..0bddc69a829a 100644 --- a/samples/client/others/rust/hyper/composed-oneof/src/models/custom_one_of_schema.rs +++ b/samples/client/others/rust/hyper/composed-oneof/src/models/custom_one_of_schema.rs @@ -16,9 +16,9 @@ use crate::models; #[serde(tag = "realtype")] pub enum CustomOneOfSchema { #[serde(rename="a-type")] - ObjA(Box), + ObjA(Box), #[serde(rename="b-type")] - ObjB(Box), + ObjB(Box), } impl Default for CustomOneOfSchema { diff --git a/samples/client/others/rust/hyper/composed-oneof/src/models/get_state_200_response.rs b/samples/client/others/rust/hyper/composed-oneof/src/models/get_state_200_response.rs index 8f1e94058ecf..b87bf89b7627 100644 --- a/samples/client/others/rust/hyper/composed-oneof/src/models/get_state_200_response.rs +++ b/samples/client/others/rust/hyper/composed-oneof/src/models/get_state_200_response.rs @@ -16,11 +16,11 @@ use crate::models; #[serde(tag = "realtype")] pub enum GetState200Response { #[serde(rename="a-type")] - ObjA(Box), + ObjA(Box), #[serde(rename="b-type")] - ObjB(Box), + ObjB(Box), #[serde(rename="d-type")] - ObjD(Box), + ObjD(Box), } impl Default for GetState200Response { diff --git a/samples/client/others/rust/hyper/emptyObject/src/apis/default_api.rs b/samples/client/others/rust/hyper/emptyObject/src/apis/default_api.rs index 3d6230b67041..1ad9fa3768e7 100644 --- a/samples/client/others/rust/hyper/emptyObject/src/apis/default_api.rs +++ b/samples/client/others/rust/hyper/emptyObject/src/apis/default_api.rs @@ -17,6 +17,7 @@ use std::option::Option; use hyper; use futures::Future; +use crate::models; use super::{Error, configuration}; use super::request as __internal_request; diff --git a/samples/client/others/rust/hyper/oneOf-array-map/src/apis/default_api.rs b/samples/client/others/rust/hyper/oneOf-array-map/src/apis/default_api.rs index 53653461d99f..90082edd0eed 100644 --- a/samples/client/others/rust/hyper/oneOf-array-map/src/apis/default_api.rs +++ b/samples/client/others/rust/hyper/oneOf-array-map/src/apis/default_api.rs @@ -17,6 +17,7 @@ use std::option::Option; use hyper; use futures::Future; +use crate::models; use super::{Error, configuration}; use super::request as __internal_request; diff --git a/samples/client/others/rust/hyper/oneOf/src/apis/bar_api.rs b/samples/client/others/rust/hyper/oneOf/src/apis/bar_api.rs index 27db239cdc86..e3d76e9197f7 100644 --- a/samples/client/others/rust/hyper/oneOf/src/apis/bar_api.rs +++ b/samples/client/others/rust/hyper/oneOf/src/apis/bar_api.rs @@ -17,6 +17,7 @@ use std::option::Option; use hyper; use futures::Future; +use crate::models; use super::{Error, configuration}; use super::request as __internal_request; diff --git a/samples/client/others/rust/hyper/oneOf/src/apis/foo_api.rs b/samples/client/others/rust/hyper/oneOf/src/apis/foo_api.rs index e3b6de5b371f..abea506ea5b0 100644 --- a/samples/client/others/rust/hyper/oneOf/src/apis/foo_api.rs +++ b/samples/client/others/rust/hyper/oneOf/src/apis/foo_api.rs @@ -17,6 +17,7 @@ use std::option::Option; use hyper; use futures::Future; +use crate::models; use super::{Error, configuration}; use super::request as __internal_request; diff --git a/samples/client/others/rust/hyper/oneOf/src/models/fruit.rs b/samples/client/others/rust/hyper/oneOf/src/models/fruit.rs index d4a7b304d19e..4f479ec09e90 100644 --- a/samples/client/others/rust/hyper/oneOf/src/models/fruit.rs +++ b/samples/client/others/rust/hyper/oneOf/src/models/fruit.rs @@ -16,9 +16,9 @@ use crate::models; #[serde(tag = "fruitType")] pub enum Fruit { #[serde(rename="APPLE")] - Apple(Box), + Apple(Box), #[serde(rename="BANANA")] - Banana(Box), + Banana(Box), } impl Default for Fruit { diff --git a/samples/client/others/rust/reqwest-regression-16119/src/apis/default_api.rs b/samples/client/others/rust/reqwest-regression-16119/src/apis/default_api.rs index 297c900efd2e..9f70938d1bc3 100644 --- a/samples/client/others/rust/reqwest-regression-16119/src/apis/default_api.rs +++ b/samples/client/others/rust/reqwest-regression-16119/src/apis/default_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; diff --git a/samples/client/others/rust/reqwest/composed-oneof/src/apis/default_api.rs b/samples/client/others/rust/reqwest/composed-oneof/src/apis/default_api.rs index c227c76d414f..c2a02e02dcd7 100644 --- a/samples/client/others/rust/reqwest/composed-oneof/src/apis/default_api.rs +++ b/samples/client/others/rust/reqwest/composed-oneof/src/apis/default_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; diff --git a/samples/client/others/rust/reqwest/composed-oneof/src/models/create_state_request.rs b/samples/client/others/rust/reqwest/composed-oneof/src/models/create_state_request.rs index 7a83f9a4d045..751362a22d5d 100644 --- a/samples/client/others/rust/reqwest/composed-oneof/src/models/create_state_request.rs +++ b/samples/client/others/rust/reqwest/composed-oneof/src/models/create_state_request.rs @@ -16,9 +16,9 @@ use crate::models; #[serde(tag = "realtype")] pub enum CreateStateRequest { #[serde(rename="a-type")] - ObjA(Box), + ObjA(Box), #[serde(rename="b-type")] - ObjB(Box), + ObjB(Box), } impl Default for CreateStateRequest { diff --git a/samples/client/others/rust/reqwest/composed-oneof/src/models/custom_one_of_array_schema_inner.rs b/samples/client/others/rust/reqwest/composed-oneof/src/models/custom_one_of_array_schema_inner.rs index 6147d36e4596..255030da6686 100644 --- a/samples/client/others/rust/reqwest/composed-oneof/src/models/custom_one_of_array_schema_inner.rs +++ b/samples/client/others/rust/reqwest/composed-oneof/src/models/custom_one_of_array_schema_inner.rs @@ -16,11 +16,11 @@ use crate::models; #[serde(tag = "realtype")] pub enum CustomOneOfArraySchemaInner { #[serde(rename="a-type")] - ObjA(Box), + ObjA(Box), #[serde(rename="b-type")] - ObjB(Box), + ObjB(Box), #[serde(rename="c-type")] - ObjC(Box), + ObjC(Box), } impl Default for CustomOneOfArraySchemaInner { diff --git a/samples/client/others/rust/reqwest/composed-oneof/src/models/custom_one_of_schema.rs b/samples/client/others/rust/reqwest/composed-oneof/src/models/custom_one_of_schema.rs index bedfbfbe287b..0bddc69a829a 100644 --- a/samples/client/others/rust/reqwest/composed-oneof/src/models/custom_one_of_schema.rs +++ b/samples/client/others/rust/reqwest/composed-oneof/src/models/custom_one_of_schema.rs @@ -16,9 +16,9 @@ use crate::models; #[serde(tag = "realtype")] pub enum CustomOneOfSchema { #[serde(rename="a-type")] - ObjA(Box), + ObjA(Box), #[serde(rename="b-type")] - ObjB(Box), + ObjB(Box), } impl Default for CustomOneOfSchema { diff --git a/samples/client/others/rust/reqwest/composed-oneof/src/models/get_state_200_response.rs b/samples/client/others/rust/reqwest/composed-oneof/src/models/get_state_200_response.rs index 8f1e94058ecf..b87bf89b7627 100644 --- a/samples/client/others/rust/reqwest/composed-oneof/src/models/get_state_200_response.rs +++ b/samples/client/others/rust/reqwest/composed-oneof/src/models/get_state_200_response.rs @@ -16,11 +16,11 @@ use crate::models; #[serde(tag = "realtype")] pub enum GetState200Response { #[serde(rename="a-type")] - ObjA(Box), + ObjA(Box), #[serde(rename="b-type")] - ObjB(Box), + ObjB(Box), #[serde(rename="d-type")] - ObjD(Box), + ObjD(Box), } impl Default for GetState200Response { diff --git a/samples/client/others/rust/reqwest/emptyObject/src/apis/default_api.rs b/samples/client/others/rust/reqwest/emptyObject/src/apis/default_api.rs index 9f118fb45449..09832aa9133e 100644 --- a/samples/client/others/rust/reqwest/emptyObject/src/apis/default_api.rs +++ b/samples/client/others/rust/reqwest/emptyObject/src/apis/default_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; diff --git a/samples/client/others/rust/reqwest/oneOf-array-map/src/apis/default_api.rs b/samples/client/others/rust/reqwest/oneOf-array-map/src/apis/default_api.rs index 004c4913a470..b87854cd090c 100644 --- a/samples/client/others/rust/reqwest/oneOf-array-map/src/apis/default_api.rs +++ b/samples/client/others/rust/reqwest/oneOf-array-map/src/apis/default_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; diff --git a/samples/client/others/rust/reqwest/oneOf/src/apis/bar_api.rs b/samples/client/others/rust/reqwest/oneOf/src/apis/bar_api.rs index 0025fe7913fb..f110aec984cc 100644 --- a/samples/client/others/rust/reqwest/oneOf/src/apis/bar_api.rs +++ b/samples/client/others/rust/reqwest/oneOf/src/apis/bar_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; diff --git a/samples/client/others/rust/reqwest/oneOf/src/apis/foo_api.rs b/samples/client/others/rust/reqwest/oneOf/src/apis/foo_api.rs index f21b9a728087..52098ac7232d 100644 --- a/samples/client/others/rust/reqwest/oneOf/src/apis/foo_api.rs +++ b/samples/client/others/rust/reqwest/oneOf/src/apis/foo_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; diff --git a/samples/client/others/rust/reqwest/oneOf/src/models/fruit.rs b/samples/client/others/rust/reqwest/oneOf/src/models/fruit.rs index d4a7b304d19e..4f479ec09e90 100644 --- a/samples/client/others/rust/reqwest/oneOf/src/models/fruit.rs +++ b/samples/client/others/rust/reqwest/oneOf/src/models/fruit.rs @@ -16,9 +16,9 @@ use crate::models; #[serde(tag = "fruitType")] pub enum Fruit { #[serde(rename="APPLE")] - Apple(Box), + Apple(Box), #[serde(rename="BANANA")] - Banana(Box), + Banana(Box), } impl Default for Fruit { diff --git a/samples/client/petstore/rust/hyper/petstore/src/apis/fake_api.rs b/samples/client/petstore/rust/hyper/petstore/src/apis/fake_api.rs index 49ffc5a3bce0..685b7262fff4 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/apis/fake_api.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/apis/fake_api.rs @@ -17,6 +17,7 @@ use std::option::Option; use hyper; use futures::Future; +use crate::models; use super::{Error, configuration}; use super::request as __internal_request; diff --git a/samples/client/petstore/rust/hyper/petstore/src/apis/pet_api.rs b/samples/client/petstore/rust/hyper/petstore/src/apis/pet_api.rs index edbf3e23bff2..3813527d3519 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/apis/pet_api.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/apis/pet_api.rs @@ -17,6 +17,7 @@ use std::option::Option; use hyper; use futures::Future; +use crate::models; use super::{Error, configuration}; use super::request as __internal_request; diff --git a/samples/client/petstore/rust/hyper/petstore/src/apis/store_api.rs b/samples/client/petstore/rust/hyper/petstore/src/apis/store_api.rs index 6038b8e51325..c2afd7683abb 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/apis/store_api.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/apis/store_api.rs @@ -17,6 +17,7 @@ use std::option::Option; use hyper; use futures::Future; +use crate::models; use super::{Error, configuration}; use super::request as __internal_request; diff --git a/samples/client/petstore/rust/hyper/petstore/src/apis/testing_api.rs b/samples/client/petstore/rust/hyper/petstore/src/apis/testing_api.rs index 60ab9102fef4..a7df972d7331 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/apis/testing_api.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/apis/testing_api.rs @@ -17,6 +17,7 @@ use std::option::Option; use hyper; use futures::Future; +use crate::models; use super::{Error, configuration}; use super::request as __internal_request; diff --git a/samples/client/petstore/rust/hyper/petstore/src/apis/user_api.rs b/samples/client/petstore/rust/hyper/petstore/src/apis/user_api.rs index dc14ad51bf58..ebef22602d0b 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/apis/user_api.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/apis/user_api.rs @@ -17,6 +17,7 @@ use std::option::Option; use hyper; use futures::Future; +use crate::models; use super::{Error, configuration}; use super::request as __internal_request; diff --git a/samples/client/petstore/rust/reqwest/name-mapping/src/apis/fake_api.rs b/samples/client/petstore/rust/reqwest/name-mapping/src/apis/fake_api.rs index 7798ebce49d3..e40fc8b66c4d 100644 --- a/samples/client/petstore/rust/reqwest/name-mapping/src/apis/fake_api.rs +++ b/samples/client/petstore/rust/reqwest/name-mapping/src/apis/fake_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/fake_api.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/fake_api.rs index f6179ab29827..78d3ba30ec0c 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/fake_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/fake_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; /// struct for passing parameters to the method [`test_nullable_required_param`] diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/pet_api.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/pet_api.rs index 2e56c86ce25c..a881754edf61 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/pet_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/pet_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; /// struct for passing parameters to the method [`add_pet`] diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/store_api.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/store_api.rs index 43b6a5f39ed8..684a12e62dd0 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/store_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/store_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; /// struct for passing parameters to the method [`delete_order`] diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/testing_api.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/testing_api.rs index cf422b2eba37..86f87242fcc6 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/testing_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/testing_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/user_api.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/user_api.rs index 1d56ae6d3f26..c8200a2dc84a 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/user_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/user_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; /// struct for passing parameters to the method [`create_user`] diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/fake_api.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/fake_api.rs index f6179ab29827..78d3ba30ec0c 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/fake_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/fake_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; /// struct for passing parameters to the method [`test_nullable_required_param`] diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs index 2e56c86ce25c..a881754edf61 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/pet_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; /// struct for passing parameters to the method [`add_pet`] diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs index 43b6a5f39ed8..684a12e62dd0 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; /// struct for passing parameters to the method [`delete_order`] diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/testing_api.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/testing_api.rs index cf422b2eba37..86f87242fcc6 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/testing_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/testing_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/user_api.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/user_api.rs index 1d56ae6d3f26..c8200a2dc84a 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/user_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/user_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; /// struct for passing parameters to the method [`create_user`] diff --git a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/fake_api.rs b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/fake_api.rs index d070648614aa..af7818dd030b 100644 --- a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/fake_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/fake_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; diff --git a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/pet_api.rs b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/pet_api.rs index a7d5a4168acf..9fe35d29c73c 100644 --- a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/pet_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/pet_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; diff --git a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/store_api.rs b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/store_api.rs index bc381ce214dc..f15f14107786 100644 --- a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/store_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/store_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; diff --git a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/testing_api.rs b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/testing_api.rs index c553548a7328..f6bca74913ea 100644 --- a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/testing_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/testing_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; diff --git a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/user_api.rs b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/user_api.rs index aba69fdaee2a..00b8cc7b3efa 100644 --- a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/user_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/user_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/fake_api.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/fake_api.rs index d070648614aa..af7818dd030b 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/fake_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/fake_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs index b7bc8fa29639..c8612c474397 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/pet_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs index c49837f4ecb2..3ee709fcf1b4 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/testing_api.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/testing_api.rs index c553548a7328..f6bca74913ea 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/testing_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/testing_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration}; diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/user_api.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/user_api.rs index 99284e8b73cb..c157f85bea14 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/user_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/user_api.rs @@ -11,7 +11,7 @@ use reqwest; -use crate::apis::ResponseContent; +use crate::{apis::ResponseContent, models}; use super::{Error, configuration};