diff --git a/schemars/Cargo.toml b/schemars/Cargo.toml index bd45a8a..84f2b6b 100644 --- a/schemars/Cargo.toml +++ b/schemars/Cargo.toml @@ -2,14 +2,14 @@ name = "schemars" description = "Generate JSON Schemas from Rust code" repository = "https://github.com/GREsau/schemars" -version = "0.1.5" +version = "0.1.6" authors = ["Graham Esau "] edition = "2018" license = "MIT" keywords = ["rust", "json-schema", "serde"] [dependencies] -schemars_derive = { version = "0.1.5", path = "../schemars_derive" } +schemars_derive = { version = "0.1.6", path = "../schemars_derive" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" diff --git a/schemars/src/json_schema_impls.rs b/schemars/src/json_schema_impls.rs index ed57681..89dbad1 100644 --- a/schemars/src/json_schema_impls.rs +++ b/schemars/src/json_schema_impls.rs @@ -295,7 +295,7 @@ impl JsonSchema for Option { } } -impl JsonSchema for std::marker::PhantomData { +impl JsonSchema for std::marker::PhantomData { no_ref_schema!(); fn schema_name() -> String { @@ -313,7 +313,7 @@ macro_rules! deref_impl { ($($desc:tt)+) => { impl $($desc)+ where - T: JsonSchema, + T: ?Sized + JsonSchema, { fn is_referenceable() -> bool { T::is_referenceable() diff --git a/schemars/tests/flatten.rs b/schemars/tests/flatten.rs index a3d06e7..10a80d3 100644 --- a/schemars/tests/flatten.rs +++ b/schemars/tests/flatten.rs @@ -29,7 +29,7 @@ struct Deep2 { #[derive(Debug, JsonSchema)] struct Deep3 { - baz: String, + baz: &'static str, } #[test] diff --git a/schemars_derive/Cargo.toml b/schemars_derive/Cargo.toml index 862c3f6..aae2284 100644 --- a/schemars_derive/Cargo.toml +++ b/schemars_derive/Cargo.toml @@ -2,7 +2,7 @@ name = "schemars_derive" description = "Macros for #[derive(JsonSchema)], for use with schemars" repository = "https://github.com/GREsau/schemars" -version = "0.1.5" +version = "0.1.6" authors = ["Graham Esau "] edition = "2018" license = "MIT"