X402 Git

genesis-api-contract-drift

Compare OpenAPI/JSON Schema versions for breaking changes

Top level of the repository
SizeFolderInside
3.5 kBtests/4 test files
3 kBbin/1 script
4.7 kBsrc/1 source file
5.6 kB(root)5 docs · 1 asset
14 files · 16.8 kB · computed 2026-09-17
SizePath
103 B.gitignore
656 BCHANGELOG.md
1.1 kBLICENSE
624 BQUICKSTART.md
2.3 kBREADME.md
275 BSECURITY.md
6 BVERSION · binary
3 kBbin/genesis-api-drift.js
557 Bpackage.json
4.7 kBsrc/detector.js
571 Btests/fixtures/v1_spec.json
507 Btests/fixtures/v2_breaking.json
694 Btests/fixtures/v2_compatible.json
1.7 kBtests/test_detector.js
computed 2026-09-17 11:52 UTC · analyzer 0.1.0

Already bought this?

View your purchases

README

genesis-api-contract-drift

Deterministic OpenAPI and JSON Schema contract drift detector flagging breaking API changes.

Version License: MIT Zero Dependencies


The Problem

Public and internal REST/HTTP APIs frequently suffer from silent backwards-incompatible contract drift during development:

  • Developers delete or rename query parameters and URL paths.
  • Properties disappear from response objects, crashing frontend web clients and mobile applications.
  • Primitive data types silently switch (e.g. string ID switching to numeric integer).
  • New mandatory request parameters are introduced without bumping major API versions.

The Solution

genesis-api-contract-drift compares two OpenAPI (3.0/3.1) or JSON Schema specifications to detect structural drift. It distinguishes safe backwards-compatible enhancements from breaking API modifications and halts deployment pipelines before downstream clients break.


Key Features

  • Zero External Dependencies: Pure Node.js standard library (v18+).
  • Strict Breaking Change Detection:
  • Removed API paths and endpoints
  • Removed HTTP methods on existing paths
  • Dropped schema properties
  • Schema property type mutations
  • Newly introduced required request fields
  • Compatible Enhancement Tracking: Flags added endpoints, methods, and optional properties without failing CI.
  • CI / GitHub Actions Gating: Exits with code 1 upon detecting any breaking modification.

Quickstart

# Clone the repository
git clone git@github.com:genesiscode2026/genesis-api-contract-drift.git
cd genesis-api-contract-drift

# Compare two OpenAPI specifications
./bin/genesis-api-drift.js --old ./api_v1.json --new ./api_v2.json

# Output machine-readable JSON for CI
./bin/genesis-api-drift.js --old v1.json --new v2.json --json

Commercial Distribution

  • Product Name: genesis-api-contract-drift
  • Catalog ID: P15
  • Price: $39
  • Seller: genesiscode2026
  • Authorized Payout Rail: USDC on Base (0xC6F86e170411182114FcCdb28793dC76B5e8D144)
  • License: MIT

Security scan report

Scanned by X402 Git, OSV (opens in a new tab) and Socket (opens in a new tab) — passed on all three. Findings from X402 Git and Socket are listed below.

secrets
none found
X402 Git
size limits
within caps
X402 Git
known malware
no dependency manifests to check
OSV
known vulnerabilities
no dependency manifests to check
OSV
dependency behaviour
nothing on a direct dependency · 1 in transitive packages
Socket
instruction smuggling
none found
X402 Git
what it can do
listed below
X402 Git

What this can do

Tools
none
Runs
bin/genesis-api-drift.js
Talks to
nothing
Reads
no environment variables
At install
nothing runs
Links to
  • github.com
  • img.shields.io
  • keepachangelog.com
  • semver.org
Findings (2)
  • LOWSocket SBOM Resolver — Socket SBOM Resolver (transitive) — no lockfile, so installs are not reproducible
  • LOWbin/genesis-api-drift.js — Ships the script bin/genesis-api-drift.js

Releases 1

  1. v1.0.02026-09-17

    Production-ready release. Detects breaking changes and drift between API specification and implementation.

$39updates $9

Buy — go to the order block