spike: generate the assistant's API client from the OpenAPI document
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ó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- csharp, openapi
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Start by reading assistant/src/TaskFlow.Mcp/Api/ApiModels.cs and TaskFlowApiClient.cs to list the operations and DTOs in use; compare them with the OpenAPI document and the generated web client under TaskFlow.Web/src/api/client/**. Prototype the task endpoints with a candidate option, then measure source size, plugin publish size, build needs, CI changes, and test impact. Finish with the comparison table, prototype test results, recommendation, and any required follow-up issues.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Found while reviewing the assistant-builder agent for #400 (piece 8). The assistant's HTTP client and its DTOs are written by hand to mirror TaskFlow.Api, while the web client is generated from the API's OpenAPI document. This spike asks whether the assistant's client should be generated too.
What I found
assistant/src/TaskFlow.Mcp/Api/holds 341 lines:ApiModels.cs(101),TaskFlowApiClient.cs(221) andTaskFlowApiException.cs(19). None of it is generated.- The web client (
TaskFlow.Web/src/api/client/**) is generated from/openapi/v1.jsonwithopenapi-tsand committed. The backend builder regenerates it when the API surface changes, so a stale web client is caught at the source. - Nothing equivalent protects the assistant. When the API changes a DTO or endpoint, the assistant mirror is updated by hand, by the assistant builder, from the brief. A change nobody remembers shows up only as a runtime error from a tool or as a failing test, if one exists.
assistant/is a separate solution (its own.sln,Directory.Build.propsand.editorconfig) that ships as a plugin binary, so any option has to respect that boundary and the published size.
Scope
- Read the client and models and list which API operations and DTOs the assistant actually uses (a subset of the API).
- Compare these options on a prototype of one endpoint family (the task endpoints are a good candidate):
- Generate a C# client from the OpenAPI document (Kiota, NSwag, openapi-generator or the Microsoft OpenAPI client tooling). Check generated size, how it fits
ToolGuardandTaskFlowApiException, and how little of it the assistant needs. - Reference the API's DTOs directly (a shared project or a project reference). Check what it does to the separate solution and the plugin publish.
- Keep the hand-written client and add a contract test that compares it to the OpenAPI document and fails on drift.
- Keep things as they are.
- Generate a C# client from the OpenAPI document (Kiota, NSwag, openapi-generator or the Microsoft OpenAPI client tooling). Check generated size, how it fits
- For each option, measure or estimate: lines of source kept in the repo, publish size of the plugin binary, build-time needs (a running API or a committed spec file), CI changes, and test impact. The assistant has about 480 tests.
- Say how each option changes the pipeline from #400: who regenerates the assistant client, and in which stage, if it is generated.
- Note how this interacts with #428, the enum casing spike. If responses use PascalCase enum names, a generated client's enum handling depends on that decision.
- Recommend one option.
Acceptance criteria
- A comparison table is posted on this issue, with the measurements from scope item 3 for at least three options.
- The prototype for the leading option builds and the existing task tool tests still pass against it, or the issue says why it was dropped.
- A recommendation is recorded. If generation is recommended, follow-up issues are opened for the migration and for the pipeline change; if not, the issue says what keeps the mirror honest (for example the contract test).
Out of scope
- Migrating the assistant to the generated client. This issue produces a decision and follow-up issues.
- The web client, which is already generated.
- The timezone offset representation (a separate spike).
- Ngôn ngữ chính
- C#
- Star
- 1
- Fork
- 0
- Merge trung bình
- 2 giờ 2 phút
- Pull request đã merge (30 ngày)
- 98
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọ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 nevridge/TaskFlow
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
tech-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của nevridge/TaskFlow
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
juandresrodca/AdminForge#54 ·
-
[辞書] C/C++のプリプロセッサ指令名を英字のままにするĐang mở要トリアージ 辞書
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 86/100
yksr-melt/Meltype#1625 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Docs typoĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
MonoGame/docs.monogame.github.io#328 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
space-wizards/RobustToolbox#7197 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation high priority
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
lachydotmcg/capri-desktop#201 ·
Maintainer thường phản hồi trong vòng 1 ngày