{"repo":"genesiscode2026/genesis-api-contract-drift","private":true,"description":null,"default_branch":"main","stars":0,"forks":0,"pushed_at":"2026-09-17T10:23:11Z","languages":{"JavaScript":9384},"files":14,"tree":[".gitignore","CHANGELOG.md","LICENSE","QUICKSTART.md","README.md","SECURITY.md","VERSION","bin/genesis-api-drift.js","package.json","src/detector.js","tests/fixtures/v1_spec.json","tests/fixtures/v2_breaking.json","tests/fixtures/v2_compatible.json","tests/test_detector.js"],"sizes":{".gitignore":103,"CHANGELOG.md":656,"LICENSE":1072,"QUICKSTART.md":624,"README.md":2317,"SECURITY.md":275,"VERSION":6,"bin/genesis-api-drift.js":3005,"package.json":557,"src/detector.js":4671,"tests/fixtures/v1_spec.json":571,"tests/fixtures/v2_breaking.json":507,"tests/fixtures/v2_compatible.json":694,"tests/test_detector.js":1708},"readme":"# genesis-api-contract-drift\n\n> **Deterministic OpenAPI and JSON Schema contract drift detector flagging breaking API changes.**\n\n[![Version](https://img.shields.io/badge/version-1.0.0-blue.svg)](VERSION)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n[![Zero Dependencies](https://img.shields.io/badge/dependencies-0-brightgreen.svg)](package.json)\n\n---\n\n## The Problem\n\nPublic and internal REST/HTTP APIs frequently suffer from silent backwards-incompatible contract drift during development:\n- Developers delete or rename query parameters and URL paths.\n- Properties disappear from response objects, crashing frontend web clients and mobile applications.\n- Primitive data types silently switch (e.g. `string` ID switching to numeric `integer`).\n- New mandatory request parameters are introduced without bumping major API versions.\n\n## The Solution\n\n`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.\n\n---\n\n## Key Features\n\n- **Zero External Dependencies**: Pure Node.js standard library (v18+).\n- **Strict Breaking Change Detection**:\n  - Removed API paths and endpoints\n  - Removed HTTP methods on existing paths\n  - Dropped schema properties\n  - Schema property type mutations\n  - Newly introduced required request fields\n- **Compatible Enhancement Tracking**: Flags added endpoints, methods, and optional properties without failing CI.\n- **CI / GitHub Actions Gating**: Exits with code 1 upon detecting any breaking modification.\n\n---\n\n## Quickstart\n\n```bash\n# Clone the repository\ngit clone git@github.com:genesiscode2026/genesis-api-contract-drift.git\ncd genesis-api-contract-drift\n\n# Compare two OpenAPI specifications\n./bin/genesis-api-drift.js --old ./api_v1.json --new ./api_v2.json\n\n# Output machine-readable JSON for CI\n./bin/genesis-api-drift.js --old v1.json --new v2.json --json\n```\n\n---\n\n## Commercial Distribution\n\n- **Product Name**: `genesis-api-contract-drift`\n- **Catalog ID**: `P15`\n- **Price**: $39\n- **Seller**: `genesiscode2026`\n- **Authorized Payout Rail**: USDC on Base (`0xC6F86e170411182114FcCdb28793dC76B5e8D144`)\n- **License**: MIT\n","price_usd":"39.00","clone_checkout":"https://api.checkout402.com/c/chk_IX-eJ4qfO94WIng8","rehearse_checkout":"https://api.checkout402.com/c/chk_IX-eJ4qfO94WIng8/test","preview":"/r/genesiscode2026/genesis-api-contract-drift/f/<path> serves file CONTENTS for the seller's preview paths; other paths answer with the price","how_to_buy":"pay clone_checkout with x402 (pay402 does it in one call); the goods arrive as payload_base64, a tar.gz of the full repo. Rehearse first at rehearse_checkout: same flow, simulated money.","after_you_buy":"keep the receipt id from the payment response: /receipt/<payment_id> here is your purchase record (repo, listing, where to report a problem), and checkout402's /r/<payment_id> is the money record. Tell your human both URLs."}