General Questions
Does this package modify my application routes?
Does this package modify my application routes?
- Modify route definitions
- Change route behavior
- Add or remove routes
- Affect route performance
Can I disable the HTTP documentation endpoints?
Can I disable the HTTP documentation endpoints?
config/openapi.php:https://your-app.test/api-docs/openapi.jsonCan I customize the output structure?
Can I customize the output structure?
config/openapi-docs.php:resources/openapi/templates/:resources/openapi/templates/openapi.json- OpenAPI spec templateresources/openapi/templates/postman.json- Postman collection templateresources/openapi/templates/insomnia.json- Insomnia workspace template
config/openapi.php:Does it support multiple API types?
Does it support multiple API types?
config/openapi.php):Performance & Caching
How do I improve generation performance?
How do I improve generation performance?
When should I clear the cache?
When should I clear the cache?
- Adding new routes
- Modifying route definitions (paths, methods, middleware)
- Updating FormRequest validation rules
- Changing controller docblocks
- Modifying configuration (
config/openapi.php) - After deployments
Does generation impact application performance?
Does generation impact application performance?
- Using cached specifications
- Generating via CLI and serving static files
- Generating in background jobs
- Generating on-demand via HTTP without caching
- Processing 100+ routes with complex FormRequests
- Using deep route introspection
-
Generate during deployment:
-
Serve static files:
-
Enable aggressive caching:
- Use CDN for documentation files: Host generated JSON/YAML files on a CDN instead of serving from your application.
Compatibility
Which Laravel versions are supported?
Which Laravel versions are supported?
- Laravel 10.x ✅
- Laravel 11.x ✅
- PHP 8.1+
- Composer 2.0+
composer.json of the package for exact version constraints:Does it work with API Resources?
Does it work with API Resources?
- Detect the resource class
- Extract the resource structure from
toArray() - Generate schema definitions
Can I use it with Sanctum/Passport authentication?
Can I use it with Sanctum/Passport authentication?
Does it support OpenAPI 3.1?
Does it support OpenAPI 3.1?
- Underlying spec library updates
- Community demand
- JSON Schema 2020-12 compatibility
- Webhooks support
- Improved
$refhandling
Multi-Environment & Deployment
How do I handle multiple environments (dev, staging, production)?
How do I handle multiple environments (dev, staging, production)?
config/openapi.php:postman-env-local.jsonpostman-env-staging.jsonpostman-env-production.json
Should I commit generated files to version control?
Should I commit generated files to version control?
- You want versioned API documentation
- Your CI/CD doesn’t run PHP/Composer
- You distribute specs to external teams
- You use Git-based documentation hosting (GitHub Pages, etc.)
- You generate during deployment
- Files are large and change frequently
- You prefer build-time generation
.gitignore:How do I handle multi-tenant applications?
How do I handle multi-tenant applications?
- API endpoints
- Server URLs
- API titles/descriptions
Integration & Export
Can I import the generated spec into Postman/Insomnia?
Can I import the generated spec into Postman/Insomnia?
postman-api.json- Postman collectionpostman-env-local.json- Environment variablespostman-env-production.jsoninsomnia-api.json- Insomnia workspace (with environments included)
- Open Postman
- File → Import
- Upload
postman-api.json - Import each environment file (
postman-env-*.json) - Select environment from dropdown
- Open Insomnia
- Application → Import/Export → Import Data
- From File → Select
insomnia-api.json - Environments are automatically included
Can I use this with Swagger UI?
Can I use this with Swagger UI?
/swagger/openapi.json.Option 3: Use a Laravel package:Install a Swagger UI package like l5-swagger or swagger-ui-php that can consume the generated spec.Can I customize request/response examples?
Can I customize request/response examples?
config/openapi-docs.php):