diff --git a/bin/rust-petstore-reqwest-async.sh b/bin/rust-petstore-reqwest-async.sh index 13a7c649bcb2..65a1d1b4a597 100755 --- a/bin/rust-petstore-reqwest-async.sh +++ b/bin/rust-petstore-reqwest-async.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties $@" -ags="generate -t modules/openapi-generator/src/main/resources/rust -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g rust --library reqwest -o samples/client/petstore/rust/reqwest/petstore-async --additional-properties supportAsync=true,packageName=petstore-reqwest-async $@" +ags="generate -t modules/openapi-generator/src/main/resources/rust -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g rust --library reqwest -o samples/client/petstore/rust/reqwest/petstore-async --additional-properties supportAsync=true,useSingleRequestParameter=true,packageName=petstore-reqwest-async $@" java $JAVA_OPTS -jar $executable $ags diff --git a/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache b/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache index c62d2654aec6..28ac207d4823 100644 --- a/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache +++ b/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache @@ -46,7 +46,7 @@ pub use self::{{{classFilename}}}::{ {{{operationId}}} }; {{#vendorExtensions.x-group-parameters}} {{#allParams}} {{#-first}} -pub use self::{{{classFilename}}}::{{{operationIdCamelCase}}} as {{{classname}}}{{{operationIdCamelCase}}}; +pub use self::{{{classFilename}}}::{{{operationIdCamelCase}}}Params as {{{classname}}}{{{operationIdCamelCase}}}Params; {{/-first}} {{/allParams}} {{/vendorExtensions.x-group-parameters}} diff --git a/pom.xml b/pom.xml index 89cc73ec378b..27484540fbd6 100644 --- a/pom.xml +++ b/pom.xml @@ -1168,6 +1168,7 @@ samples/client/petstore/cpp-qt5 samples/client/petstore/rust samples/client/petstore/rust/reqwest/petstore + samples/client/petstore/rust/reqwest/petstore-async samples/client/petstore/php/OpenAPIClient-php samples/openapi3/client/petstore/php/OpenAPIClient-php diff --git a/samples/client/petstore/rust/reqwest/petstore-async/pom.xml b/samples/client/petstore/rust/reqwest/petstore-async/pom.xml new file mode 100644 index 000000000000..1f7546b6bdad --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async/pom.xml @@ -0,0 +1,46 @@ + + 4.0.0 + org.openapitools + RustReqwestAsyncClientTests + pom + 1.0-SNAPSHOT + Rust Reqwest Async Petstore Client + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + bundle-test + integration-test + + exec + + + cargo + + build + + + + + + + +