Skip to content
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

Closed
hideintheclouds opened this issue Jan 16, 2023 · 5 comments · Fixed by #541
Closed

collections missing from the openapi-ruleset in version 0.45.3 #536

hideintheclouds opened this issue Jan 16, 2023 · 5 comments · Fixed by #541

Comments

@hideintheclouds
Copy link

hideintheclouds commented Jan 16, 2023

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');

@dpopp07
Copy link
Member

dpopp07 commented Jan 17, 2023

Great catch - you are correct. We will get that updated shortly

@ibm-devx-sdk
Copy link

🎉 This issue has been resolved in version 0.45.4 🎉

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

Your semantic-release bot 📦🚀

@ibm-devx-sdk
Copy link

🎉 This issue has been resolved in version 0.97.4 🎉

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

Your semantic-release bot 📦🚀

@ibm-devx-sdk
Copy link

🎉 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 📦🚀

@ibm-devx-sdk
Copy link

🎉 This issue has been resolved in version 1.0.0 🎉

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

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants