pub struct GenericSchema {
pub properties: Option<IndexMap<String, JsonSchema>>,
pub required: Option<Vec<String>>,
pub additional_properties: Option<AdditionalProperties>,
pub default: Option<Value>,
pub schema: Option<String>,
pub id: Option<String>,
pub defs: Option<IndexMap<String, JsonSchema>>,
pub definitions: Option<IndexMap<String, JsonSchema>>,
pub metadata: SchemaMetadata,
}Expand description
Generic schema (catch-all) This handles schemas without explicit type, including:
- Empty schemas {}
- Schemas with only metadata
- Schemas with object-specific fields but no type
- Schemas with definitions
Fields§
§properties: Option<IndexMap<String, JsonSchema>>§required: Option<Vec<String>>§additional_properties: Option<AdditionalProperties>§default: Option<Value>§schema: Option<String>§id: Option<String>§defs: Option<IndexMap<String, JsonSchema>>§definitions: Option<IndexMap<String, JsonSchema>>§metadata: SchemaMetadataTrait Implementations§
Source§impl Clone for GenericSchema
impl Clone for GenericSchema
Source§fn clone(&self) -> GenericSchema
fn clone(&self) -> GenericSchema
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 GenericSchema
impl Debug for GenericSchema
Source§impl Default for GenericSchema
impl Default for GenericSchema
Source§fn default() -> GenericSchema
fn default() -> GenericSchema
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for GenericSchema
impl<'de> Deserialize<'de> for GenericSchema
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for GenericSchema
impl PartialEq for GenericSchema
Source§impl Serialize for GenericSchema
impl Serialize for GenericSchema
impl StructuralPartialEq for GenericSchema
Auto Trait Implementations§
impl Freeze for GenericSchema
impl RefUnwindSafe for GenericSchema
impl Send for GenericSchema
impl Sync for GenericSchema
impl Unpin for GenericSchema
impl UnwindSafe for GenericSchema
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