Cover serde_json RawValue type by schemars
This commit is contained in:
parent
5836afbd64
commit
cb392d1829
2 changed files with 15 additions and 0 deletions
|
@ -60,6 +60,8 @@ uuid = ["uuid08"]
|
||||||
arrayvec = ["arrayvec05"]
|
arrayvec = ["arrayvec05"]
|
||||||
indexmap1 = ["indexmap"]
|
indexmap1 = ["indexmap"]
|
||||||
|
|
||||||
|
raw_value = ["serde_json/raw_value"]
|
||||||
|
|
||||||
ui_test = []
|
ui_test = []
|
||||||
|
|
||||||
[[test]]
|
[[test]]
|
||||||
|
|
|
@ -33,3 +33,16 @@ impl JsonSchema for Number {
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue