pub struct SchemaData {
pub nullable: bool,
pub read_only: bool,
pub write_only: bool,
pub deprecated: bool,
pub external_docs: Option<ExternalDocumentation>,
pub example: Option<Value>,
pub title: Option<String>,
pub description: Option<String>,
pub discriminator: Option<Discriminator>,
pub default: Option<Value>,
pub extensions: IndexMap<String, Value>,
}
Fields§
§nullable: bool
§read_only: bool
§write_only: bool
§deprecated: bool
§external_docs: Option<ExternalDocumentation>
§example: Option<Value>
§title: Option<String>
§description: Option<String>
§discriminator: Option<Discriminator>
§default: Option<Value>
§extensions: IndexMap<String, Value>
All extensions must be prefixed with x-
, see
section Specification Extensions on https://swagger.io/specification/
for more information. So you could add a custom field name
like:
x-name: value
rather than name: value
In code, the x-
prefix remains as part of the key: extensions.get("x-name")
Trait Implementations§
Source§impl Clone for SchemaData
impl Clone for SchemaData
Source§fn clone(&self) -> SchemaData
fn clone(&self) -> SchemaData
Returns a copy 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 SchemaData
impl Debug for SchemaData
Source§impl Default for SchemaData
impl Default for SchemaData
Source§fn default() -> SchemaData
fn default() -> SchemaData
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SchemaData
impl<'de> Deserialize<'de> for SchemaData
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SchemaData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SchemaData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SchemaData
impl PartialEq for SchemaData
Source§impl Serialize for SchemaData
impl Serialize for SchemaData
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for SchemaData
Auto Trait Implementations§
impl Freeze for SchemaData
impl RefUnwindSafe for SchemaData
impl Send for SchemaData
impl Sync for SchemaData
impl Unpin for SchemaData
impl UnwindSafe for SchemaData
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