0cd1047b10
Run Tests / test (pull_request) Successful in 30s
repo 內 35/38 份既有 spec 都是舊版歸檔流程留下的原始 delta 內容(`## ADDED Requirements`,缺標題與 Purpose),openspec CLI 現版本嚴格驗證 (--strict)會報錯或警告。逐一補上: - 缺標題/Purpose 的 30 份:加上 `# <name> Specification` 標題 + 依內容 撰寫的 Purpose 段落,`## ADDED Requirements` 改回 `## Requirements` - compose-cloud-baseline、scheduler-container:已有標題與 Requirements,只補 Purpose 包裝 - provider-verification:已有標題與 Purpose,只需把 `## ADDED Requirements` 改回 `## Requirements` - admin-user-management、notification-email:各有一條 requirement 缺 SHALL/MUST 關鍵字(純敘述句或表格),補上規範用語,內容不變 `openspec validate --specs --strict`:38/38 全過(原本 4/38)。純文件 補齊,未變更任何 requirement 的實質內容或行為描述。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011LpcY9b7y9x4fusHBTXciQ
47 lines
1.7 KiB
Markdown
47 lines
1.7 KiB
Markdown
# swagger-admin-api Specification
|
||
|
||
## Purpose
|
||
|
||
定義 Admin 端點的 Swagger API 文件涵蓋範圍,包含統計、會員/教練/課程/預約/評價管理端點。
|
||
|
||
## Requirements
|
||
|
||
### Requirement: Admin 端點 Swagger 文件
|
||
|
||
`app/Docs/AdminApiDoc.php` SHALL 文件化所有需要 Admin Bearer token 的管理端點。
|
||
|
||
#### Scenario: Admin stats 端點文件化
|
||
|
||
- **WHEN** 開啟 Swagger UI
|
||
- **THEN** `GET /admin/stats` 端點有文件,response 包含 `total_members`、`total_providers`、`total_offers`;403 非 admin 亦有定義
|
||
|
||
#### Scenario: Admin 會員管理端點文件化
|
||
|
||
- **WHEN** 開啟 Swagger UI
|
||
- **THEN** 以下端點均有文件,標示 `security: bearerAuth`:
|
||
- `GET /admin/members`(分頁 response,含 member_profile)
|
||
- `GET /admin/members/{id}`
|
||
- `PUT /admin/members/{id}/toggle-active`(response: is_active 新狀態)
|
||
- `GET /admin/check-member/{id}`
|
||
|
||
#### Scenario: Admin 教練管理端點文件化
|
||
|
||
- **WHEN** 開啟 Swagger UI
|
||
- **THEN** 以下端點均有文件:
|
||
- `GET /admin/providers`(分頁 response,含 provider_profile)
|
||
- `GET /admin/providers/{id}`
|
||
- `PUT /admin/providers/{id}/toggle-active`
|
||
- `PUT /admin/providers/{id}/toggle-verified`(response: is_verified 新狀態)
|
||
- `GET /admin/check-provider/{id}`
|
||
|
||
#### Scenario: Admin 課程、預約、評價管理端點文件化
|
||
|
||
- **WHEN** 開啟 Swagger UI
|
||
- **THEN** 以下端點均有文件:
|
||
- `GET /admin/offers`(分頁 response)
|
||
- `DELETE /admin/offers/{id}`
|
||
- `GET /admin/bookings`(分頁 response)
|
||
- `PUT /admin/bookings/{id}/complete`
|
||
- `GET /admin/reviews`(分頁 response,含 per_page 參數,最大 100)
|
||
- `DELETE /admin/reviews/{id}`
|