Mentorship: mentor directory endpoints (Phase 6.6 backend)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
Hướng nghiên cứu
Bắt đầu bằng việc xem xét các issue về dependency #9 và #10, sau đó kiểm tra public contract của Members và tests/Members/MembersTestHarness.cs để tìm các mẫu module hiện có. Truy vết việc đăng ký endpoint mentorship thông qua IEndpointModule.MapEndpoints và xác minh các bộ lọc được liệt kê, thứ tự sắp xếp, phân trang, việc loại trừ theo trạng thái member, cách xử lý capacity, dữ liệu múi giờ và mapping của mentorship.not_found bằng các bài kiểm thử xUnit.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Scope
Public-to-members directory the frontend grid consumes.
| Method | Path | Auth | Notes |
|---|---|---|---|
| GET | /mentorship/mentors |
active member | paginated; filters: expertiseTag, acceptingOnly=true |
| GET | /mentorship/mentors/{id} |
active member | mentor detail incl. expertise, capacity headroom, availability summary |
Rules
- Enrich with member card data (display name, title, avatar) via the Members module public contract — no cross-module DbContext reach-ins.
- Exclude mentors whose underlying member is not
Active(pending/deactivated must never surface — query level, not UI level). acceptingOnlyfilters onIsAcceptingMenteesand actual capacity headroom (belt and braces — the flag can lag).- Detail endpoint exposes weekly availability in the mentor's timezone plus the IANA id, so the booking UI can convert client-side.
Error codes
mentorship.not_found
Dependencies
Blocked by #9. Capacity headroom needs #10's Mentorship table (soft — can land computing headroom as capacity until M2 merges).
Acceptance criteria
- Deactivated/pending members filtered out (tested)
- Tag filter matches case-insensitively
- Pagination + deterministic ordering (accepting first, then newest opt-in)
Conventions (project-wide, non-negotiable)
- .NET 9, records for immutable shapes, file-scoped namespaces, primary constructors where they read well. Minimal-API endpoints grouped per module via
IEndpointModule.MapEndpoints. Result<T>(SharedKernel) instead of exception-driven control flow. Endpoint results map failures to ProblemDetails with the stable error codes listed above — the frontend keys off them.- Module owns its EF Core
DbContextmapped to its own Postgres schema. Modules never reference each other's internals — cross-module needs go through a public contract interface or an in-process domain event (IEventPublisher). - All external calls (GitHub, Stripe, Brevo, Cloudinary, Meilisearch) behind interfaces owned by the consuming module.
- Every list endpoint paginated (offset is fine). xUnit tests in
tests/CommunityPro.Tests/<Module>/following the existing harness patterns (seeMembers/MembersTestHarness.cs).
- Ngôn ngữ chính
- C#
- Star
- 0
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của CommunityPro/community-pro-api
-
cross-cutting decision
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
cross-cutting
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 58/100
-
admin
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
admin
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
sponsorship
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Tất cả issue của CommunityPro/community-pro-api
Issue tương tự
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoft/microsoft-ui-xaml#12515 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[v5-preview5] `func new` displays incorrect command in error message when project is not initializedĐang mởNeeds: Triage (Functions) v5 v5-preview5
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Azure/azure-functions-core-tools#5838 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
customer-reported needs-team-triage question server-Azure.Mcp tools-Pricing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
microsoft/mcp#4087 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Enable "remote"' featureĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100