From e0c867cd6a6b08c4ca8a044bdb66a8d245c8e2ab Mon Sep 17 00:00:00 2001 From: Graham Esau Date: Mon, 28 Aug 2023 12:26:15 +0100 Subject: [PATCH] Forward RawValue's JsonSchema impl to Value --- schemars/src/json_schema_impls/serdejson.rs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/schemars/src/json_schema_impls/serdejson.rs b/schemars/src/json_schema_impls/serdejson.rs index df6ad497..01a492c6 100644 --- a/schemars/src/json_schema_impls/serdejson.rs +++ b/schemars/src/json_schema_impls/serdejson.rs @@ -35,14 +35,4 @@ impl JsonSchema for Number { } #[cfg(feature = "raw_value")] -impl JsonSchema for serde_json::value::RawValue { - no_ref_schema!(); - - fn schema_name() -> String { - "AnyValue".to_owned() - } - - fn json_schema(_: &mut SchemaGenerator) -> Schema { - Schema::Bool(true) - } -} +forward_impl!(serde_json::value::RawValue => Value);