Problem
After deployment, OpenAPI docs are not automatically refreshed.
We currently have to run the following command manually to regenerate/publish Swagger docs:
docker compose -f "$COMPOSE_FILE" exec -T app sh -lc 'cd /var/www/html && L5_SWAGGER_USE_REFLECTION_ANALYSER=true php artisan l5-swagger:generate && cp storage/api-docs/api-docs.json public/api-docs.json'
Proposed change
Update the deployment script/pipeline to run the command above automatically after each deployment.
Problem
After deployment, OpenAPI docs are not automatically refreshed.
We currently have to run the following command manually to regenerate/publish Swagger docs:
docker compose -f "$COMPOSE_FILE" exec -T app sh -lc 'cd /var/www/html && L5_SWAGGER_USE_REFLECTION_ANALYSER=true php artisan l5-swagger:generate && cp storage/api-docs/api-docs.json public/api-docs.json'Proposed change
Update the deployment script/pipeline to run the command above automatically after each deployment.