pub struct Schema {Show 30 fields
pub reference: Option<String>,
pub original_ref: Option<String>,
pub title: Option<String>,
pub description: Option<String>,
pub type: Option<String>,
pub format: Option<String>,
pub enum: Option<Vec<String>>,
pub required: Option<Vec<String>>,
pub default: Option<Value>,
pub maximum: Option<Number>,
pub exclusive_maximum: Option<bool>,
pub minimum: Option<Number>,
pub exclusive_minimum: Option<bool>,
pub max_length: Option<Number>,
pub min_length: Option<Number>,
pub pattern: Option<String>,
pub max_items: Option<Number>,
pub min_items: Option<Number>,
pub unique_items: Option<bool>,
pub multiple_of: Option<Number>,
pub items: Option<Box<Schema>>,
pub properties: Option<BTreeMap<String, Schema>>,
pub additional_properties: Option<Value>,
pub discriminator: Option<Discriminator>,
pub read_only: Option<bool>,
pub xml: Option<XML>,
pub external_docs: Option<ExternalDoc>,
pub example: Option<Value>,
pub all_of: Option<Vec<Box<Schema>>>,
pub extensions: BTreeMap<String, Value>,
}
Expand description
§Schema Object
Fields§
§reference: Option<String>
JSON reference path to another defintion
original_ref: Option<String>
§title: Option<String>
§description: Option<String>
§type: Option<String>
§format: Option<String>
§enum: Option<Vec<String>>
§required: Option<Vec<String>>
§default: Option<Value>
§maximum: Option<Number>
§exclusive_maximum: Option<bool>
§minimum: Option<Number>
§exclusive_minimum: Option<bool>
§max_length: Option<Number>
§min_length: Option<Number>
§pattern: Option<String>
§max_items: Option<Number>
§min_items: Option<Number>
§unique_items: Option<bool>
§multiple_of: Option<Number>
§items: Option<Box<Schema>>
§properties: Option<BTreeMap<String, Schema>>
§additional_properties: Option<Value>
§discriminator: Option<Discriminator>
Adds support for polymorphism.
read_only: Option<bool>
Relevant only for Schema “properties” definitions.
xml: Option<XML>
This MAY be used only on properties schemas.
external_docs: Option<ExternalDoc>
Additional external documentation for this schema.
example: Option<Value>
A free-form property to include an example of an instance for this schema.
all_of: Option<Vec<Box<Schema>>>
§extensions: BTreeMap<String, Value>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Schema
impl<'de> Deserialize<'de> for Schema
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
impl StructuralPartialEq for Schema
Auto Trait Implementations§
impl Freeze for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnwindSafe for Schema
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