diff --git a/schemars/Cargo.toml b/schemars/Cargo.toml index 384f3eae..32846be5 100644 --- a/schemars/Cargo.toml +++ b/schemars/Cargo.toml @@ -32,6 +32,7 @@ smallvec1 = { version = "1.0", default-features = false, optional = true, packag smol_str02 = { version = "0.2.1", default-features = false, optional = true, package = "smol_str" } url2 = { version = "2.0", default-features = false, optional = true, package = "url" } uuid1 = { version = "1.0", default-features = false, optional = true, package = "uuid" } +rocket05 = { version = "0.5", default-features = false, optional = true, package = "rocket" } [dev-dependencies] pretty_assertions = "1.2.1" diff --git a/schemars/src/json_schema_impls/mod.rs b/schemars/src/json_schema_impls/mod.rs index cbe1a075..b598f064 100644 --- a/schemars/src/json_schema_impls/mod.rs +++ b/schemars/src/json_schema_impls/mod.rs @@ -88,3 +88,6 @@ mod url2; #[cfg(feature = "uuid1")] mod uuid1; + +#[cfg(feature = "rocket05")] +mod rocket05; diff --git a/schemars/src/json_schema_impls/rocket05.rs b/schemars/src/json_schema_impls/rocket05.rs new file mode 100644 index 00000000..b596bce9 --- /dev/null +++ b/schemars/src/json_schema_impls/rocket05.rs @@ -0,0 +1,8 @@ +use alloc::string::String; +use alloc::vec::Vec; + +forward_impl!(rocket05::fs::TempFile<'_> => Vec); +forward_impl!(rocket05::fs::NamedFile => Vec); + +forward_impl!(rocket05::http::RawStr => String); +forward_impl!(rocket05::http::RawStrBuf => String);