Download the PHP package wadakatu/laravel-spectrum without Composer
On this page you can find all versions of the php package wadakatu/laravel-spectrum. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wadakatu/laravel-spectrum
More information about wadakatu/laravel-spectrum
Files in wadakatu/laravel-spectrum
Package laravel-spectrum
Short Description Zero-annotation API documentation generator for Laravel and Lumen
License MIT
Homepage https://github.com/wadakatu/laravel-spectrum
Informations about the package laravel-spectrum
Laravel Spectrum
🎯 Zero-annotation API documentation generator for Laravel & Lumen
Transform your existing Laravel/Lumen APIs into comprehensive OpenAPI documentation without writing a single annotation or modifying your code.
✨ Key Features
### 🚀 **Zero Configuration** Automatically detects and documents your API routes without any annotations or comments ### 📝 **Smart Request Analysis** - Laravel FormRequest automatic parsing - Lumen inline validation support - Type inference from validation rules - Custom messages & attributes | ### 📦 **Flexible Response Handling** - Laravel API Resources analysis - Fractal Transformer support - Automatic includes detection - Multiple format compatibility ### 🛡️ **Complete Error Documentation** - 422 validation errors auto-generation - Authentication errors (401/403) detection - Custom error response mapping |
### 🔐 **Security & Authentication** - Bearer Token auto-detection - API Key authentication support - Sanctum/Passport compatibility - Security scheme generation | ### 🔥 **Developer Experience** - **Real-time preview** with hot-reload - File change auto-detection - WebSocket live updates - Intelligent caching system |
📸 Demo
🔧 Requirements
- PHP 8.1 or higher
- Laravel 10.x, 11.x, or 12.x / Lumen 10.x, 11.x, 12.x
- Composer 2.0 or higher
📦 Installation
That's it! No configuration needed to get started.
🚀 Quick Start
1. Generate Documentation
2. Real-time Preview (Development)
3. View with Swagger UI
📖 Usage Examples
Laravel FormRequest Example
Laravel API Resource Example
Fractal Transformer Example
Lumen Inline Validation Example
Authentication Configuration
⚙️ Configuration
Publish the configuration file for advanced customization:
Configuration Options
🎯 Advanced Features
Custom Type Mappings
Automatic Tag Generation
Laravel Spectrum automatically generates tags for your API endpoints to keep them organized:
- Automatic extraction: Tags are extracted from URL paths (e.g.,
/api/posts/{post}
→Post
) - Multi-level support: Nested resources generate multiple tags (e.g.,
/api/posts/{post}/comments
→['Post', 'Comment']
) - Parameter removal: Route parameters like
{post}
are automatically cleaned up - Controller fallback: When URLs are generic, the controller name is used as a fallback
- Custom mappings: Override automatic tags using configuration
Response Examples
Error Response Customization
🔧 Troubleshooting
Common Issues
Q: Documentation is not generating for some routes
Q: FormRequest validation rules not detected
Q: Fractal includes not appearing
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
📄 License
The MIT License (MIT). Please see License File for more information.
Made with ❤️ by Wadakatu
Star ⭐ this repo if you find it helpful!
All versions of laravel-spectrum with dependencies
illuminate/console Version ^10.0|^11.0|^12.0
illuminate/routing Version ^10.0|^11.0|^12.0
illuminate/support Version ^10.0|^11.0|^12.0
nikic/php-parser Version ^5.5
spatie/fork Version ^1.2
symfony/finder Version ^6.0|^7.0
workerman/workerman Version ^5.1