IBM/openapi-validator

collections missing from the openapi-ruleset in version 0.45.3

Closed this issue ยท 5 comments

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

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 ๐Ÿ“ฆ๐Ÿš€