OpenSourceFellows / OpenSourceFellows/map_dashboard_hackathon
Endpoint to create DataSource
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 2
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
🛠️ 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
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the POST /api/v1/advocacy_groups/:id/data_sources/ entry point and inspect the existing models or migrations for datasets.data_sources and advocacy_group_data_sources. Check the endpoint's current tests and determine what remains for authorization, pagination, and OpenAPI documentation. Done means the required behavior, validation, error responses, permissions, tests, and documentation are complete.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, backend, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100