pub struct Schema {Show 22 fields
pub any_of: Option<Vec<Schema>>,
pub default: Option<Value>,
pub description: Option<String>,
pub enum_values: Option<Vec<String>>,
pub example: Option<Value>,
pub format: Option<String>,
pub items: Option<Box<Schema>>,
pub max_items: Option<i64>,
pub max_length: Option<i64>,
pub max_properties: Option<i64>,
pub maximum: Option<f64>,
pub min_items: Option<i64>,
pub min_length: Option<i64>,
pub min_properties: Option<i64>,
pub minimum: Option<f64>,
pub nullable: Option<bool>,
pub pattern: Option<String>,
pub properties: Option<HashMap<String, Box<Schema>>>,
pub property_ordering: Option<Vec<String>>,
pub required: Option<Vec<String>>,
pub title: Option<String>,
pub ty: Option<Type>,
}Expand description
OpenAPI Schema(精简实现)。
Fields§
§any_of: Option<Vec<Schema>>§default: Option<Value>§description: Option<String>§enum_values: Option<Vec<String>>§example: Option<Value>§format: Option<String>§items: Option<Box<Schema>>§max_items: Option<i64>§max_length: Option<i64>§max_properties: Option<i64>§maximum: Option<f64>§min_items: Option<i64>§min_length: Option<i64>§min_properties: Option<i64>§minimum: Option<f64>§nullable: Option<bool>§pattern: Option<String>§properties: Option<HashMap<String, Box<Schema>>>§property_ordering: Option<Vec<String>>§required: Option<Vec<String>>§title: Option<String>§ty: Option<Type>Implementations§
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
Auto Trait Implementations§
impl Freeze for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnsafeUnpin 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