pub struct Example {
pub summary: Option<String>,
pub description: Option<String>,
pub value: Option<Value>,
pub extensions: BTreeMap<String, Value>,
}Expand description
Multi-purpose example objects.
Will be validated against schema when used in conformance testing.
Fields§
§summary: Option<String>Short description for the example.
description: Option<String>Long description for the example. CommonMark syntax MAY be used for rich text representation.
value: Option<Value>Embedded literal example. The value field and externalValue field are mutually
exclusive. To represent examples of media types that cannot naturally represented
in JSON or YAML, use a string value to contain the example, escaping where necessary.
extensions: BTreeMap<String, Value>Specification extensions.
Only “x-” prefixed keys are collected, and the prefix is stripped.
See https://spec.openapis.org/oas/v3.1.1#specification-extensions.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Example
impl<'de> Deserialize<'de> for Example
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 Example
Auto Trait Implementations§
impl Freeze for Example
impl RefUnwindSafe for Example
impl Send for Example
impl Sync for Example
impl Unpin for Example
impl UnwindSafe for Example
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