pub struct Schema {Show 13 fields
pub ty: Vec<Ty>,
pub format: Option<Format>,
pub description: Option<String>,
pub nullable: bool,
pub properties: Option<IndexMap<String, RefOrSchema>>,
pub required: Vec<String>,
pub additional_properties: Option<AdditionalProperties>,
pub items: Option<RefOrSchema>,
pub variants: Option<Vec<Value>>,
pub all_of: Option<Vec<RefOrSchema>>,
pub one_of: Option<Vec<RefOrSchema>>,
pub any_of: Option<Vec<RefOrSchema>>,
pub discriminator: Option<Discriminator>,
}Expand description
An OpenAPI schema definition.
Fields§
§ty: Vec<Ty>§format: Option<Format>§description: Option<String>§nullable: bool§properties: Option<IndexMap<String, RefOrSchema>>§required: Vec<String>§additional_properties: Option<AdditionalProperties>§items: Option<RefOrSchema>§variants: Option<Vec<Value>>§all_of: Option<Vec<RefOrSchema>>§one_of: Option<Vec<RefOrSchema>>§any_of: Option<Vec<RefOrSchema>>§discriminator: Option<Discriminator>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
Source§impl JsonPointee for Schema
impl JsonPointee for Schema
Source§fn resolve(
&self,
pointer: JsonPointer<'_>,
) -> Result<&dyn JsonPointee, BadJsonPointer>
fn resolve( &self, pointer: JsonPointer<'_>, ) -> Result<&dyn JsonPointee, BadJsonPointer>
Resolves a
JsonPointer against this value.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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more