Repository navigation
Validate event search parameters in FastAPI query models - #16354
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
cubic analysis
No issues found across 2 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Linked issue analysis
Linked issue: PLR-428: Use FastAPI support for complex query parameter schemas
| Status | Acceptance criteria | Notes |
|---|---|---|
| ✅ | Validate filter schemas through FastAPI query models | EventQueryFilter uses Json[Filter] in the query models, replacing endpoint-level JSON parsing. |
| ✅ | Remove the obsolete comment about unsupported complex query schemas | The manual parser and its outdated FastAPI support comment are removed from the endpoint file. |
Auto-approved: Moves event filter JSON validation from endpoint helpers into FastAPI query models via Json[Filter], keeping the query parameter typed as string in generated schemas. Valid/omitted filters behave identically; invalid filters still 422 with a clearer query.filter location.
View guided diff | Turn on auto-fix | Re-trigger cubic
Merging this PR will improve performance by 10.19%
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes
|
There was a problem hiding this comment.
0 issues found across 4 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Auto-approved: Refactors event filter/search validation into FastAPI query models, preserving existing rejection behavior and OpenAPI schemas while declaring the min-length rule; generated client and frozen fixtures updated.
View guided diff | Turn on auto-fix | Re-trigger cubic
Event listing and statistics routes now validate search parameters through FastAPI query models. Pydantic parses the JSON-encoded filter, enforces the existing three-character minimum for search text, and checks that search text is accompanied by an organization ID.
OpenAPI now declares the search minimum length. The frozen 2026-04 and 2026-10 fixtures include the constraint, and the internal TypeScript client was regenerated.
Closes PLR-428.
Focused query validation checks and both frozen OpenAPI comparisons passed. The event integration tests stopped at fixture setup because the sandbox blocked access to local MinIO.