pub struct ContractValidator { /* private fields */ }
Expand description
Contract validator
Implementations§
Source§impl ContractValidator
impl ContractValidator
pub fn new() -> Self
pub fn with_strict_mode(self, strict: bool) -> Self
pub fn with_ignore_optional_fields(self, ignore: bool) -> Self
Sourcepub async fn validate_openapi(
&self,
spec: &OpenApiSpec,
base_url: &str,
) -> ValidationResult
pub async fn validate_openapi( &self, spec: &OpenApiSpec, base_url: &str, ) -> ValidationResult
Validate OpenAPI spec against live API
Sourcepub fn compare_specs(
&self,
old_spec: &OpenApiSpec,
new_spec: &OpenApiSpec,
) -> ValidationResult
pub fn compare_specs( &self, old_spec: &OpenApiSpec, new_spec: &OpenApiSpec, ) -> ValidationResult
Compare two OpenAPI specs and detect breaking changes
Sourcepub fn generate_report(&self, result: &ValidationResult) -> String
pub fn generate_report(&self, result: &ValidationResult) -> String
Generate validation report
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ContractValidator
impl RefUnwindSafe for ContractValidator
impl Send for ContractValidator
impl Sync for ContractValidator
impl Unpin for ContractValidator
impl UnwindSafe for ContractValidator
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