Developer releases zero-dependency CLI tool to detect OpenAPI spec and code drift
A developer has released oas-drift, an open-source command-line tool that identifies mismatches between an OpenAPI specification and a Python codebase. The tool detects three types of drift: routes defined in the spec but missing from code, routes in code not listed in the spec, and paths where the HTTP method differs between the two. Built using only Python 3.11's standard library with no external dependencies, it parses source files using Python's ast module without executing any code, ensuring fully deterministic output. Unlike many CI-facing tools, oas-drift exits with code 0 regardless of findings, leaving the decision to fail a build to the development team's own policy. The tool supports JSON output for machine-readable reports, making it easy to integrate into CI pipelines alongside filtering tools like jq.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in