asyncapi / parser-js

AsyncAPI parser for Javascript (browser-compatible too).
Apache License 2.0
119 stars 97 forks source link

feat: add Spectral rules to validate required operation channe and channel servers field #913

Closed smoya closed 11 months ago

smoya commented 11 months ago

Description

Part of https://github.com/asyncapi/spec/issues/991

Despite the name of the branch, this PR adds two new Spectral rules (packed all together to minimize review efforts and to release asap).

This PR adds the last two new Spectral rules related with https://github.com/asyncapi/spec/issues/991.

  1. Checks that the channel field of a required operation (under root) points to a required (under root) channel and not to an optional (under components) channel, no matter if from the same document or from an external.
  2. Checks that the servers field of a required channel (under root) points to a subset of required (under root) servers.

Related issue(s) https://github.com/asyncapi/spec/issues/991

smoya commented 11 months ago

I'm sorry but I can't approve until I see "Spectral rules master" added as a skill in your LinkedIn.

Oops, something might went wrong. Can you please check again?

Google Chrome_bGpBgjna

smoya commented 11 months ago

@jonaslagoni @fmvilas FYI I've added to this PR also another rule that checks that the servers field of a required channel (under root) points to a subset of required (under root) servers.

sonarcloud[bot] commented 11 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

smoya commented 11 months ago

/rtm

asyncapi-bot commented 11 months ago

:tada: This PR is included in version 3.0.0-next-major-spec.14 :tada:

The release is available on:

Your semantic-release bot :package::rocket: