> ## Documentation Index
> Fetch the complete documentation index at: https://docs.quixa.io/llms.txt
> Use this file to discover all available pages before exploring further.

# SpecTrum™ & Contract Drift

> Automate OpenAPI continuous discovery, deep contract drift detection, blast radius impact analysis, and self-healing collections.

In modern microservice architectures, silent upstream API changes are a primary cause of broken integration pipelines and flaky tests. When a backend team alters a property name, removes an endpoint, or changes a parameter type, consumers often discover the breakage only after deployments fail.

**Quixa SpecTrum™** provides continuous OpenAPI host discovery, semantic contract diffing, and automated self-healing.

```mermaid theme={null}
flowchart LR
    Origin["API Host / Origin (/openapi.json)"] -->|SpecTrum Discovery| Registry["Quixa API Registry Tree"]
    Registry -->|Automated Cron Diff| Drift["Deep Contract Drift Detection"]
    Drift -->|Impact Analysis| Blast["Blast Radius Mapping (Impacted Flows)"]
    Blast -->|1-Click Action| Heal["1-Click Collection Healing"]
```

***

## 1. SpecTrum™ Continuous Host Discovery

SpecTrum™ scans host origins or specification URLs to dynamically discover published Swagger 2.0 and OpenAPI 3.0 / 3.1 definitions.

### Key Capabilities

* **Origin Probing**: Automatically probes common discovery paths (`/openapi.json`, `/swagger/v1/swagger.json`, `/v3/api-docs`) across microservice hosts.
* **Hierarchical Tree Ingestion**: Parses operations (GET, POST, PUT, DELETE, PATCH), parameter schemas, and response envelopes into the live Quixa Registry.
* **Multi-Spec Batch Import**: When multiple specifications are discovered on a single host (e.g. `v1`, `v2`, `internal-admin`), SpecTrum prompts for one-click selective import into designated folders.

***

## 2. Deep Contract Drift Detection

SpecTrum continuously compares the live specifications published by your backend services against the contracts stored in your Quixa collections.

### Detected Drift Categories

| Drift Event | Description | Severity |
| :- | :- | :- |
| `EndpointRemoved` | An endpoint present in Quixa no longer exists in the upstream specification. | **Critical** (Breaks downstream flows) |
| `ResponseSchemaModified` | Response body properties were removed, renamed, or experienced type mutations. | **High** (Breaks response bindings) |
| `EndpointModified` | Query parameters, headers, or request payload schema were altered. | **High** (Causes HTTP 400 Bad Request) |
| `EndpointAdded` | A new endpoint was published in the upstream service. | **Info** (Available for integration) |

### Semantic AST & Schema Diffing

SpecTrum performs deep object-level diffing rather than superficial text comparisons. It detects:

* Required property additions or deletions.
* Primitive type mutations (e.g., integer converted to string).
* Array item schema changes.
* Enumeration alterations.

***

## 3. Blast Radius Mapping & Pulsing Indicators

When drift is detected, SpecTrum does not merely emit a generic warning. It computes the **Blast Radius** to pinpoint exactly which flows, nodes, and test suites are impacted.

### Visual Pulse Indicators

In the Quixa Registry sidebar, any folder or collection with detected drift displays a **pulsing orange indicator**:

```
📁 Customer Domain   🟠 (Drift Detected)
   ├── 📁 Profile Services  🟠
   │   └── ⚡ GET /api/v1/customers/{id}  🟠 [ResponseSchemaModified]
   └── 📁 Account Services  🟢
```

### Impact Report

Opening the drift inspector provides an interactive impact report:

* **Altered Schema Properties**: Shows diff blocks indicating added, removed, or modified fields.
* **Impacted Flows**: Lists all saved flows that reference the modified endpoint.
* **Impacted Variables**: Highlights bindings (e.g. `{{ResponseBinding.profile.body.legacyId}}`) that would fail runtime resolution.

***

## 4. 1-Click Collection Healing & Rollback

Once drift is reviewed, teams can reconcile changes without breaking existing workflows:

### 1-Click "Heal Collection"

Clicking **Heal Collection** updates the collection's schemas, query definitions, and parameters to match the latest upstream contract while **preserving all existing canvas connection wires, bindings, and layout positions**.

### Collection Rollback

If an upstream breaking change is determined to be an unintended defect or regression, teams can perform a **Collection Rollback** to restore previous working snapshots.

***

## 5. API Maturity Score

SpecTrum grades registered API collections against enterprise governance standards using the **API Maturity Score (0 - 100%)**:

* **Documentation Completeness**: Operation summaries, parameter descriptions, and response examples.
* **Contract Consistency**: Standardized error envelope models, correlation ID headers, and RESTful path naming conventions.
* **Schema Rigor**: Type definitions, required fields, and format constraints.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.