[−][src]Struct oas_gen::Oas3Builder
Implementations
impl Oas3Builder
[src]
pub fn any<I: JsonSchema + Serialize, O: JsonSchema + Serialize, E: JsonSchema + Serialize>(
&mut self,
web_path: &ApiPath,
method: Method,
document_name: String,
operation_name: &str,
operation_description: Option<String>
)
[src]
&mut self,
web_path: &ApiPath,
method: Method,
document_name: String,
operation_name: &str,
operation_description: Option<String>
)
pub fn any_with_tests<I: JsonSchema + Serialize, O: JsonSchema + Serialize, E: JsonSchema + Serialize>(
&mut self,
web_path: &ApiPath,
method: Method,
document_name: String,
operation_name: &str,
operation_description: Option<String>,
tests: &[Test]
)
[src]
&mut self,
web_path: &ApiPath,
method: Method,
document_name: String,
operation_name: &str,
operation_description: Option<String>,
tests: &[Test]
)
impl Oas3Builder
[src]
pub fn create<I: JsonSchema + Serialize, O: JsonSchema + Serialize, E: JsonSchema + Serialize>(
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>
)
[src]
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>
)
pub fn create_with_tests<I: JsonSchema + Serialize, O: JsonSchema + Serialize, E: JsonSchema + Serialize>(
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>,
tests: &[Test]
)
[src]
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>,
tests: &[Test]
)
impl Oas3Builder
[src]
pub fn delete<I: JsonSchema + Serialize, O: JsonSchema + Serialize, E: JsonSchema + Serialize>(
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>
)
[src]
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>
)
pub fn delete_with_tests<I: JsonSchema + Serialize, O: JsonSchema + Serialize, E: JsonSchema + Serialize>(
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>,
tests: &[Test]
)
[src]
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>,
tests: &[Test]
)
pub fn delete_by_key<O: JsonSchema + Serialize, E: JsonSchema + Serialize>(
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>
)
[src]
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>
)
pub fn delete_by_key_with_tests<O: JsonSchema + Serialize, E: JsonSchema + Serialize>(
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>,
tests: &[Test]
)
[src]
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>,
tests: &[Test]
)
impl Oas3Builder
[src]
pub fn fetch<O: JsonSchema + Serialize, E: JsonSchema + Serialize>(
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>
)
[src]
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>
)
pub fn fetch_with_tests<O: JsonSchema + Serialize, E: JsonSchema + Serialize>(
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>,
tests: &[Test]
)
[src]
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>,
tests: &[Test]
)
This variant accepts a test spec
use oas_gen::xtests::{Test,Response}; let mut params = std::collections::BTreeMap::default(); params.insert("key".to_owned(), "8472".to_owned()); let test_ok = Test { description: "Fetch a document by key.".to_owned(), response: Response { status: vec![200], ..Response::default() }, params, ..Test::default() }; assert_eq!(r#"{"description":"Fetch a document by key.","params":{"key":"8472"},"response":{"status":[200]}}"#, serde_json::to_string(&test_ok).unwrap()); let tests = vec![test_ok];
impl Oas3Builder
[src]
pub fn list<O: JsonSchema + Serialize, E: JsonSchema + Serialize>(
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>
)
[src]
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>
)
pub fn list_with_tests<O: JsonSchema + Serialize, E: JsonSchema + Serialize>(
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>,
tests: &[Test]
)
[src]
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>,
tests: &[Test]
)
impl Oas3Builder
[src]
pub fn replace<I: JsonSchema + Serialize, O: JsonSchema + Serialize, E: JsonSchema + Serialize>(
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>
)
[src]
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>
)
pub fn replace_with_tests<I: JsonSchema + Serialize, O: JsonSchema + Serialize, E: JsonSchema + Serialize>(
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>,
tests: &[Test]
)
[src]
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>,
tests: &[Test]
)
impl Oas3Builder
[src]
pub fn update<I: JsonSchema + Serialize, O: JsonSchema + Serialize, E: JsonSchema + Serialize>(
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>
)
[src]
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>
)
pub fn update_with_tests<I: JsonSchema + Serialize, O: JsonSchema + Serialize, E: JsonSchema + Serialize>(
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>,
tests: &[Test]
)
[src]
&mut self,
web_path: &ApiPath,
document_name: String,
operation_description: Option<String>,
tests: &[Test]
)
impl Oas3Builder
[src]
#[must_use]pub fn new() -> Self
[src]
#[must_use]pub fn build(self, version: String) -> OpenApi
[src]
#[must_use]pub fn create_bearer_scheme() -> SecurityScheme
[src]
Create a http bearer Auth security scheme
#[must_use]pub fn build_with_security(
self,
version: String,
security_schemes: Map<String, RefOr<SecurityScheme>>
) -> OpenApi
[src]
self,
version: String,
security_schemes: Map<String, RefOr<SecurityScheme>>
) -> OpenApi
let mut security_schemes: Map<String, RefOr<SecurityScheme>> = Map::default(); let security_scheme = create_bearer_scheme(); security_schemes.insert("bearerAuth".to_owned(), RefOr::Object(security_scheme));
Trait Implementations
impl Clone for Oas3Builder
[src]
fn clone(&self) -> Oas3Builder
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Oas3Builder
[src]
impl Default for Oas3Builder
[src]
Auto Trait Implementations
impl RefUnwindSafe for Oas3Builder
impl Send for Oas3Builder
impl Sync for Oas3Builder
impl Unpin for Oas3Builder
impl UnwindSafe for Oas3Builder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,