feat(ev): add tags, registration_form_url, and event_type fields - #124
Merged
Conversation
Add tags, registration_form_url, and event_type fields across Event models and persistence. Introduces validators for tags (non-empty, <=50 chars) and enforces event_type length constraints; EventInDB supplies sensible defaults for backward compatibility. EventResponse maps event_type to the JSON key "type" and enables name-based population. Persisting of new fields added to EventRepository create, and numerous tests updated/added to cover validation, serialization, repository updates, and backward compatibility.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
DogukanUrker
reviewed
Apr 4, 2026
| image_url: str | None = None | ||
| tags: list[str] | None = None | ||
| registration_form_url: str | None = None | ||
| event_type: str | None = Field(default=None, min_length=1, max_length=100) |
Member
There was a problem hiding this comment.
If we add none type to every field in a model, what is the purpose of adding types? We should only add none type if a field is optional.
Change EventUpdate.tags to default to an empty list (Field(default_factory=list)) instead of allowing None, and make event_type a required non-empty string (Field(min_length=1, max_length=100)). This avoids None handling for tags and ensures event_type validation is enforced on updates.
registration_form_url, and event_type fields
DogukanUrker
approved these changes
Apr 4, 2026
seberatolmez
approved these changes
Apr 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brief Description
Add tags, registration_form_url, and event_type fields across Event models and persistence. Introduces validators for tags (non-empty, <=50 chars) and enforces event_type length constraints; EventInDB supplies sensible defaults for backward compatibility. EventResponse maps event_type to the JSON key "type" and enables name-based population. Persisting of new fields added to EventRepository create, and numerous tests updated/added to cover validation, serialization, repository updates, and backward compatibility.
Related Issue
Closes #120
Checklist