@asyncapi/specs
Version:
AsyncAPI schema versions
96 lines (95 loc) • 2.76 kB
JSON
{
"type": "object",
"description": "Describes a trait that MAY be applied to a Message Object. This object MAY contain any property from the Message Object, except payload and traits.",
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
"properties": {
"contentType": {
"type": "string",
"description": "The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field."
},
"headers": {
"$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json"
},
"correlationId": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/correlationId.json"
}
]
},
"tags": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/tag.json"
}
]
},
"uniqueItems": true
},
"summary": {
"type": "string",
"description": "A brief summary of the message."
},
"name": {
"type": "string",
"description": "Name of the message."
},
"title": {
"type": "string",
"description": "A human-friendly title for the message."
},
"description": {
"type": "string",
"description": "A longer description of the message. CommonMark is allowed."
},
"externalDocs": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json"
}
]
},
"deprecated": {
"type": "boolean",
"default": false
},
"examples": {
"type": "array",
"description": "List of examples.",
"items": {
"$ref": "http://asyncapi.com/definitions/3.0.0/messageExampleObject.json"
}
},
"bindings": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json"
}
]
}
},
"example": {
"$ref": "http://asyncapi.com/examples/3.0.0/messageTrait.json"
},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/messageTrait.json"
}