wadakatu / laravel-spectrum
Zero-annotation API documentation generator for Laravel and Lumen
Requires
- 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
Requires (Dev)
- fakerphp/faker: ^1.23
- laravel/pint: ^1.23
- orchestra/testbench: ^8.0|^9.0|^10.0
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^10.0|^11.0
- dev-main
- v0.1.0-beta
- v0.0.18-alpha
- v0.0.17-alpha
- v0.0.16-alpha
- v0.0.15-alpha
- v0.0.14-alpha
- v0.0.13-alpha
- v0.0.12-alpha
- v0.0.11-alpha
- v0.0.10-alpha
- v0.0.9-alpha
- v0.0.8-alpha
- v0.0.7-alpha
- v0.0.6-alpha
- v0.0.5-alpha
- v0.0.4-alpha
- v0.0.3-alpha
- v0.0.2-alpha
- v0.0.1-alpha
- dev-chore/remove-release-please
- dev-release-please--branches--main
- dev-update/changelog
- dev-feature/chengelog
- dev-fix/skipped-tests-and-deprecations
- dev-update/agents
- dev-update-banner-1752163014
- dev-fix/route-reload-error-handling
- dev-feat/route-reload-implementation
- dev-fix/route-cache-refresh-issue
This package is auto-updated.
Last update: 2025-07-28 11:01:32 UTC
README
🎯 Zero-annotation API documentation generator for Laravel & Lumen
Laravel Spectrum analyzes your existing code and automatically generates OpenAPI 3.0 documentation. No annotations required, minimal configuration, ready to use immediately.
✨ Why Laravel Spectrum?
Stop writing documentation. Start generating it.
- 🚀 Zero Configuration - Just install and run the command
- 🧠 Smart Detection - Automatically analyzes FormRequests, validation rules, and API Resources
- ⚡ Real-time Updates - Instantly reflects code changes in documentation
- 📤 Export Features - Direct export to Postman and Insomnia
- 🎭 Mock Server - Automatically launches mock API from OpenAPI documentation
- 🎯 Production Ready - High-performance even for large-scale projects
🚀 Quick Start
1. Installation
composer require wadakatu/laravel-spectrum --dev
2. Generate Documentation
php artisan spectrum:generate
3. Live Preview (Development)
php artisan spectrum:watch
# Visit http://localhost:8080 to see your documentation
4. View in Browser
<!-- Add to your Blade template --> <div id="swagger-ui"></div> <script src="https://unpkg.com/swagger-ui-dist/swagger-ui-bundle.js"></script> <script> SwaggerUIBundle({ url: "/storage/app/spectrum/openapi.json", dom_id: '#swagger-ui', }) </script>
5. Launch Mock Server
php artisan spectrum:mock
# Mock API server launches at http://localhost:8081
That's it! Your comprehensive API documentation is ready in seconds.
📚 Documentation
For detailed usage and advanced features, visit our comprehensive documentation site.
The documentation covers:
- 🔧 Getting Started - Installation, configuration, basic usage
- 🎯 Features Guide - Validation detection, response analysis, authentication, mock server
- ⚡ Advanced Usage - Performance optimization, export features, CI/CD integration
- 📖 Reference - CLI commands, configuration options, troubleshooting
- 🤝 More - Comparison with other tools, contribution guide
🤝 Contributing
We welcome bug reports, feature requests, and pull requests! See the Contribution Guide for details.
📄 License
Laravel Spectrum is open-source software licensed under the MIT license. See the LICENSE file for details.
Made with ❤️ by Wadakatu