schemars
schemars copied to clipboard
Support for serde_json::RawValue
trafficstars
It seems that there's no support for serde_json::value::RawValue, which seems a bit odd.
error[E0277]: the trait bound `serde_json::value::RawValue: JsonSchema` is not satisfied
|
62 | component: Box<RawValue>,
| ^^^ the trait `JsonSchema` is not implemented for `serde_json::value::RawValue`
|
= note: required because of the requirements on the impl of `JsonSchema` for `Box<serde_json::value::RawValue>`
It indeed seems to be missing. https://github.com/GREsau/schemars/blob/master/schemars/src/json_schema_impls/serdejson.rs
PR is welcome.
What would you expect that JSON schema to be for RawValue? Same as Value?
@ahl Yes, my assumption is that it would work same as Value.
+1