Open vidhill opened 11 months ago
Feature request #370
When using the swagger-jsdoc cli in an npm script
swagger-jsdoc
If the scan fails the process currently exits with an exit code 0 which indicates success
0
When running on CICD for example, I would like the job to fail so the process would need to exit with non-zero code
This PR adds a cli flag (--bail), when the flag is set exit with non-zero code if scanning fails
--bail
e.g.
npx swagger-jsdoc -d definition.js -o api-docs.json index.js --bail
If the scan fails, the script exits with code 1 otherwise it exits with 0 as normal
1
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Feature request #370
When using the
swagger-jsdoc
cli in an npm scriptIf the scan fails the process currently exits with an exit code
0
which indicates successWhen running on CICD for example,
I would like the job to fail so the process would need to exit with non-zero code
This PR adds a cli flag (
--bail
), when the flag is set exit with non-zero code if scanning failse.g.
If the scan fails, the script exits with code
1
otherwise it exits with0
as normal