spectral icon indicating copy to clipboard operation
spectral copied to clipboard

feat(rulesets): add rule to check if messageId is defined

Open magicmatatjahu opened this issue 1 year ago • 3 comments

Checklist

  • [X] Tests added / updated
  • [X] Docs added / updated

Does this PR introduce a breaking change?

  • [ ] Yes
  • [X] No

Additional context

  • change severity of asyncapi-operation-operationId rule from error to warning
  • add asyncapi-message-messageId rule, with similar functionality like asyncapi-operation-operationId
  • add unit tests
  • update docs
  • add more formats (needed by new rule)
  • merge traits before checking ids.

cc @jonaslagoni @smoya

magicmatatjahu avatar Sep 16 '22 14:09 magicmatatjahu

I have to update that PR to handle also cases with traits. For messageId and operationId.

magicmatatjahu avatar Sep 19 '22 16:09 magicmatatjahu

Yeah, I'd say it's a breaking change indeed. As such, we could release spectral-rulesets 2.x.x if you're okay with. I don't have any issue with it.

P0lip avatar Sep 26 '22 13:09 P0lip

@smoya @P0lip I'm not a fan to release version 2.0.0 rulesets with such a case. As there will be much bigger changes then we will change error to warning, now I reverted my changes regarding operationId. Please check again, thanks!

magicmatatjahu avatar Sep 27 '22 12:09 magicmatatjahu