Files
CFDivePlatform/openspec/specs/swagger-auth-supplement/spec.md
T
a620906209 4feeeff94a
Tests / PHP 8.2 (pull_request) Failing after 2s
Tests / PHP 8.3 (pull_request) Failing after 2s
pull requests / uneditable (pull_request_target) Failing after 0s
docs:補全所有 API 端點 Swagger 文件(73 個端點)
- 修正 AuthApiDoc.php 路徑錯位(/register/member → /member/register 等)
  及 change-password 方法(Post→Put);補上 POST /logout、GET /user
- 新增 AuthSupplementDoc.php(Google OAuth 2 端點)
- 新增 PublicApiDoc.php(共用 Schema + 公開課程 4 端點)
- 新增 MemberApiDoc.php(預約、評價、通知共 13 端點)
- 新增 ProviderApiDoc.php(課程、圖片、時段、預約管理共 18 端點)
- 新增 AdminApiDoc.php(統計、會員/教練/課程管理共 16 端點)
- 更新 README.md
- 歸檔 swagger-api-docs-completion change,同步主規格

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 01:17:25 +08:00

22 lines
962 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## ADDED Requirements
### Requirement: Auth 補全端點 Swagger 文件
`app/Docs/AuthSupplementDoc.php` SHALL 補全未文件化的 Auth 相關端點(Google OAuth、change-password)。
#### Scenario: Google OAuth 端點文件化
- **WHEN** 開啟 Swagger UI
- **THEN** 以下端點均有文件:
- `GET /auth/google/redirect`response: redirect_url,說明用途為取得 Google OAuth redirect URL
- `GET /auth/google/callback`response: token + user,說明此為 OAuth callback,通常由瀏覽器自動呼叫)
#### Scenario: change-password 端點文件化(三個 role
- **WHEN** 開啟 Swagger UI
- **THEN** 以下端點均有文件,各自標示對應 role 的 `security: bearerAuth`
- `PUT /member/change-password`request: current_password、password、password_confirmation
- `PUT /provider/change-password`(同上)
- `PUT /admin/change-password`(同上)
- 422 驗證失敗 response 亦有定義