-
-
Notifications
You must be signed in to change notification settings - Fork 239
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
feat(rulesets): validate channel servers, server securities and operation securities #2122
feat(rulesets): validate channel servers, server securities and operation securities #2122
Conversation
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 👍 Only had one comment.
b2fa1a4
to
aead22f
Compare
b57929e
to
906b987
Compare
@jonaslagoni Could you check that PR? 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 👍
function asyncApi2ChannelServers(targetVal, _) { | ||
const results: IFunctionResult[] = []; | ||
if (!targetVal.channels) return results; | ||
const serverNames = Object.keys(targetVal.servers ?? {}); |
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.
What if there are no servers declared but the channels declares a value under servers
channel field?
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.
@P0lip Hello! @jonaslagoni just accepted that PR. I guess we need your accept, because I changed also docs. 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.
🚀
# [@stoplight/spectral-rulesets-v1.11.0](https://github.com/stoplightio/spectral/compare/@stoplight/spectral-rulesets-v1.10.0...@stoplight/spectral-rulesets-v1.11.0) (2022-06-30) ### Features * **rulesets:** validate channel servers, server securities and operation securities ([#2122](#2122)) ([9accd31](9accd31))
🎉 This PR is included in version @stoplight/spectral-rulesets-v1.11.0 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
Fixes #2124
Fixes #2123
Fixes #2162
Checklist
Does this PR introduce a breaking change?
Additional context
Part of #2100
This PR adds three rules:
servers
exist (we compare names inservers
with those defined inchannels.*.servers
).servers.*.security
exist incomponents.securitySchemes
.channels.*.[publish,subscribe].security
exist incomponents.securitySchemes
.