# CloudEvents ruleset (AsyncAPI)

Source: https://apigenie.pl/docs/linter/asyncapi/rulesets/cloudevents
See also: [AsyncAPI linter rules](https://apigenie.pl/docs/linter/asyncapi.md), [Recommended ruleset](https://apigenie.pl/docs/linter/asyncapi/rulesets/recommended.md), [Strict ruleset](https://apigenie.pl/docs/linter/asyncapi/rulesets/strict.md), [All ruleset](https://apigenie.pl/docs/linter/asyncapi/rulesets/all.md).

The rules of messages that are [CloudEvents](https://cloudevents.io): add the ruleset to another
one (`extends: [recommended, cloudevents]`). A message is a CloudEvent in structured mode when its
content type (its own, its traits', or `defaultContentType`) is `application/cloudevents+json`, and
in binary mode when a header carries a context attribute with the prefix of a protocol binding
(`ce_specversion`, `ce-id`, `cloudEvents:type`).

## Rules

| Name | Severity |
| ---- | -------- |
| [cloudevents/attribute-schemas](/docs/linter/asyncapi/rules/cloudevents-attribute-schemas) | warning |
| [cloudevents/binding-headers](/docs/linter/asyncapi/rules/cloudevents-binding-headers) | error |
| [cloudevents/required-attributes](/docs/linter/asyncapi/rules/cloudevents-required-attributes) | error |
