Skip to content

feat(rulesets): add message traits array path to asyncapi headers schema type object rule - #2402

Closed
Calem Roelofs (CalemRoelofsSB) wants to merge 14 commits into
stoplightio:developfrom
CalemRoelofsSB:feat/rulesets/add-path-to-asyncapi-headers-schema-type-object
Closed

Calem Roelofs (CalemRoelofsSB) wants to merge 14 commits into
stoplightio:developfrom
CalemRoelofsSB:feat/rulesets/add-path-to-asyncapi-headers-schema-type-object

Conversation

@CalemRoelofsSB

@CalemRoelofsSB Calem Roelofs (CalemRoelofsSB) commented Feb 16, 2023 •

Copy link
Copy Markdown
Contributor

Checklist

  • Tests added / updated
  • Docs added / updated

Does this PR introduce a breaking change?

  • Yes
  • No

Additional context

Currently, the asyncapi-headers-schema-type-object will not trigger when the headers object is defined explicitly in the message.traits array.
For example:

...
channels:
  'users/{userId}/loggedIn':
    publish:
      message:
        traits:
          - headers
              type: integer

The new path added in this PR will match on that array and perform the assertion on the type field of any object in that array that has a top level key of headers.

@CalemRoelofsSB Calem Roelofs (CalemRoelofsSB) changed the title feat(rulesets): Add message traits array path to asyncapi-headers-schema-type-object rule feat(rulesets): Add message traits array path to asyncapi headers schema type object rule Feb 16, 2023
MateuszPol
MateuszPol previously approved these changes Feb 21, 2023
@CalemRoelofsSB Calem Roelofs (CalemRoelofsSB) changed the title feat(rulesets): Add message traits array path to asyncapi headers schema type object rule feat(rulesets): add message traits array path to asyncapi headers schema type object rule Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants