pub struct ContractDiffHandler { /* private fields */ }Expand description
Contract diff handler for NL queries
Implementations§
Source§impl ContractDiffHandler
impl ContractDiffHandler
Sourcepub fn with_config(config: IntelligentBehaviorConfig) -> Result<Self>
pub fn with_config(config: IntelligentBehaviorConfig) -> Result<Self>
Create with custom configuration
Sourcepub async fn analyze_from_query(
&self,
query: &str,
spec: Option<&OpenApiSpec>,
captured_request: Option<CapturedRequest>,
) -> Result<ContractDiffQueryResult>
pub async fn analyze_from_query( &self, query: &str, spec: Option<&OpenApiSpec>, captured_request: Option<CapturedRequest>, ) -> Result<ContractDiffQueryResult>
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>
pub async fn compare_versions( &self, spec1: &OpenApiSpec, spec2: &OpenApiSpec, ) -> Result<ContractDiffResult>
Compare two contract versions using ContractValidator
Sourcepub async fn summarize_drift(
&self,
results: &[ContractDiffResult],
filters: &ContractDiffFilters,
) -> Result<String>
pub async fn summarize_drift( &self, results: &[ContractDiffResult], filters: &ContractDiffFilters, ) -> Result<String>
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§
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