asyncapi-3-headers-schema-type-object
asyncapi-3-headers-schema-type-object checks that message and message-trait headers are modeled as objects.
Why did this violation appear?
A headers schema is missing type: object or declares another type.
Bad example
asyncapi: 3.1.0
components:
messages:
UserCreated:
headers:
type: string
Good example
asyncapi: 3.1.0
components:
messages:
UserCreated:
headers:
type: object
properties:
traceId:
type: string
How do I fix this violation?
Model headers as an object with named properties for each header.
