dify/api/controllers
Yufeng He 4e99a98c23 fix(datasets): validate console dataset list pagination as >= 1
ConsoleDatasetListQuery accepted any integer page/limit, so a negative or zero
value passed straight through to DatasetService.get_datasets and on to the DB
pagination. The annotation list queries already guard this with Field(ge=1)
(both console and service_api); apply the same bound to the console dataset
list query for consistency.

Add unit tests covering the defaults, a valid page/limit, and rejection of
non-positive page and limit.

From Claude Code.

Signed-off-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>
2026-06-18 16:12:53 +08:00
..
common chore: port isinstance to match case (#37271) 2026-06-18 00:18:03 +00:00
console fix(datasets): validate console dataset list pagination as >= 1 2026-06-18 16:12:53 +08:00
files feat(dify-agent): sync shell and back proxy updates (#37159) 2026-06-10 03:04:32 +00:00
inner_api feat: app deploy (#35670) 2026-06-17 09:28:43 +00:00
mcp chore: reorg imports (#35308) 2026-04-16 08:50:02 +00:00
openapi chore: example of make db.session pass from parameter. (#37561) 2026-06-18 02:16:09 +00:00
service_api chore: example of make db.session pass from parameter. (#37561) 2026-06-18 02:16:09 +00:00
trigger refactor(api): type webhook data extraction with RawWebhookDataDict TypedDict (#34486) 2026-04-03 02:24:17 +00:00
web refactor: fix OpenAPI contract generation schemas (#37387) 2026-06-12 14:25:53 +00:00
__init__.py chore(api/controllers): Apply Ruff Formatter. (#7645) 2024-08-26 15:29:10 +08:00
API_SCHEMA_GUIDE.md refactor(api): migrate console.app.workflow to BaseModel (#36216) 2026-05-18 07:31:37 +00:00
fastopenapi.py chore(api): Fix several typing errors (#37119) 2026-06-06 01:44:32 +00:00