#[non_exhaustive]pub struct ReplaceBoolSchemas {
pub skip_additional_properties: bool,
}
Expand description
Replaces boolean JSON Schemas with equivalent object schemas.
This also applies to subschemas.
This is useful for dialects of JSON Schema (e.g. OpenAPI 3.0) that do not support booleans as schemas.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.skip_additional_properties: bool
When set to true
, a schema’s additionalProperties
property will not be changed from a
boolean.
Defaults to false
.
Trait Implementations§
Source§impl Clone for ReplaceBoolSchemas
impl Clone for ReplaceBoolSchemas
Source§fn clone(&self) -> ReplaceBoolSchemas
fn clone(&self) -> ReplaceBoolSchemas
Returns a duplicate 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 Default for ReplaceBoolSchemas
impl Default for ReplaceBoolSchemas
Source§fn default() -> ReplaceBoolSchemas
fn default() -> ReplaceBoolSchemas
Returns the “default value” for a type. Read more
Auto 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