-
Notifications
You must be signed in to change notification settings - Fork 13
CLOUDP-313321: Add a new Spectral lint rule that validates that at any time, an endpoint can only have one API version marked as “upcoming” #697
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
…dpoint can only have one API version marked as 'upcoming'
@@ -0,0 +1,41 @@ | |||
module.exports = function (input) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we have unit tests like we have for ipa rule sets?
https://github.com/mongodb/openapi/tree/main/tools/spectral/ipa/__tests__
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed those, didn't know it was possible! Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry for all the commits, this change broke our linter. Telling the linter in 2 places which files to scan caused issues, I opted to keep the line in the config file so all config is in one place. I verified that removing |
@jeroenvervaeke Before we merge, let's make sure to test this with MMS. |
@wtrocki Do we have a wiki with the process? |
@jeroenvervaeke you can use this wiki to test your changes locally.
extends:
- spectral:oas
- https://github.com/mongodb/openapi/blob/CLOUDP-313321/tools/spectral/.spectral.yaml
spectral lint --ruleset ./scripts/evergreen/openapi/.spectral.yaml /server/openapi/services/openapi-mms.json --verbose |
Proposed changes
Add a new Spectral lint rule that validates that at any time, an endpoint can only have one API version marked as “upcoming”
Jira ticket: CLOUDP-313321