[Rust] Changed 'UUID' handling into 'uuid' crate (#12895)

* [Rust] Changed 'UUID' handling into 'uuid' crate

* [Rust] updated 'samples/'
This commit is contained in:
Taufik Rama 2022-07-19 10:03:53 +07:00 committed by GitHub
parent ed4ed3923f
commit 4ee336a9da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 8 additions and 1 deletions

View File

@ -166,7 +166,7 @@ public class RustClientCodegen extends DefaultCodegen implements CodegenConfig {
typeMapping.put("double", "f64");
typeMapping.put("boolean", "bool");
typeMapping.put("string", "String");
typeMapping.put("UUID", "String");
typeMapping.put("UUID", "uuid::Uuid");
typeMapping.put("URI", "String");
typeMapping.put("date", "string");
typeMapping.put("DateTime", "String");

View File

@ -9,6 +9,7 @@ serde = "^1.0"
serde_derive = "^1.0"
serde_json = "^1.0"
url = "^2.2"
uuid = { version = "^1.0", features = ["serde"] }
{{#hyper}}
hyper = { version = "~0.14", features = ["full"] }
hyper-tls = "~0.5"

View File

@ -50,6 +50,7 @@ pub(crate) struct Request {
serialized_body: Option<String>,
}
#[allow(dead_code)]
impl Request {
pub fn new(method: hyper::Method, path: String) -> Self {
Request {

View File

@ -9,6 +9,7 @@ serde = "^1.0"
serde_derive = "^1.0"
serde_json = "^1.0"
url = "^2.2"
uuid = { version = "^1.0", features = ["serde"] }
hyper = { version = "~0.14", features = ["full"] }
hyper-tls = "~0.5"
http = "~0.2"

View File

@ -50,6 +50,7 @@ pub(crate) struct Request {
serialized_body: Option<String>,
}
#[allow(dead_code)]
impl Request {
pub fn new(method: hyper::Method, path: String) -> Self {
Request {

View File

@ -9,6 +9,7 @@ serde = "^1.0"
serde_derive = "^1.0"
serde_json = "^1.0"
url = "^2.2"
uuid = { version = "^1.0", features = ["serde"] }
[dependencies.reqwest]
version = "^0.11"
features = ["json", "multipart"]

View File

@ -9,6 +9,7 @@ serde = "^1.0"
serde_derive = "^1.0"
serde_json = "^1.0"
url = "^2.2"
uuid = { version = "^1.0", features = ["serde"] }
reqwest = "~0.9"
aws-sigv4 = "0.3.0"
http = "0.2.5"

View File

@ -9,6 +9,7 @@ serde = "^1.0"
serde_derive = "^1.0"
serde_json = "^1.0"
url = "^2.2"
uuid = { version = "^1.0", features = ["serde"] }
reqwest = "~0.9"
[dev-dependencies]