Skip to content

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

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

feat(rulesets): add message traits array path to asyncapi headers schema type object rule#2402
CalemRoelofsSB wants to merge 14 commits into
stoplightio:developfrom
CalemRoelofsSB:feat/rulesets/add-path-to-asyncapi-headers-schema-type-object

Conversation

@CalemRoelofsSB

@CalemRoelofsSB 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 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 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
CalemRoelofsSB and others added 14 commits April 21, 2023 11:52
# [@stoplight/spectral-ruleset-migrator-v1.9.2](https://github.com/stoplightio/spectral/compare/@stoplight/spectral-ruleset-migrator-v1.9.1...@stoplight/spectral-ruleset-migrator-v1.9.2) (2023-02-22)

### Bug Fixes

* **ruleset-migrator:** use module for require.resolve ([#2405](#2405)) ([d7c0fa4](d7c0fa4))
# [@stoplight/spectral-ruleset-bundler-v1.5.1](https://github.com/stoplightio/spectral/compare/@stoplight/spectral-ruleset-bundler-v1.5.0...@stoplight/spectral-ruleset-bundler-v1.5.1) (2023-02-22)

### Bug Fixes

* **ruleset-bundler:** defaults should be last one ([#2403](#2403)) ([8780cfa](8780cfa))
# [@stoplight/spectral-core-v1.17.0](https://github.com/stoplightio/spectral/compare/@stoplight/spectral-core-v1.16.1...@stoplight/spectral-core-v1.17.0) (2023-03-23)

### Features

* **core:** support x- extensions in the ruleset ([#2440](#2440)) ([964151e](964151e))
Bumps [vm2](https://github.com/patriksimek/vm2) from 3.9.11 to 3.9.17.
- [Release notes](https://github.com/patriksimek/vm2/releases)
- [Changelog](https://github.com/patriksimek/vm2/blob/master/CHANGELOG.md)
- [Commits](patriksimek/vm2@3.9.11...3.9.17)

---
updated-dependencies:
- dependency-name: vm2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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