pub struct OperationBuilder { /* private fields */ }Expand description
Implementations§
Source§impl OperationBuilder
impl OperationBuilder
Sourcepub fn new() -> OperationBuilder
pub fn new() -> OperationBuilder
Constructs a new OperationBuilder.
Source§impl OperationBuilder
impl OperationBuilder
Add or change tags of the Operation.
Sourcepub fn summary<S: Into<String>>(self, summary: Option<S>) -> Self
pub fn summary<S: Into<String>>(self, summary: Option<S>) -> Self
Add or change short summary of the Operation.
Sourcepub fn description<S: Into<String>>(self, description: Option<S>) -> Self
pub fn description<S: Into<String>>(self, description: Option<S>) -> Self
Add or change description of the Operation.
Sourcepub fn operation_id<S: Into<String>>(self, operation_id: Option<S>) -> Self
pub fn operation_id<S: Into<String>>(self, operation_id: Option<S>) -> Self
Add or change operation id of the Operation.
Sourcepub fn parameters<I: IntoIterator<Item = P>, P: Into<Parameter>>(
self,
parameters: Option<I>,
) -> Self
pub fn parameters<I: IntoIterator<Item = P>, P: Into<Parameter>>( self, parameters: Option<I>, ) -> Self
Add or change parameters of the Operation.
Sourcepub fn parameter<P: Into<Parameter>>(self, parameter: P) -> Self
pub fn parameter<P: Into<Parameter>>(self, parameter: P) -> Self
Append parameter to Operation parameters.
Sourcepub fn parameter_ref(self, parameter: Ref) -> Self
pub fn parameter_ref(self, parameter: Ref) -> Self
Append parameter reference to Operation parameters.
Sourcepub fn request_body(self, request_body: Option<RequestBody>) -> Self
pub fn request_body(self, request_body: Option<RequestBody>) -> Self
Add or change request body of the Operation.
Sourcepub fn request_body_ref(self, request_body: Option<Ref>) -> Self
pub fn request_body_ref(self, request_body: Option<Ref>) -> Self
Add or change request body reference of the Operation.
Sourcepub fn responses<R: Into<Responses>>(self, responses: R) -> Self
pub fn responses<R: Into<Responses>>(self, responses: R) -> Self
Add or change responses of the Operation.
Sourcepub fn response<S: Into<String>, R: Into<RefOr<Response>>>(
self,
code: S,
response: R,
) -> Self
pub fn response<S: Into<String>, R: Into<RefOr<Response>>>( self, code: S, response: R, ) -> Self
Sourcepub fn callback<S: Into<String>, C: Into<RefOr<Callback>>>(
self,
name: S,
callback: C,
) -> Self
pub fn callback<S: Into<String>, C: Into<RefOr<Callback>>>( self, name: S, callback: C, ) -> Self
Add a callback to this Operation.
Sourcepub fn callbacks_from_iter<I: IntoIterator<Item = (S, C)>, S: Into<String>, C: Into<RefOr<Callback>>>(
self,
callbacks: I,
) -> Self
pub fn callbacks_from_iter<I: IntoIterator<Item = (S, C)>, S: Into<String>, C: Into<RefOr<Callback>>>( self, callbacks: I, ) -> Self
Add callbacks to this Operation from an iterator.
Sourcepub fn deprecated(self, deprecated: Option<Deprecated>) -> Self
pub fn deprecated(self, deprecated: Option<Deprecated>) -> Self
Add or change deprecated status of the Operation.
Sourcepub fn securities<I: IntoIterator<Item = SecurityRequirement>>(
self,
securities: Option<I>,
) -> Self
pub fn securities<I: IntoIterator<Item = SecurityRequirement>>( self, securities: Option<I>, ) -> Self
Add or change list of SecurityRequirements that are available for Operation.
Sourcepub fn security(self, security: SecurityRequirement) -> Self
pub fn security(self, security: SecurityRequirement) -> Self
Append SecurityRequirement to Operation security requirements.
Sourcepub fn servers<I: IntoIterator<Item = Server>>(self, servers: Option<I>) -> Self
pub fn servers<I: IntoIterator<Item = Server>>(self, servers: Option<I>) -> Self
Sourcepub fn extensions(self, extensions: Option<Extensions>) -> Self
pub fn extensions(self, extensions: Option<Extensions>) -> Self
Add openapi extensions (x-something) of the Operation.