Redocly / swagger-repo

CLI tool to help you manage your OpenAPI(fka Swagger) repo.
MIT License
18 stars 29 forks source link

Update swagger-repo.js #14

Closed sidesigns closed 5 years ago

sidesigns commented 5 years ago

If you choose not to generate the code samples at creation time you are unable to build, as by default, the build process expects the samples to exist.

An option flag existed in the lib to skip but there was no way to pass the option from the CLI. This change adds the option to skip to the CLI.

Could have been solved with a check to see if the code samples exist in the lib, however this simple change was sufficient to complete my task and did not introduce additional logic.

RomanHotsiy commented 5 years ago

Actually, there is a check if the code samples dir exists: https://github.com/Redocly/swagger-repo/blame/master/lib/index.js#L283

So your change is not required.