IBM / openapi-validator

Configurable and extensible validator/linter for OpenAPI documents
Apache License 2.0
493 stars 88 forks source link

feat: display actual ruleset version with --version option #641

Closed dpopp07 closed 11 months ago

dpopp07 commented 11 months ago

Before this commit, the --version option would print the version of the validator tool and the version of the IBM Cloud OpenAPI Ruleset that is run by default if the user doesn't provide their own ruleset.

However, if the user did use their own, locally installed version of our ruleset, the version included in the output of the tool would not actually reflect the version being used. Additionally, users could install new versions of the validator tool but if they didn't update their locally installed instance of the ruleset, they would not get the updated behavior of the rules (which are often the reasons for bumping the version of the tool).

This commit adds logic to print the actually used (whether the default or locally installed) ruleset version and additionally will print a warning if the user has upgraded the version of their tool without upgrading the version of their locally installed ruleset.

This all required a little bit of re-organizing of some of the code.

ibm-devx-sdk commented 11 months ago

:tada: This PR is included in version 1.15.0 :tada:

The release is available on npm package (@latest dist-tag)

Your semantic-release bot :package::rocket:

ibm-devx-sdk commented 8 months ago

:tada: This PR is included in version 1.15.0 :tada:

The release is available on npm package (@latest dist-tag)

Your semantic-release bot :package::rocket:

ibm-devx-sdk commented 7 months ago

:tada: This PR is included in version 1.3.1 :tada:

The release is available on npm package (@latest dist-tag)

Your semantic-release bot :package::rocket: