Add Schema
methods insert
, get
and remove
These are just convenience methods that delegate to the inner object. `insert` will also convert bool schemas to object schemas.
This commit is contained in:
parent
d6c8b6b022
commit
0672c862c8
7 changed files with 109 additions and 76 deletions
|
@ -25,9 +25,7 @@ pub enum MyEnum {
|
|||
}
|
||||
|
||||
fn remove_format(schema: &mut Schema) {
|
||||
if let Some(obj) = schema.as_object_mut() {
|
||||
obj.remove("format");
|
||||
}
|
||||
schema.remove("format");
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue