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

オープン
#1,611 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
csharp
領域
api

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
HTML
スター
8
フォーク
8
平均マージ
3時間 24分
マージ済み PR(30日)
91

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

IntelliTect/EssentialCSharp.Web のほかの issue

IntelliTect/EssentialCSharp.Web の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。