pub struct OpenApiSpec {
pub info: ApiInfo,
pub paths: HashMap<String, PathItem>,
pub schemas: HashMap<String, Value>,
}Expand description
OpenAPI specification builder
Fields§
§info: ApiInfo§paths: HashMap<String, PathItem>§schemas: HashMap<String, Value>Implementations§
Source§impl OpenApiSpec
impl OpenApiSpec
Sourcepub fn new(title: impl Into<String>, version: impl Into<String>) -> Self
pub fn new(title: impl Into<String>, version: impl Into<String>) -> Self
Create a new OpenAPI specification
Sourcepub fn description(self, desc: impl Into<String>) -> Self
pub fn description(self, desc: impl Into<String>) -> Self
Set description
Trait Implementations§
Source§impl Clone for OpenApiSpec
impl Clone for OpenApiSpec
Source§fn clone(&self) -> OpenApiSpec
fn clone(&self) -> OpenApiSpec
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 moreAuto Trait Implementations§
impl Freeze for OpenApiSpec
impl RefUnwindSafe for OpenApiSpec
impl Send for OpenApiSpec
impl Sync for OpenApiSpec
impl Unpin for OpenApiSpec
impl UnwindSafe for OpenApiSpec
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