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

fix(ibm-major-version-in-path): skip path checks if there are no paths #727

Merged
merged 2 commits into from
Feb 7, 2025

Conversation

dpopp07
Copy link
Member

@dpopp07 dpopp07 commented Feb 7, 2025

This rule checks both the servers entries and the path strings in an API
definition. If an API definition contains no path strings in the paths
object, this rule would return a false positive. This adds logic to skip
the path string checks if there are none to check.

I also renamed a file to better match the rule name.

@dpopp07 dpopp07 requested a review from padamstx February 7, 2025 19:05
Copy link
Member

@padamstx padamstx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

This rule checks both the `servers` entries and the path strings in an API
definition. If an API definition contains no path strings in the `paths`
object, this rule would return a false positive. This adds logic to skip
the path string checks if there are none to check.

Signed-off-by: Dustin Popp <dpopp07@gmail.com>
Signed-off-by: Dustin Popp <dpopp07@gmail.com>
@dpopp07 dpopp07 force-pushed the dp/tolerate-lack-of-paths branch from 0d061dd to 34188fb Compare February 7, 2025 20:01
@dpopp07 dpopp07 merged commit c539741 into main Feb 7, 2025
7 checks passed
@dpopp07 dpopp07 deleted the dp/tolerate-lack-of-paths branch February 7, 2025 20:09
ibm-devx-sdk pushed a commit that referenced this pull request Feb 7, 2025
## @ibm-cloud/openapi-ruleset [1.29.1](/~https://github.com/IBM/openapi-validator/compare/@ibm-cloud/openapi-ruleset@1.29.0...@ibm-cloud/openapi-ruleset@1.29.1) (2025-02-07)

### Bug Fixes

* **ibm-major-version-in-path:** skip path checks if there are no paths ([#727](#727)) ([c539741](c539741))
@ibm-devx-sdk
Copy link

🎉 This PR is included in version 1.29.1 🎉

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

Your semantic-release bot 📦🚀

@ibm-devx-sdk
Copy link

🎉 This PR is included in version 1.33.1 🎉

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

Your semantic-release bot 📦🚀

@ibm-devx-sdk
Copy link

🎉 This PR is included in version 1.7.1 🎉

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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants