pub struct OApiDocument { /* private fields */ }
Expand description
§The OpenApi document root object
Implementations§
Source§impl OApiDocument
impl OApiDocument
Sourcepub fn servers(&self) -> &Option<Vec<OApiServer>>
pub fn servers(&self) -> &Option<Vec<OApiServer>>
List of servers used in this document
Sourcepub fn paths(&self) -> &HashMap<String, OApiPathItem>
pub fn paths(&self) -> &HashMap<String, OApiPathItem>
List of paths this documents defines.
Sourcepub fn components(&self) -> &Option<OApiComponents>
pub fn components(&self) -> &Option<OApiComponents>
An optional object containing components re-used across the document
Sourcepub fn security(&self) -> &HashMap<String, SparseSelector<OApiSecurityScheme>>
pub fn security(&self) -> &HashMap<String, SparseSelector<OApiSecurityScheme>>
The security used for this API
Tags used to categorize the operations of this document
Sourcepub fn external_docs(&self) -> &Option<OApiExternalDocumentation>
pub fn external_docs(&self) -> &Option<OApiExternalDocumentation>
Link to some external documentation, if any
Source§impl OApiDocument
impl OApiDocument
Sourcepub fn get_operation_id(&self, opid_searched: &str) -> Option<&OApiOperation>
pub fn get_operation_id(&self, opid_searched: &str) -> Option<&OApiOperation>
Get an operation providing its Id
Trait Implementations§
Source§impl Clone for OApiDocument
impl Clone for OApiDocument
Source§fn clone(&self) -> OApiDocument
fn clone(&self) -> OApiDocument
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 OApiDocument
impl Debug for OApiDocument
Source§impl<'de> Deserialize<'de> for OApiDocument
impl<'de> Deserialize<'de> for OApiDocument
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 OApiCheckTrait for OApiDocument
impl OApiCheckTrait for OApiDocument
Source§fn oapi_check(
&self,
root: &SparseRoot<OApiDocument>,
bread_crumb: &mut Vec<String>,
) -> Result<(), OApiError>
fn oapi_check( &self, root: &SparseRoot<OApiDocument>, bread_crumb: &mut Vec<String>, ) -> Result<(), OApiError>
Check the current object, if any checks are to be performed, then checks
its inner attributes
Source§fn oapi_check_inner(
&self,
root: &SparseRoot<OApiDocument>,
bread_crumb: &mut Vec<String>,
) -> Result<(), OApiError>
fn oapi_check_inner( &self, root: &SparseRoot<OApiDocument>, bread_crumb: &mut Vec<String>, ) -> Result<(), OApiError>
Check every inner attributes of the object
Source§impl OApiExtensionExtractor for OApiDocument
impl OApiExtensionExtractor for OApiDocument
Source§fn oapi_raw_ext(&self) -> &HashMap<String, Value>
fn oapi_raw_ext(&self) -> &HashMap<String, Value>
Return a map of value of the additionnal keys for that object
Source§fn oapi_extract_ext<S>(
&self,
root: &SparseRoot<OApiDocument>,
key: &str,
) -> Result<S, OApiError>
fn oapi_extract_ext<S>( &self, root: &SparseRoot<OApiDocument>, key: &str, ) -> Result<S, OApiError>
Try to deserialize to the type
S
the object at key
, providing the
root of the document for any SparsePointer dereferencingSource§impl PartialEq for OApiDocument
impl PartialEq for OApiDocument
Source§impl Serialize for OApiDocument
impl Serialize for OApiDocument
Source§impl Sparsable for OApiDocument
impl Sparsable for OApiDocument
Source§fn sparse_init(
&mut self,
state: &mut SparseState,
metadata: &SparseMetadata,
depth: u32,
) -> Result<(), SparseError>
fn sparse_init( &mut self, state: &mut SparseState, metadata: &SparseMetadata, depth: u32, ) -> Result<(), SparseError>
Initialize recusively a Sparsable pointer
Source§fn sparse_updt(
&mut self,
state: &mut SparseState,
metadata: &SparseMetadata,
depth: u32,
) -> Result<(), SparseError>
fn sparse_updt( &mut self, state: &mut SparseState, metadata: &SparseMetadata, depth: u32, ) -> Result<(), SparseError>
Update recusively a Sparsable pointer
Source§fn check_depth(&self, depth: u32) -> Result<(), SparseError>
fn check_depth(&self, depth: u32) -> Result<(), SparseError>
Check if the current depth isn’t too much.
This is the cyclic pointer protection mechanism
impl StructuralPartialEq for OApiDocument
Auto Trait Implementations§
impl Freeze for OApiDocument
impl RefUnwindSafe for OApiDocument
impl Send for OApiDocument
impl Sync for OApiDocument
impl Unpin for OApiDocument
impl UnwindSafe for OApiDocument
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