Files
headroom/openspec/changes/archive/2026-02-18-p00-api-documentation/tasks.md

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.php with Headroom settings
  • 0.4 Add /api/documentation to CORS allowed paths

Phase 2: Annotate Controllers

AuthController

  • 0.5 Add @group Authentication to class
  • 0.6 Document POST /api/auth/login with @bodyParam, @response
  • 0.7 Document POST /api/auth/refresh with @authenticated, @response
  • 0.8 Document POST /api/auth/logout with @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/documentation in 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

  1. chore(docs): Configure Laravel Scribe for API documentation
  2. docs(api): Add Scribe annotations to AuthController
  3. docs(api): Generate and verify SwaggerUI documentation