insomnia-plugin-openapi-drift-check
v1.1.0
Published
Local-only Insomnia OpenAPI drift reports with coverage scores, JSON/simple-YAML route parsing, undocumented request checks, and missing operations.
Maintainers
Readme
insomnia-plugin-openapi-drift-check
Local-only OpenAPI drift reports for Insomnia. v1.1.0 adds coverage scores so teams can see how much of the workspace matches the OpenAPI contract.
OpenAPI Drift Check compares Insomnia request routes to a JSON OpenAPI/Swagger spec found in the workspace export and reports undocumented requests, missing spec operations, method mismatches, and duplicate request routes.
Why
Exports and importers already exist. This plugin answers a different question:
Do the requests in my Insomnia workspace still match my OpenAPI contract?Features
- Finds JSON OpenAPI/Swagger specs inside the workspace export
- Compares
METHOD /pathroutes against Insomnia requests - Adds coverage scores for workspace routes covered by spec and spec routes represented in workspace
- Reports Insomnia requests missing from the spec
- Reports spec operations missing from Insomnia
- Reports method mismatches for known paths
- Reports duplicate request routes
- Handles
:id,{id}, numeric IDs, and UUID-like path segments - Local Markdown export
- No cloud, no telemetry, no backend, no dependencies
Install
From Insomnia:
- Open Preferences → Plugins
- Enter
insomnia-plugin-openapi-drift-check - Click Install Plugin
Manual macOS install:
cd "$HOME/Library/Application Support/Insomnia/plugins"
npm install insomnia-plugin-openapi-drift-checkUsage
Run:
OpenAPI Drift Check: Export ReportThe action is exposed through workspaceActions, requestGroupActions, and requestActions. In Insomnia 13 it may appear in the New Request dropdown.
Expected spec source
The MVP looks for a JSON OpenAPI/Swagger spec embedded in the Insomnia workspace export, including fields such as:
contentscontentspecschematext
It supports JSON specs and simple dependency-free YAML route parsing for paths: + HTTP methods.
Example report
# Insomnia OpenAPI Drift Check Report
## Summary
- High: 1
- Medium: 2
- Low: 1
## Coverage
- Workspace routes covered by spec: 50% (2/4)
- Spec routes represented in workspace: 33% (1/3)
- Spec source: $.resources[0].contents
| Severity | Type | Location | Message | Preview |
|---|---|---|---|---|
| high | undocumented-request | $.resources[2] | Insomnia request not found in OpenAPI spec | DELETE /users/{id} |
| medium | missing-request | openapi.paths | OpenAPI operation has no matching Insomnia request | GET /health |Privacy
- Local-only
- No network calls
- No analytics
- No account required
- Exports with
includePrivate: false
Development
git clone https://github.com/oliviajohns5/insomnia-plugin-openapi-drift-check.git
cd insomnia-plugin-openapi-drift-check
npm test
npm run test:packaged
npm pack --dry-runVerified QA
node --check main.jsnode --check test.jsnode --check real-insomnia-packaged-test.jsnode --check qa-packaged.jsnpm testnpm run test:packagednpm pack --dry-run- isolated tarball install
- package metadata validation
- credential literal scan
Requirements
- Insomnia
- JSON OpenAPI/Swagger spec in the workspace export
- Node.js/npm only for development or publishing
License
MIT
