pub struct OpenApiOperation {
pub operation_id: Option<String>,
pub summary: Option<String>,
pub description: Option<String>,
pub tags: Vec<String>,
pub parameters: Vec<Value>,
pub request_body: Option<Value>,
pub responses: BTreeMap<String, Value>,
}Fields§
§operation_id: Option<String>§summary: Option<String>§description: Option<String>§parameters: Vec<Value>§request_body: Option<Value>§responses: BTreeMap<String, Value>Implementations§
Source§impl OpenApiOperation
impl OpenApiOperation
pub fn new(operation_id: impl Into<String>) -> Self
pub fn summary(self, summary: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
pub fn tag(self, tag: impl Into<String>) -> Self
pub fn request_body(self, request_body: Value) -> Self
pub fn parameter(self, parameter: Value) -> Self
pub fn response(self, status: impl Into<String>, response: Value) -> Self
Trait Implementations§
Source§impl Clone for OpenApiOperation
impl Clone for OpenApiOperation
Source§fn clone(&self) -> OpenApiOperation
fn clone(&self) -> OpenApiOperation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 OpenApiOperation
impl Debug for OpenApiOperation
Source§impl<'de> Deserialize<'de> for OpenApiOperation
impl<'de> Deserialize<'de> for OpenApiOperation
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 PartialEq for OpenApiOperation
impl PartialEq for OpenApiOperation
Source§fn eq(&self, other: &OpenApiOperation) -> bool
fn eq(&self, other: &OpenApiOperation) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for OpenApiOperation
impl Serialize for OpenApiOperation
impl Eq for OpenApiOperation
impl StructuralPartialEq for OpenApiOperation
Auto Trait Implementations§
impl Freeze for OpenApiOperation
impl RefUnwindSafe for OpenApiOperation
impl Send for OpenApiOperation
impl Sync for OpenApiOperation
impl Unpin for OpenApiOperation
impl UnsafeUnpin for OpenApiOperation
impl UnwindSafe for OpenApiOperation
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.