Skip to content
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): add message traits array path to asyncapi headers schema type object rule #2402

Closed
wants to merge 14 commits into from
Closed

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

wants to merge 14 commits into from

Conversation

CalemRoelofsSB
Copy link
Contributor

@CalemRoelofsSB CalemRoelofsSB commented Feb 16, 2023

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] <[email protected]>
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.

8 participants