pub struct ObjectSchema {Show 35 fields
pub all_of: Vec<ObjectOrReference<ObjectSchema>>,
pub any_of: Vec<ObjectOrReference<ObjectSchema>>,
pub one_of: Vec<ObjectOrReference<ObjectSchema>>,
pub items: Option<Box<Schema>>,
pub prefix_items: Vec<ObjectOrReference<ObjectSchema>>,
pub properties: BTreeMap<String, ObjectOrReference<ObjectSchema>>,
pub additional_properties: Option<Schema>,
pub schema_type: Option<TypeSet>,
pub enum_values: Vec<Value>,
pub const_value: Option<Value>,
pub multiple_of: Option<Number>,
pub maximum: Option<Number>,
pub exclusive_maximum: Option<Number>,
pub minimum: Option<Number>,
pub exclusive_minimum: Option<Number>,
pub max_length: Option<u64>,
pub min_length: Option<u64>,
pub pattern: Option<String>,
pub max_items: Option<u64>,
pub min_items: Option<u64>,
pub unique_items: Option<bool>,
pub max_properties: Option<u64>,
pub min_properties: Option<u64>,
pub required: Vec<String>,
pub format: Option<String>,
pub title: Option<String>,
pub description: Option<String>,
pub default: Option<Value>,
pub deprecated: Option<bool>,
pub read_only: Option<bool>,
pub write_only: Option<bool>,
pub examples: Vec<Value>,
pub discriminator: Option<Discriminator>,
pub example: Option<Value>,
pub extensions: BTreeMap<String, Value>,
}Expand description
A schema object allows the definition of input and output data types.
Fields§
§all_of: Vec<ObjectOrReference<ObjectSchema>>§any_of: Vec<ObjectOrReference<ObjectSchema>>§one_of: Vec<ObjectOrReference<ObjectSchema>>§items: Option<Box<Schema>>§prefix_items: Vec<ObjectOrReference<ObjectSchema>>§properties: BTreeMap<String, ObjectOrReference<ObjectSchema>>§additional_properties: Option<Schema>§schema_type: Option<TypeSet>§enum_values: Vec<Value>§const_value: Option<Value>§multiple_of: Option<Number>§maximum: Option<Number>§exclusive_maximum: Option<Number>§minimum: Option<Number>§exclusive_minimum: Option<Number>§max_length: Option<u64>§min_length: Option<u64>§pattern: Option<String>§max_items: Option<u64>§min_items: Option<u64>§unique_items: Option<bool>§max_properties: Option<u64>§min_properties: Option<u64>§required: Vec<String>§format: Option<String>§title: Option<String>§description: Option<String>§default: Option<Value>§deprecated: Option<bool>§read_only: Option<bool>§write_only: Option<bool>§examples: Vec<Value>§discriminator: Option<Discriminator>§example: Option<Value>§extensions: BTreeMap<String, Value>Implementations§
Source§impl ObjectSchema
impl ObjectSchema
Sourcepub fn is_nullable(&self) -> Option<bool>
pub fn is_nullable(&self) -> Option<bool>
Returns true if Null appears in set of schema types, or None if unspecified.
Trait Implementations§
Source§impl Clone for ObjectSchema
impl Clone for ObjectSchema
Source§fn clone(&self) -> ObjectSchema
fn clone(&self) -> ObjectSchema
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ObjectSchema
impl Debug for ObjectSchema
Source§impl Default for ObjectSchema
impl Default for ObjectSchema
Source§fn default() -> ObjectSchema
fn default() -> ObjectSchema
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ObjectSchema
impl<'de> Deserialize<'de> for ObjectSchema
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 FromRef for ObjectSchema
impl FromRef for ObjectSchema
Source§impl PartialEq for ObjectSchema
impl PartialEq for ObjectSchema
Source§fn eq(&self, other: &ObjectSchema) -> bool
fn eq(&self, other: &ObjectSchema) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ObjectSchema
impl Serialize for ObjectSchema
impl StructuralPartialEq for ObjectSchema
Auto Trait Implementations§
impl Freeze for ObjectSchema
impl RefUnwindSafe for ObjectSchema
impl Send for ObjectSchema
impl Sync for ObjectSchema
impl Unpin for ObjectSchema
impl UnsafeUnpin for ObjectSchema
impl UnwindSafe for ObjectSchema
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