Support location-scoped notification subscriptions (location.feed_added)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
调研方向
Start with the API schema in docs/UserServiceAPI.yaml and the existing subscription creation and response code for POST /v1/user/subscriptions; the issue does not name the implementation files or tests. Trace how subscriptions currently reference targets, then determine how the new location join table fits the database layer. Done means the endpoint creates a subscription for the supplied location IDs and returns those IDs, with the required validation enforced in code.
由索引模型根据 Issue 内容生成。
描述
Description
location.feed_added alerts a user when a feed is added for a location they follow, so a subscription must carry the list of locations. We'll add a dedicated notification_subscription_location join table and expose the location list through the API.
Notification type in scope
| Notification type | Target |
|---|---|
location.feed_added |
list of location IDs |
Schema changes (docs/UserServiceAPI.yaml)
Add location_ids to the create request and to the subscription response:
CreateNotificationSubscriptionRequest:
properties:
# ...notification_id...
location_ids:
type: array
items:
type: string
description: Location IDs to subscribe to. Required for location.feed_added.
NotificationSubscription:
properties:
# ...existing fields...
location_ids:
type: array
items:
type: string
nullable: true
description: Locations this subscription targets (location.feed_added).
Code changes
- POST /v1/user/subscriptions creates one subscription referencing all supplied locations and returns it with location_ids populated. _Validation is enforced in code, not the schema. Per-type schema validation would need oneOf/discriminator or JSON Schema if/then/else (3.1 only; this spec is 3.0.0), and union typing was already abandoned here due to openapi-generator limitations (see docs/DatabaseCatalogAPI.yaml SearchFeedItemResult).
DB changes
Add new relation table between user subscriptions and locations
- 主要语言
- Python
- 星标
- 34
- 派生
- 7
- 平均合并
- 3 天 34 分钟
- 30 天内合并 PR
- 8
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
MobilityData/mobility-feed-api 的其他 Issue
-
fix(notifications): dispatcher ignores a subscription's feeds and sends every feed.url_updated event未关闭
难度 2/5 1-3 小时 新手友好度 78/100
MobilityData/mobility-feed-api#1875 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
MobilityData/mobility-feed-api#1846 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 70/100
MobilityData/mobility-feed-api#1755 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
MobilityData/mobility-feed-api#1647 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 65/100
MobilityData/mobility-feed-api#836 ·
维护者通常 1 天内回复
查看 MobilityData/mobility-feed-api 的全部 Issue
相似的 Issue
-
难度 1/5 1-3 小时 新手友好度 68/100
MangasMango/bound-to-rot#41 · 1 条评论 ·
-
breaking change
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
-
check-skill-pages: show fixture build errors when a build fails可能已有人在做 @ShahadatTest 今天认领。 未关闭good first issue P2
难度 1/5 1 小时以内 新手友好度 85/100
coco-research/coco#439 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
IgniteRobotics/flashpoint#45 ·
维护者通常 1 天内回复