Endpoint to create DataSource
还没有人认领这个 Issue。
评估
调研方向
首先定位 POST /api/v1/advocacy_groups/:id/data_sources/ 的路由,以及 datasets.data_sources 和 advocacy_group_data_sources 的模型或迁移。检查现有的 endpoint 测试和身份验证模式;完成的标准是验证两个记录的创建、适当的授权、一致的错误处理以及已更新的 API 文档。
由索引模型根据 Issue 内容生成。
描述
🛠️ Create DataSource
📋 Endpoints Required
-
POST/api/v1/advocacy_groups/:id/data_sources/— create resource
🗂️ Data Schema
Describe or paste the expected request/response shape below.
{
name: string,
description: string,
url: string <optional>,
tags: string[],
allowAggregation: boolean
}
✅ Acceptance Criteria
- All endpoints return correct HTTP status codes
- Input validation is applied to request bodies and query params
- Errors return consistent, descriptive JSON responses
- Endpoints are protected by appropriate auth/authorization middleware
- Pagination supported on the list endpoint
- Unit tests cover each endpoint (happy path + error cases)
- Integration tests pass in CI
- OpenAPI / Swagger docs updated
🔒 Auth & Permissions
N/A
🔗 Related
💬 Additional Context
This Endpoint will require writing data into two tables: datasets.data_sources and advocacy_group_data_sources. The constructor for the latter junction table will be like this:
{
advocacy_group_id: number,
data_source_id: number
}
- 主要语言
- HTML
- 星标
- 2
- 派生
- 11
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
OpenSourceFellows/map_dashboard_hackathon 的其他 Issue
-
California Tribal GIS Hackathon Intermediate
难度 2/5 半天 新手友好度 68/100
-
California Tribal GIS Hackathon Intermediate
难度 3/5 1-2 天 新手友好度 68/100
-
Advanced California Tribal GIS Hackathon
难度 4/5 3-5 天 新手友好度 45/100
-
Advanced California Tribal GIS Hackathon
难度 3/5 1-2 天 新手友好度 48/100
-
Advanced California Tribal GIS Hackathon
难度 4/5 3-5 天 新手友好度 45/100
查看 OpenSourceFellows/map_dashboard_hackathon 的全部 Issue
相似的 Issue
-
Warm-up comes out as one climb, or none, when the target is near the bottom of the board's grades未关闭bug epic:minimal-layout epic:workouts good first issue mobile priority:P2
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
ColeMurray/background-agents#2305 ·
维护者通常 1 天内回复
-
enhancement
难度 1/5 1 小时以内 新手友好度 90/100
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
oblien/openship#1086 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100