1.2 KiB
1.2 KiB
Tasks: API Documentation with Scribe
Phase 1: Configure Scribe
- 0.1 Install Scribe (if not already installed):
composer require knuckleswtf/scribe - 0.2 Publish Scribe config:
php artisan vendor:publish --tag=scribe-config - 0.3 Configure
config/scribe.phpwith Headroom settings - 0.4 Add
/api/documentationto CORS allowed paths
Phase 2: Annotate Controllers
AuthController
- 0.5 Add
@group Authenticationto class - 0.6 Document
POST /api/auth/loginwith @bodyParam, @response - 0.7 Document
POST /api/auth/refreshwith @authenticated, @response - 0.8 Document
POST /api/auth/logoutwith @authenticated, @response - 0.9 Add authentication section to Scribe config
Phase 3: Generate & Verify
- 0.54 Run
php artisan scribe:generate - 0.55 Verify no errors in generation
- 0.56 Access
/api/documentationin browser - 0.57 Verify all endpoints appear in documentation
- 0.58 Test "Try it out" for login endpoint
- 0.59 Verify authentication flow is documented
Commits
chore(docs): Configure Laravel Scribe for API documentationdocs(api): Add Scribe annotations to AuthControllerdocs(api): Generate and verify SwaggerUI documentation