Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
LLM-backed condition in Watchflow; adds ~1-3s latency. Gracefully skips
(no violation) if the LLM is unavailable.

### Fixed

- **Duplicate tags on Swagger docs** -- Swagger docs should now display all methods only once without repeating them in different tags.

## [2026-03-01] -- PR #59

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/api/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
logger = structlog.get_logger()

# Use prefix to keep URLs clean: /auth/validate-token
router = APIRouter(prefix="/auth", tags=["Authentication"])
router = APIRouter(prefix="/auth")


class ValidateTokenRequest(BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion src/api/recommendations.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

logger = structlog.get_logger()

router = APIRouter(prefix="/rules", tags=["Recommendations"])
router = APIRouter(prefix="/rules")

# --- Models --- # API schema—keep in sync with frontend expectations.

Expand Down
2 changes: 1 addition & 1 deletion src/api/repos.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

logger = structlog.get_logger()

router = APIRouter(prefix="/repos", tags=["Repositories"])
router = APIRouter(prefix="/repos")


@router.get(
Expand Down
16 changes: 8 additions & 8 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,20 +122,20 @@ async def lifespan(_app: FastAPI) -> Any:


app.include_router(webhook_router, prefix="/webhooks", tags=["GitHub Webhooks"])
app.include_router(rules_api_router, prefix="/api/v1", tags=["Public API"])
app.include_router(recommendations_api_router, prefix="/api/v1", tags=["Recommendations API"])
app.include_router(auth_api_router, prefix="/api/v1", tags=["Authentication API"])
app.include_router(repos_api_router, prefix="/api/v1", tags=["Repositories API"])
app.include_router(scheduler_api_router, prefix="/api/v1/scheduler", tags=["Scheduler API"])
app.include_router(rules_api_router, prefix="/api/v1", tags=["Public"])
app.include_router(recommendations_api_router, prefix="/api/v1", tags=["Recommendations"])
app.include_router(auth_api_router, prefix="/api/v1", tags=["Authentication"])
app.include_router(repos_api_router, prefix="/api/v1", tags=["Repositories"])
app.include_router(scheduler_api_router, prefix="/api/v1/scheduler", tags=["Scheduler"])


@app.get("/", tags=["Health Check"])
@app.get("/", tags=["Health"])
async def read_root() -> dict[str, str]:
"""A simple health check endpoint to confirm the service is running."""
return {"status": "ok", "message": "Watchflow agents are running."}


@app.get("/health/tasks", tags=["Health Check"])
@app.get("/health/tasks", tags=["Health"])
async def health_tasks() -> dict[str, Any]:
"""Check the status of the task queue."""
stats = task_queue.get_stats()
Expand All @@ -150,7 +150,7 @@ async def health_tasks() -> dict[str, Any]:
}


@app.get("/health/scheduler", tags=["Health Check"])
@app.get("/health/scheduler", tags=["Health"])
async def health_scheduler() -> dict[str, Any]:
"""Check the status of the deployment scheduler."""
return get_deployment_scheduler().get_status()