-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
collections missing from the openapi-ruleset in version 0.45.3 #536
Comments
Great catch - you are correct. We will get that updated shortly |
🎉 This issue has been resolved in version 0.45.4 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version 0.97.4 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version 0.0.2-rc.1 🎉 The release is available on npm package (@v1-rc dist-tag) Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version 1.0.0 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
According to the documentation, when defining a custom rule (e.g. overwriting the camelcase convention check), one should use a js snippet like the following:
https://github.com/IBM/openapi-validator/blob/main/docs/ibm-cloud-rules.md#replace-a-rule-from-ibm-cloudopenapi-ruleset
Inside the example, there is a const which is loading the collections:
const { schemas } = require('@ibm-cloud/openapi-ruleset/src/collections');
The problem is that starting with v.0.45.3 of openapi-ruleset, this folder was removed.
https://www.npmjs.com/package/@ibm-cloud/openapi-ruleset?activeTab=explore
https://www.npmjs.com/package/@ibm-cloud/openapi-ruleset/v/0.45.2?activeTab=explore
Note: the collections was probably moved here:
https://www.npmjs.com/package/@ibm-cloud/openapi-ruleset-utilities
https://github.com/IBM/openapi-validator/blob/main/packages/utilities/src/collections/index.js
With the current documentation and the example, the validation will fail, thus resorting to the default IBM validation ruleset.
The documentation needs to be updated accordingly.
Example:
https://github.com/IBM/openapi-validator/blob/main/docs/ibm-cloud-rules.md#replace-a-rule-from-ibm-cloudopenapi-ruleset
const { schemas } = require('@ibm-cloud/openapi-ruleset/src/collections');
should become
const { schemas } = require('@ibm-cloud/openapi-ruleset-utilities/src/collections');
The text was updated successfully, but these errors were encountered: