Serve /api/config endpoint with managed connections
- Ngôn ngữ chính
- TypeScript
- Star
- 481
- Fork
- 108
- Merge trung bình
- 8 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 7
Mô tả
## Parent PRD
#1660
## What to build
Add a `GET /api/config` endpoint that returns the client-relevant subset of the config file (everything except the `server` block). This replaces the current `/defaultConnection` endpoint and `defaultConnection.json` file generation.
The endpoint returns connections (keyed by stable ID with name, url, queryEngine, authentication, fetchTimeout, nodeExpansionLimit), feedbackUrl, and any other client-relevant fields. The `server` block is filtered out since it contains server-only settings.
## Acceptance criteria
- [ ] `GET /api/config` returns client-relevant config as JSON
- [ ] `server` block is excluded from the response
- [ ] Connections include their stable key/ID in the response
- [ ] Returns empty connections object when no config file is present
- [ ] Old `/defaultConnection` endpoint removed
- [ ] Integration tests for the endpoint with various config states
## Blocked by
- Blocked by #1661
## User stories addressed
- User story 1
- User story 7
## Related Issues
- Part of #1660
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách lần theo endpoint /defaultConnection hiện có và quá trình tạo defaultConnection.json, sau đó xem lại cách tệp config và các kết nối được quản lý được biểu diễn. Công việc hoàn tất khi GET /api/config trả về JSON liên quan đến client với các ID kết nối ổn định, loại trừ server, xử lý config bị thiếu bằng các kết nối rỗng, xóa endpoint cũ và có phạm vi kiểm thử tích hợp cho các trạng thái config đã nêu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- typescript
- Lĩnh vực
- api, backend
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 48/100