pub struct OpenApiExample {
pub name: String,
pub summary: Option<String>,
pub description: Option<String>,
pub params: Option<Value>,
pub result: Option<Value>,
}Expand description
OpenAPI example for a method
Fields§
§name: String§summary: Option<String>§description: Option<String>§params: Option<Value>§result: Option<Value>Implementations§
Source§impl OpenApiExample
impl OpenApiExample
Sourcepub fn with_summary(self, summary: impl Into<String>) -> Self
pub fn with_summary(self, summary: impl Into<String>) -> Self
Add summary
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Add description
Sourcepub fn with_params(self, params: Value) -> Self
pub fn with_params(self, params: Value) -> Self
Add parameters
Sourcepub fn with_result(self, result: Value) -> Self
pub fn with_result(self, result: Value) -> Self
Add result
Trait Implementations§
Source§impl Clone for OpenApiExample
impl Clone for OpenApiExample
Source§fn clone(&self) -> OpenApiExample
fn clone(&self) -> OpenApiExample
Returns a duplicate 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 OpenApiExample
impl Debug for OpenApiExample
Source§impl<'de> Deserialize<'de> for OpenApiExample
impl<'de> Deserialize<'de> for OpenApiExample
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 OpenApiExample
impl RefUnwindSafe for OpenApiExample
impl Send for OpenApiExample
impl Sync for OpenApiExample
impl Unpin for OpenApiExample
impl UnwindSafe for OpenApiExample
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