From d3e9dca6158e4a464cfe2a686daa0d3ab27aad4e Mon Sep 17 00:00:00 2001 From: nick Date: Tue, 9 Jun 2026 15:20:16 -0600 Subject: [PATCH] docs: audit api v1 namespace usage --- docs/README.md | 2 ++ docs/api-v1-audit.md | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 docs/api-v1-audit.md diff --git a/docs/README.md b/docs/README.md index a55d9b3..4ee3d7b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -51,3 +51,5 @@ Archived documents are kept for history, but the primary documents above should The LILYGO T-Relay-S3 6-way board has been ordered as a future Cargo ESP candidate. Current development remains on the 2-channel relay board while the API and docs are prepared for output-count-agnostic operation. + +- `api-v1-audit.md` - Audit of legacy API paths vs `/api/v1` namespace. diff --git a/docs/api-v1-audit.md b/docs/api-v1-audit.md new file mode 100644 index 0000000..37fa784 --- /dev/null +++ b/docs/api-v1-audit.md @@ -0,0 +1,27 @@ +# API v1 Audit + +Generated: 2026-06-09 + +This audit checks for legacy `/api/...` references that should likely use `/api/v1/...`. + +## Potential Legacy References + +| File | Line | Content | +|------|------|---------| +| `tests/test_http_api_contract.py` | 31 | (f"/api/v1{match.group(1)}", match.group(2) or "ANY") | +| `tests/test_http_api_contract.py` | 82 | assert 'const API_BASE="/api/v1";' in source | +| `docs/project-state.md` | 192 | Active dashboard communication is WiFi/HTTP using `/api/v1`. | +| `docs/HARDWARE.md` | 148 | Active dashboard communication is WiFi/HTTP using `/api/v1`. | +| `docs/ARCHITECTURE.md` | 200 | Active dashboard communication is WiFi/HTTP using `/api/v1`. | +| `docs/API.md` | 14 | /api/v1 | +| `docs/API.md` | 60 | Pre-versioned root routes remain registered as compatibility aliases for existing local clients. New clients should use `/api/v1`. | +| `docs/CHATGPT_HANDOFF.md` | 49 | - HTTP API base path is `/api/v1`. | +| `docs/CHATGPT_HANDOFF.md` | 67 | New clients should use `/api/v1`. | +| `docs/CHATGPT_HANDOFF.md` | 98 | - The project recently standardized current HTTP routes under `/api/v1`. | +| `docs/CHATGPT_HANDOFF.md` | 100 | - The embedded WebUI uses `const API_BASE="/api/v1";`. | +| `docs/CHATGPT_HANDOFF.md` | 136 | Active dashboard communication is WiFi/HTTP using `/api/v1`. | +| `docs/dashboard-esp32s3.md` | 161 | Active dashboard communication is WiFi/HTTP using `/api/v1`. | +| `docs/roadmap.md` | 135 | Active dashboard communication is WiFi/HTTP using `/api/v1`. | +| `docs/UART_PROTOCOL.md` | 281 | Active dashboard communication is WiFi/HTTP using `/api/v1`. | +| `firmware/esp32/overland-controller/overland-controller.ino` | 664 | const API_BASE="/api/v1"; | +| `firmware/esp32/overland-controller/overland-controller.ino` | 1342 | #define API_V1(path) "/api/v1" path |