docs/followups/2025-12-11-verify-oas-coverage-script.md
Date: 2025-12-11 Related Feature: 012-unified-health-status Priority: Low (script works but output is misleading)
The scripts/verify-oas-coverage.sh script has issues that cause misleading output:
Endpoint prefix mismatch: The script extracts routes without the /api/v1 prefix, but the OAS file documents them with the full path. This causes false "missing" reports.
Uppercase artifact: The sed command \U\1 uppercases the HTTP method but also adds a "U" prefix to the path (e.g., UGet /config instead of GET /config).
Coverage calculation is incorrect: Shows "Coverage: 100%" even when listing 37 "missing" endpoints because the comparison logic doesn't properly match routes.
❌ Missing OAS documentation for:
UDelete /{name}
UGet /config
...
📊 Coverage Statistics:
Total endpoints: 37
Documented: 37
Missing: 37
Coverage: 100.0% <-- This is wrong
The route extraction from Go files captures relative paths like /config, but the OAS file documents them as /api/v1/config. The comparison fails to match these.
Fixed the bash syntax error where inline comments appeared after backslash line continuations (lines 45-47). This was causing "command not found" errors.
/api/v1 prefix to extracted routes, OR/api/v1 prefix from OAS paths for comparison# Run the script and verify:
# 1. No "command not found" errors
# 2. Routes show as "GET /api/v1/config" not "UGet /config"
# 3. Coverage percentage matches actual missing count
./scripts/verify-oas-coverage.sh
scripts/verify-oas-coverage.sh