This package will add console command to lumen/laravel which will parse yml file, convert it into json and save to public path. Redoc UI is connected and Swagger UI are connected and can be accessed to view generated documentation. Also package adds route for raw json documentation output, so this package can be used in microservice architecture, where all your microservices expose list of available routes.
- Adds console command
php artisan opendox:transform
to transform OpenApi 3.0 specification yaml files to json, so it can be accessible for external services - Adds
/api/documentation
route where you can access Redoc UI interface of documentation - Adds
/api/console
route where you can access Swagger UI interface for API docs and interaction - Adds
/docs
route where RAW json can be accessed
- Install as composer package
$ composer require noitran/opendox
- Laravel uses provider auto discovery. Config file can be published using command
$ php artisan vendor:publish --provider="Noitran\Opendox\ServiceProvider"
- Open your bootstrap/app.php and register as service provider
$app->register(Noitran\Opendox\ServiceProvider::class);
- Config file should be loaded manually in bootstrap/app.php
$app->configure('opendox');
- In your application project
/src
folder createapi-docs.yml
file. Write your documentation using OpenAPI standard