laravel-spectrum maintained by wadakatu
Description
Zero-annotation OpenAPI/Swagger documentation generator for Laravel - automatic API docs from your existing code
Author
Last update
2026/04/15 21:59
(dev-dependabot/npm_and_yarn/docs/follow-redirects-1.16.0)
License
Downloads
63
Tags
Last update
2026/04/15 21:59
License
Require
- php ^8.2
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2026/04/10 06:10
License
Require
- php ^8.2
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2026/04/07 15:06
License
Require
- php ^8.2
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2026/03/30 18:04
License
Require
- php ^8.2
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2026/03/29 05:19
License
Require
- php ^8.2
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2026/03/05 02:19
License
Require
- php ^8.2
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2026/02/22 19:15
License
Require
- php ^8.2
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2026/02/18 15:52
License
Require
- nikic/php-parser ^5.5
- symfony/finder ^6.0|^7.0
- spatie/fork ^1.2
- workerman/workerman ^5.1
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- php ^8.2
Last update
2026/02/16 11:52
License
Require
- php ^8.2
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2026/02/16 11:23
License
Require
- php ^8.2
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2026/02/16 10:20
License
Require
- php ^8.2
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2026/02/16 04:47
License
Require
- php ^8.2
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2026/01/04 15:23
License
Require
- php ^8.2
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2026/01/04 14:05
License
Require
- php ^8.2
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2026/01/04 04:07
License
Require
- php ^8.2
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2026/01/04 03:49
License
Require
- php ^8.2
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2025/12/30 14:53
License
Require
- php ^8.2
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2025/12/30 14:14
License
Require
- php ^8.2
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2025/12/30 12:42
License
Require
- php ^8.2
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2025/12/29 16:25
License
Require
- php ^8.2
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2025/12/28 08:35
License
Require
- php ^8.2
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2025/12/25 04:56
License
Require
- php ^8.2
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2025/12/25 04:01
License
Require
- php ^8.2
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2025/12/25 03:47
License
Require
- php ^8.2
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2025/12/25 03:23
License
Require
- php ^8.2
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2025/12/24 04:38
License
Require
- php ^8.2
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2025/08/11 10:07
License
Require
- php ^8.2
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2025/08/07 10:46
License
Require
- php ^8.1
- illuminate/console ^11.0|^12.0
- illuminate/routing ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2025/08/07 04:56
License
Require
- php ^8.1
- illuminate/console ^10.0|^11.0|^12.0
- illuminate/routing ^10.0|^11.0|^12.0
- illuminate/support ^10.0|^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2025/07/30 11:31
License
Require
- php ^8.1
- illuminate/console ^10.0|^11.0|^12.0
- illuminate/routing ^10.0|^11.0|^12.0
- illuminate/support ^10.0|^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2025/07/28 12:43
License
Require
- php ^8.1
- illuminate/console ^10.0|^11.0|^12.0
- illuminate/routing ^10.0|^11.0|^12.0
- illuminate/support ^10.0|^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2025/07/28 12:42
License
Require
- php ^8.1
- illuminate/console ^10.0|^11.0|^12.0
- illuminate/routing ^10.0|^11.0|^12.0
- illuminate/support ^10.0|^11.0|^12.0
- nikic/php-parser ^5.5
- spatie/fork ^1.2
- symfony/finder ^6.0|^7.0
- workerman/workerman ^5.1
Last update
2025/07/23 20:26
License
Require
- php ^8.1
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/routing ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- nikic/php-parser ^5.5
- symfony/finder ^6.0|^7.0
- workerman/workerman ^4.1|^5.0
Last update
2025/07/12 11:29
License
Require
- php ^8.1
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/routing ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- nikic/php-parser ^5.5
- symfony/finder ^6.0|^7.0
- workerman/workerman ^4.1|^5.0
Last update
2025/07/11 20:21
License
Require
- php ^8.1
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/routing ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- nikic/php-parser ^5.5
- symfony/finder ^6.0|^7.0
- workerman/workerman ^4.1|^5.0
Last update
2025/07/11 19:48
License
Require
- php ^8.1
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/routing ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- nikic/php-parser ^5.5
- symfony/finder ^6.0|^7.0
- workerman/workerman ^4.1|^5.0
Last update
2025/07/10 21:53
License
Require
- php ^8.1
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/routing ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- nikic/php-parser ^5.5
- symfony/finder ^6.0|^7.0
- workerman/workerman ^4.1|^5.0
Last update
2025/07/10 17:56
License
Require
- php ^8.1
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/routing ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- nikic/php-parser ^5.5
- symfony/finder ^6.0|^7.0
- workerman/workerman ^4.1|^5.0
Last update
2025/07/10 17:56
License
Require
- php ^8.1
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/routing ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- nikic/php-parser ^5.5
- symfony/finder ^6.0|^7.0
- workerman/workerman ^4.1|^5.0
Last update
2025/07/10 17:41
License
Require
- php ^8.1
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/routing ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- nikic/php-parser ^5.5
- symfony/finder ^6.0|^7.0
- workerman/workerman ^4.1|^5.0
Last update
2025/07/10 17:21
License
Require
- php ^8.1
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/routing ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- nikic/php-parser ^5.5
- symfony/finder ^6.0|^7.0
- workerman/workerman ^4.1|^5.0
Last update
2025/07/10 17:18
License
Require
- php ^8.1
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/routing ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- nikic/php-parser ^5.5
- symfony/finder ^6.0|^7.0
- workerman/workerman ^4.1|^5.0
Last update
2025/07/10 16:40
License
Require
- php ^8.1
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/routing ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- nikic/php-parser ^5.5
- symfony/finder ^6.0|^7.0
- workerman/workerman ^4.1|^5.0
Last update
2025/07/10 16:36
License
Require
- php ^8.1
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/routing ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- nikic/php-parser ^5.5
- symfony/finder ^6.0|^7.0
- workerman/workerman ^4.1|^5.0
Last update
2025/07/09 10:23
License
Require
- php ^8.1
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/routing ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- nikic/php-parser ^5.5
- symfony/finder ^6.0|^7.0
- workerman/workerman ^4.1|^5.0
Last update
2025/07/09 03:00
License
Require
- php ^8.1
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/routing ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- nikic/php-parser ^5.5
- symfony/finder ^6.0|^7.0
- workerman/workerman ^4.1|^5.0
Last update
2025/07/09 01:31
License
Require
- php ^8.1
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/routing ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- nikic/php-parser ^5.5
- symfony/finder ^6.0|^7.0
- workerman/workerman ^4.1|^5.0
Last update
2025/07/09 01:16
License
Require
- php ^8.1
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/routing ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- nikic/php-parser ^5.5
- symfony/finder ^6.0|^7.0
- workerman/workerman ^4.1|^5.0
Last update
2025/07/08 14:22
License
Require
- php ^8.1
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/routing ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- nikic/php-parser ^5.5
- symfony/finder ^6.0|^7.0
- workerman/workerman ^4.1|^5.0
Last update
2025/07/08 12:03
License
Require
- php ^8.1
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/routing ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- nikic/php-parser ^5.5
- symfony/finder ^6.0|^7.0
- workerman/workerman ^4.1|^5.0
Last update
2025/07/08 11:05
License
Require
- php ^8.1
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/routing ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- nikic/php-parser ^5.5
- symfony/finder ^6.0|^7.0
- workerman/workerman ^4.1|^5.0
Last update
2025/07/08 09:48
License
Require
- php ^8.1
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/routing ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- nikic/php-parser ^5.5
- symfony/finder ^6.0|^7.0
- workerman/workerman ^4.1|^5.0
Last update
2025/07/08 08:45
License
Require
- php ^8.1
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/routing ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- nikic/php-parser ^5.5
- symfony/finder ^6.0|^7.0
- workerman/workerman ^4.1|^5.0
Last update
2025/07/07 15:52
License
Require
- php ^8.1
- illuminate/support ^10.0|^11.0|^12.0
- illuminate/routing ^10.0|^11.0|^12.0
- illuminate/console ^10.0|^11.0|^12.0
- nikic/php-parser ^5.5
- symfony/finder ^6.0|^7.0
- workerman/workerman ^4.1|^5.0
Laravel Spectrum
The Problem
// ❌ Traditional approach: Annotations everywhere
/**
* @OA\Post(
* path="/api/users",
* @OA\RequestBody(
* @OA\JsonContent(
* @OA\Property(property="name", type="string"),
* @OA\Property(property="email", type="string", format="email"),
* // ... 50 more lines of annotations
* )
* ),
* @OA\Response(response="200", description="Success")
* )
*/
public function store(StoreUserRequest $request) { ... }
With Laravel Spectrum: Zero annotations needed. Your existing FormRequest and Resource classes are your documentation.
Quick Start (30 seconds)
# Install
composer require wadakatu/laravel-spectrum --dev
# Generate OpenAPI documentation
php artisan spectrum:generate
# View in browser (HTML, default: Swagger UI)
php artisan spectrum:generate --format=html
# Or choose a viewer
php artisan spectrum:generate --format=html --viewer=elements
# Open: storage/app/spectrum/openapi.html
That's it. Full OpenAPI 3.1 documentation generated from your existing code.
What Gets Analyzed Automatically
| Your Code | Generated Documentation |
|---|---|
FormRequest::rules() |
Request body schemas with validation |
$request->validate([...]) |
Inline validation rules |
API Resources |
Response schemas |
Auth middleware (auth:sanctum) |
Security schemes |
Route parameters ({user}) |
Path parameters with types |
@deprecated PHPDoc |
Deprecated operation flags |
Key Features
Real-time Documentation
php artisan spectrum:watch
# Browser auto-refreshes when you change code
Built-in Mock Server
php artisan spectrum:mock
# Frontend team can develop without waiting for backend
Export to API Clients
php artisan spectrum:export:postman # Postman collection
php artisan spectrum:export:insomnia # Insomnia workspace
php artisan spectrum:sdk typescript # Type-safe SDK client
Validate OpenAPI Spec
php artisan spectrum:validate storage/app/spectrum/openapi.json
php artisan spectrum:validate --generate --strict
Detect API Breaking Changes
php artisan spectrum:diff docs/openapi-v1.json docs/openapi-v2.json
php artisan spectrum:diff --against=last --format=json
php artisan spectrum:version-compare docs/openapi-v1.json docs/openapi-v2.json --migration-guide
High Performance
- Parallel processing for large codebases
- Incremental generation (only changed files)
- Smart caching
Why Laravel Spectrum?
| Laravel Spectrum | Swagger-PHP | Scribe | |
|---|---|---|---|
| Zero annotations | ✅ | ❌ | Partial |
| Setup time | 30 sec | Hours | ~30 min |
| FormRequest detection | ✅ | ❌ | ✅ |
| Mock server | ✅ | ❌ | ❌ |
| Live reload | ✅ | ❌ | ❌ |
| Postman/Insomnia export | ✅ | ❌ | ✅ |
| OpenAPI 3.1 | ✅ | ✅ | ❌ |
Requirements
- PHP 8.2+
- Laravel 11.x or 12.x
Compliance Check (Demo App Matrix)
Use the bundled demo apps to verify OpenAPI 3.0/3.1 compliance in one run:
./demo-app/check-openapi-compliance.sh
Details: demo-app/README.md
Documentation
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for details.
For mutation testing, run composer infection (full run with CI-aligned MSI thresholds).
License
Laravel Spectrum is open-source software licensed under the MIT license.