A FastAPI-based backend service that compares two OpenAPI specifications, detects meaningful API changes, classifies their risk level, stores the analysis in PostgreSQL, and exposes the result as JSON, Markdown, and a minimal HTML demo report.
Try it now → Open Swagger UI
Upload two OpenAPI specs, get a risk-classified change report in seconds.
| Swagger UI | https://api-change-radar.onrender.com/docs |
| Health Check | https://api-change-radar.onrender.com/healthz |
| API Base | https://api-change-radar.onrender.com/api/v1 |
⏳ Cold start: This demo runs on Render Free. The first request after inactivity may take up to 60 seconds while the container starts. Subsequent requests are fast.
API changes often create silent breakage, release risk, and integration problems. A plain text diff is not enough for real review.
API Change Radar answers:
- What changed between version A and version B?
- Which changes are likely to break consumers?
- Which changes are low-risk and which ones need review?
- Can the result be persisted and retrieved as a structured report?
- Deterministic diff and severity classification for OpenAPI specs
- JSON and YAML spec uploads
- PostgreSQL-backed persistence for runs, artifacts, and reports
- Structured report retrieval in JSON, Markdown, and HTML demo format
- Health, readiness, and Prometheus metrics endpoints
- Optional AI changelog interpretation (disabled by default, non-authoritative)
- Docker-first deployment with CI/CD pipeline
Current status: live MVP demo / active iteration
The core flow is fully operational: ingestion → validation → normalization → deterministic diff → severity classification → persistence → structured report retrieval. The project is actively maintained and deployed on Render.
The fastest way to test the full analysis flow — no setup needed:
- Open the Swagger UI (or
http://localhost:8000/docsif running locally). - Expand POST /api/v1/runs.
- Click Try it out.
- Upload two OpenAPI spec files (you can use
examples/v1.yamlandexamples/v2.yamlfrom this repo). - Optionally enter a short
changelog_text. - Click Execute — you will receive a
run_id. - Use the returned
run_idwith these endpoints:- GET /api/v1/runs/{run_id} — check processing status
- GET /api/v1/reports/{run_id} — fetch the structured JSON report
- GET /api/v1/reports/{run_id}?format=markdown — Markdown export
- GET /api/v1/reports/{run_id}/demo — minimal HTML demo report page
Main parts of the system:
- Ingestion API: accepts two spec files and optional changelog text
- Validator / Parser: validates OpenAPI input and reads JSON/YAML
- Normalizer: converts specs into a canonical internal representation
- Diff Engine: computes deterministic findings
- Severity Engine: classifies findings into risk levels
- Report Store: persists runs, findings, artifacts, and report state
- Read API: returns structured reports and demo views
- Observability Layer: exposes structured logs, traces, and metrics
See docs/architecture.md for more detail.
- Python 3.12
- FastAPI
- PostgreSQL
- SQLAlchemy + Alembic
- Docker / Docker Compose
- Pytest
- OpenTelemetry
- GitHub Actions
- Docker Desktop or Docker Engine with Compose support
git clone https://github.com/fatihaybsn/API-Change-Radar.git
cd API-Change-Radar
cp .env.example .env
docker compose pull
docker compose up -dOnce the stack is running, open:
- Health check:
http://localhost:8000/healthz - Swagger UI:
http://localhost:8000/docs
The docker-compose.yml pulls the prebuilt image from Docker Hub (fatihayibasan/api-change-radar:latest). Database migrations run automatically on container startup.
To stop the stack:
docker compose downTo stop and remove data volumes:
docker compose down -vTo build the image locally and modify source code:
docker compose -f docker-compose.dev.yml up --build -dStop with:
docker compose -f docker-compose.dev.yml down -vMigrations run automatically. For manual migration outside Docker: alembic upgrade head.
Create a run:
curl -X POST http://localhost:8000/api/v1/runs \
-F "specs=@examples/v1.yaml;type=application/yaml" \
-F "specs=@examples/v2.yaml;type=application/yaml" \
-F "changelog_text=Example changelog for demo"Fetch the report (replace <RUN_ID> with the returned run_id):
curl http://localhost:8000/api/v1/reports/<RUN_ID>
curl "http://localhost:8000/api/v1/reports/<RUN_ID>?format=markdown"Open the demo HTML report in the browser:
http://localhost:8000/api/v1/reports/<RUN_ID>/demo
- Deterministic logic first
- Explicit over clever
- Narrow scope over broad ambition
- Tests for meaningful business logic
- Observability is part of the system
- AI is optional and non-authoritative
Automated CI via GitHub Actions on every push to main and every pull request:
- Code quality: formatting check with
ruff format --checkand linting withruff check - Database: migration validation with
alembic upgrade head - Tests: unit and integration tests covering diff engine, severity engine, API ingestion, report retrieval, run orchestration, health endpoints, and settings
- Container: Docker image build and end-to-end smoke test against a live stack
Run locally:
make check # lint + test
./scripts/smoke.sh # end-to-end smoke testConfiguration is managed via environment variables. Copy .env.example to .env for defaults — it includes all available options with sensible defaults.
Key settings:
| Variable | Default | Description |
|---|---|---|
APP_PORT |
8000 |
Host port exposed by Docker Compose |
ENVIRONMENT |
development |
Runtime environment label |
ENABLE_LLM_CHANGELOG |
false |
Optional AI changelog interpretation (deterministic results remain authoritative) |
See .env.example for the full list.
You are not inside the repository folder that contains docker-compose.yml. Move into the project folder first, then run:
docker compose pull
docker compose up -dChange the host port in .env:
APP_PORT=8001Then restart:
docker compose up -dThat is expected. This project is an API-first backend service. Use:
/docsfor Swagger UI/redocfor alternate docs/api/v1/reports/<RUN_ID>/demofor the report demo page
docker compose down -vBuilt by Fatih Ayıbasan as a backend-focused portfolio project.
- GitHub: fatihaybsn