Reading API types: narrow IWordCountService, seal records, separate API DTOs

Đang mở
#1,611 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

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
45/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp
Lĩnh vực
api

Hướng nghiên cứu

Start by reading the definitions of IWordCountService, ChapterWordCount, ReadingContextViewModel, ReadingProfileSummary, ChapterStatsResponse, BookStatsResponse, and RecordSessionResult, then check their usages and serialization tests. Narrow the service interface, seal the records, separate API DTOs, remove the duplicate response type, split the file’s types, and constrain RecordSessionResult so invalid states cannot be represented. Done when usages and tests reflect these changes without changing the public API contract unintentionally.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

IWordCountService is wide (GetPageWordCount is just GetPageStats(...)?.PageWords ?? 0). ChapterWordCount/ReadingContextViewModel are unsealed records. ReadingProfileSummary is serialized as the public API contract, ChapterStatsResponse duplicates ChapterWordCount, and BookStatsResponse.cs holds two types. RecordSessionResult can represent both-null/both-set states.

Found during review of #1267; intentionally kept out of that PR.

Ngôn ngữ chính
HTML
Star
8
Fork
8
Merge trung bình
3 giờ 24 phút
Pull request đã merge (30 ngày)
91

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của IntelliTect/EssentialCSharp.Web

Tất cả issue của IntelliTect/EssentialCSharp.Web

Issue tương tự

Thêm issue về Backend & API Design

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.