Skip to content

feat(ev): add tags, registration_form_url, and event_type fields - #124

Merged
poBogan merged 2 commits into
mainfrom
feature/tags-registration_form_url-event_type
Apr 4, 2026
Merged

feat(ev): add tags, registration_form_url, and event_type fields#124
poBogan merged 2 commits into
mainfrom
feature/tags-registration_form_url-event_type

Conversation

@poBogan

@poBogan poBogan commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

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

  • Code follows project conventions
  • I tested my changes locally
  • Linting passes
  • I updated/added tests for my changes
  • I added @seberatolmez or @DogukanUrker as reviewers

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.
@vercel

vercel Bot commented Apr 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
gdg-yu-form-service Ready Ready Preview, Comment Apr 4, 2026 4:11pm
gdg-yu-forms Ready Ready Preview, Comment Apr 4, 2026 4:11pm
gdg-yu-user-service Ready Ready Preview, Comment Apr 4, 2026 4:11pm

@github-actions github-actions Bot added the event label Apr 4, 2026
@poBogan poBogan changed the title Support tags, registration form and event type feat: tags, registration form and event types Apr 4, 2026
@poBogan poBogan changed the title feat: tags, registration form and event types feat: Add tags, registration form and event types Apr 4, 2026
Comment thread services/event/app/models/event.py Outdated
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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@poBogan poBogan changed the title feat: Add tags, registration form and event types feat: Add tags, registration_form_url, and event_type fields Apr 4, 2026
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.
@poBogan poBogan changed the title feat: Add tags, registration_form_url, and event_type fields feat(ev): Add tags, registration_form_url, and event_type fields Apr 4, 2026
@poBogan
poBogan requested a review from DogukanUrker April 4, 2026 16:14
@DogukanUrker DogukanUrker changed the title feat(ev): Add tags, registration_form_url, and event_type fields feat(ev): add tags, registration_form_url, and event_type fields Apr 4, 2026
@poBogan poBogan self-assigned this Apr 4, 2026
@poBogan
poBogan merged commit ee0b948 into main Apr 4, 2026
6 checks passed
@poBogan
poBogan deleted the feature/tags-registration_form_url-event_type branch April 4, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(fb): add tags, registration_form_url, event_type to models and persistence

3 participants