Struct schemars::visit::ReplaceBoolSchemas
source · pub struct ReplaceBoolSchemas {
pub skip_additional_properties: bool,
}
Expand description
This visitor will replace all boolean JSON Schemas with equivalent object schemas.
This is useful for dialects of JSON Schema (e.g. OpenAPI 3.0) that do not support booleans as schemas.
Fields§
§skip_additional_properties: bool
When set to true
, a schema’s additionalProperties
property will not be changed from a boolean.
Trait Implementations§
source§impl Clone for ReplaceBoolSchemas
impl Clone for ReplaceBoolSchemas
source§fn clone(&self) -> ReplaceBoolSchemas
fn clone(&self) -> ReplaceBoolSchemas
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ReplaceBoolSchemas
impl Debug for ReplaceBoolSchemas
source§impl Visitor for ReplaceBoolSchemas
impl Visitor for ReplaceBoolSchemas
source§fn visit_schema(&mut self, schema: &mut Schema)
fn visit_schema(&mut self, schema: &mut Schema)
source§fn visit_schema_object(&mut self, schema: &mut SchemaObject)
fn visit_schema_object(&mut self, schema: &mut SchemaObject)
Override this method to modify a
SchemaObject
and (optionally) its subschemas. Read moresource§fn visit_root_schema(&mut self, root: &mut RootSchema)
fn visit_root_schema(&mut self, root: &mut RootSchema)
Override this method to modify a
RootSchema
and (optionally) its subschemas. Read moreAuto Trait Implementations§
impl Freeze for ReplaceBoolSchemas
impl RefUnwindSafe for ReplaceBoolSchemas
impl Send for ReplaceBoolSchemas
impl Sync for ReplaceBoolSchemas
impl Unpin for ReplaceBoolSchemas
impl UnwindSafe for ReplaceBoolSchemas
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more