dograh/api
Amaan Javed 9471041b8b
fix(api): validate pagination bounds on run-list endpoints (#553) (#554)
* fix(api): validate pagination bounds on run-list endpoints (#553)

GET /workflow/{id}/runs and GET /campaign/{id}/runs declared bare
`page: int = 1` / `limit: int = 50` params, then computed
`total_pages = (total_count + limit - 1) // limit`. A `?limit=0` raised an
unhandled ZeroDivisionError (HTTP 500), and negative limit/page produced a
negative offset and nonsensical pagination.

Add `Query(ge=1, le=100)` / `Query(1, ge=1)` bounds to both endpoints,
matching the sibling list endpoints (/usage/runs and the superuser runs
endpoint) that already validate these. Out-of-range values now return 422.

Adds a regression test covering limit=0/-5/101 and page=0 on both endpoints.

Fixes #553

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore(docs): regenerate openapi.json for run-list pagination bounds (#553)

The added Query(ge/le) bounds on the workflow-run and campaign-run list
endpoints changed the OpenAPI schema; regenerate the committed spec via
`python -m scripts.dump_docs_openapi` so the drift-check passes. Only the
limit/page parameter schemas for those two endpoints change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Abhishek Kumar <abhishek@a6k.me>
2026-07-18 16:29:28 +05:30
..
alembic fix: fix org scoped access for resources (#517) 2026-07-09 23:04:33 +05:30
assets feat: telephony call transfer (#155) 2026-02-16 14:33:33 +05:30
db fix: fix org scoped access for resources (#517) 2026-07-09 23:04:33 +05:30
errors fix: increase concurrency limit an handle it across all call paths (#508) 2026-07-09 18:29:01 +05:30
mcp_server chore: improve upon mcp prompts (#494) 2026-07-03 18:14:03 +05:30
native/rnnoise Initial Commit 🚀 🚀 2025-09-09 14:37:32 +05:30
routes fix(api): validate pagination bounds on run-list endpoints (#553) (#554) 2026-07-18 16:29:28 +05:30
schemas feat: add tool test panel for HTTP API tools (#547) 2026-07-18 16:00:50 +05:30
services feat(openai-realtime): allow pinning input transcription language (#557) 2026-07-18 16:08:35 +05:30
tasks fix: fix org scoped access for resources (#517) 2026-07-09 23:04:33 +05:30
tests fix(api): validate pagination bounds on run-list endpoints (#553) (#554) 2026-07-18 16:29:28 +05:30
utils fix: fix org scoped access for resources (#517) 2026-07-09 23:04:33 +05:30
.cursorignore Initial Commit 🚀 🚀 2025-09-09 14:37:32 +05:30
.dockerignore Initial Commit 🚀 🚀 2025-09-09 14:37:32 +05:30
.env.example feat(auth): gate OSS signup behind ENABLE_SIGNUP flag (#514) 2026-07-13 14:08:25 +05:30
.env.test.example chore: drain active calls before rolling updates (#474) 2026-06-29 06:00:31 +05:30
.gitignore Initial Commit 🚀 🚀 2025-09-09 14:37:32 +05:30
__init__.py Initial Commit 🚀 🚀 2025-09-09 14:37:32 +05:30
AGENTS.md feat: add chat based testing for voice agent (#308) 2026-05-21 15:20:02 +05:30
alembic.ini chore: bump pipecat version and fix tests (#263) 2026-05-04 21:35:37 +05:30
app.py fix: add CORS preflight handler and ACAO header for embed config endpoint (#403) 2026-06-03 21:27:44 +05:30
CLAUDE.md Chore/add setup and contributing docs (#90) 2025-12-27 09:25:20 +05:30
conftest.py feat: add devcontainer based setup (#352) 2026-05-25 20:44:22 +05:30
constants.py feat(auth): gate OSS signup behind ENABLE_SIGNUP flag (#514) 2026-07-13 14:08:25 +05:30
Dockerfile feat: add Helm chart for Kubernetes deployment (#365) 2026-07-03 12:39:39 +05:30
enums.py fix: increase concurrency limit an handle it across all call paths (#508) 2026-07-09 18:29:01 +05:30
logging_config.py feat: add headless mode, redesign floating widget, refactor lifecycle callbacks (#268) 2026-05-07 12:23:41 +05:30
pyproject.toml chore(main): release dograh 1.42.0 (#502) 2026-07-15 20:10:29 +05:30
pytest.ini feat: refactor node spec and add mcp tools (#244) 2026-04-21 07:56:16 +05:30
requirements.dev.txt feat: add devcontainer based setup (#352) 2026-05-25 20:44:22 +05:30
requirements.txt Implement cost calculator for Tuber (#471) 2026-07-02 12:51:14 +05:30
sdk_expose.py feat: refactor node spec and add mcp tools (#244) 2026-04-21 07:56:16 +05:30