Skip to content

Commit

Permalink
feat(rulesets): check uniqueness of AsyncAPI messages (#2224)
Browse files Browse the repository at this point in the history
  • Loading branch information
magicmatatjahu committed Aug 24, 2022
1 parent 6e94cfa commit 297531b
Show file tree
Hide file tree
Showing 8 changed files with 960 additions and 9 deletions.
34 changes: 34 additions & 0 deletions docs/reference/asyncapi-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,40 @@ components:

**Recommended:** Yes

### asyncapi-message-messageId-uniqueness

`messageId` must be unique across all the messages (except those one defined in the components).

**Recommended:** Yes

**Bad Example**

```yaml
channels:
smartylighting.streetlights.1.0.action.{streetlightId}.turn.on:
publish:
message:
messageId: turnMessage
smartylighting.streetlights.1.0.action.{streetlightId}.turn.off:
publish:
message:
messageId: turnMessage
```

**Good Example**

```yaml
channels:
smartylighting.streetlights.1.0.action.{streetlightId}.turn.on:
publish:
message:
messageId: turnOnMessage
smartylighting.streetlights.1.0.action.{streetlightId}.turn.off:
publish:
message:
messageId: turnOffMessage
```

### asyncapi-operation-description

Operation objects should have a description.
Expand Down

0 comments on commit 297531b

Please sign in to comment.