pub struct ContractDiffHandler { /* private fields */ }Expand description
Contract diff handler for NL queries
Implementations§
Source§impl ContractDiffHandler
impl ContractDiffHandler
Sourcepub fn new() -> Result<ContractDiffHandler, Error>
pub fn new() -> Result<ContractDiffHandler, Error>
Create a new contract diff handler
Sourcepub fn with_config(
config: IntelligentBehaviorConfig,
) -> Result<ContractDiffHandler, Error>
pub fn with_config( config: IntelligentBehaviorConfig, ) -> Result<ContractDiffHandler, Error>
Create with custom configuration
Sourcepub async fn analyze_from_query(
&self,
query: &str,
spec: Option<&OpenApiSpec>,
captured_request: Option<CapturedRequest>,
) -> Result<ContractDiffQueryResult, Error>
pub async fn analyze_from_query( &self, query: &str, spec: Option<&OpenApiSpec>, captured_request: Option<CapturedRequest>, ) -> Result<ContractDiffQueryResult, Error>
Analyze a contract diff from a natural language query
Parses the query to extract:
- Which spec/request to analyze
- What type of analysis to perform
- Any filters (breaking changes only, mobile endpoints, etc.)
Sourcepub async fn compare_versions(
&self,
spec1: &OpenApiSpec,
spec2: &OpenApiSpec,
) -> Result<ContractDiffResult, Error>
pub async fn compare_versions( &self, spec1: &OpenApiSpec, spec2: &OpenApiSpec, ) -> Result<ContractDiffResult, Error>
Compare two contract versions using ContractValidator
Sourcepub async fn summarize_drift(
&self,
results: &[ContractDiffResult],
filters: &ContractDiffFilters,
) -> Result<String, Error>
pub async fn summarize_drift( &self, results: &[ContractDiffResult], filters: &ContractDiffFilters, ) -> Result<String, Error>
Summarize contract drift
Generates a human-readable summary of contract drift based on recent analyses.
Sourcepub fn find_breaking_changes(
&self,
result: &ContractDiffResult,
) -> Vec<BreakingChange>
pub fn find_breaking_changes( &self, result: &ContractDiffResult, ) -> Vec<BreakingChange>
Find breaking changes in contract diff results
Trait Implementations§
Source§impl Default for ContractDiffHandler
impl Default for ContractDiffHandler
Source§fn default() -> ContractDiffHandler
fn default() -> ContractDiffHandler
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ContractDiffHandler
impl !RefUnwindSafe for ContractDiffHandler
impl Send for ContractDiffHandler
impl Sync for ContractDiffHandler
impl Unpin for ContractDiffHandler
impl UnsafeUnpin for ContractDiffHandler
impl !UnwindSafe for ContractDiffHandler
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more