Skip to content

Add strict input validation for predictions queries - #477

Merged
greatest0fallt1me merged 1 commit into
Predictify-org:mainfrom
code-0-stella:task/predictions-validate
Jul 25, 2026
Merged

Add strict input validation for predictions queries#477
greatest0fallt1me merged 1 commit into
Predictify-org:mainfrom
code-0-stella:task/predictions-validate

Conversation

@code-0-stella

Copy link
Copy Markdown

Add strict input validation for predictions queries

PR Description

This change adds route-boundary validation for GET /api/predictions using a dedicated Zod schema.

What changed

  • Introduced a dedicated validator for predictions query parameters in predictions.ts
  • Wired the predictions route to reject unexpected query params and enforce the existing validation rules in predictions.ts
  • Added a regression integration test covering invalid/unexpected query parameters in predictions.test.ts

Why

This makes predictions input handling consistent with the project’s other validated routes and ensures malformed requests fail fast with the standard 400 validation error envelope.

Verification

@drips-wave

drips-wave Bot commented Jul 25, 2026

Copy link
Copy Markdown

@code-0-stella Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@greatest0fallt1me

Copy link
Copy Markdown
Contributor

Merged into main via admin resolver (-X theirs).

@greatest0fallt1me
greatest0fallt1me merged commit 116e3ff into Predictify-org:main Jul 25, 2026
@greatest0fallt1me

Copy link
Copy Markdown
Contributor

LGTM 👌 merging. Solid contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add input validation for predictions (buffer #14)

3 participants