@asyncapi/specs
Version:
AsyncAPI schema versions
314 lines (313 loc) • 9.28 kB
JSON
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.1.0/components.json",
"description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI specification. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.",
"type": "object",
"properties": {
"channelBindings": {
"description": "An object to hold reusable Channel Bindings Objects.",
"type": "object",
"patternProperties": {
"^[\\w\\d\\.\\-_]+$": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.1.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.1.0/channelBindingsObject.json"
}
]
}
}
},
"channels": {
"description": "An object to hold reusable Channel Objects.",
"type": "object",
"patternProperties": {
"^[\\w\\d\\.\\-_]+$": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.1.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.1.0/channel.json"
}
]
}
}
},
"correlationIds": {
"description": "An object to hold reusable Correlation ID Objects.",
"type": "object",
"patternProperties": {
"^[\\w\\d\\.\\-_]+$": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.1.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.1.0/correlationId.json"
}
]
}
}
},
"externalDocs": {
"description": "An object to hold reusable External Documentation Objects.",
"type": "object",
"patternProperties": {
"^[\\w\\d\\.\\-_]+$": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.1.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.1.0/externalDocs.json"
}
]
}
}
},
"messageBindings": {
"description": "An object to hold reusable Message Bindings Objects.",
"type": "object",
"patternProperties": {
"^[\\w\\d\\.\\-_]+$": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.1.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.1.0/messageBindingsObject.json"
}
]
}
}
},
"messageTraits": {
"description": "An object to hold reusable Message Trait Objects.",
"type": "object",
"patternProperties": {
"^[\\w\\d\\.\\-_]+$": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.1.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.1.0/messageTrait.json"
}
]
}
}
},
"messages": {
"description": "An object to hold reusable Message Objects.",
"type": "object",
"patternProperties": {
"^[\\w\\d\\.\\-_]+$": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.1.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.1.0/messageObject.json"
}
]
}
}
},
"operationBindings": {
"description": "An object to hold reusable Operation Bindings Objects.",
"type": "object",
"patternProperties": {
"^[\\w\\d\\.\\-_]+$": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.1.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.1.0/operationBindingsObject.json"
}
]
}
}
},
"operationTraits": {
"description": "An object to hold reusable Operation Trait Objects.",
"type": "object",
"patternProperties": {
"^[\\w\\d\\.\\-_]+$": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.1.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.1.0/operationTrait.json"
}
]
}
}
},
"operations": {
"type": "object",
"patternProperties": {
"^[\\w\\d\\.\\-_]+$": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.1.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.1.0/operation.json"
}
]
}
}
},
"parameters": {
"description": "An object to hold reusable Parameter Objects.",
"type": "object",
"patternProperties": {
"^[\\w\\d\\.\\-_]+$": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.1.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.1.0/parameter.json"
}
]
}
}
},
"replies": {
"description": "An object to hold reusable Operation Reply Objects.",
"type": "object",
"patternProperties": {
"^[\\w\\d\\.\\-_]+$": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.1.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.1.0/operationReply.json"
}
]
}
}
},
"replyAddresses": {
"description": "An object to hold reusable Operation Reply Address Objects.",
"type": "object",
"patternProperties": {
"^[\\w\\d\\.\\-_]+$": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.1.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.1.0/operationReplyAddress.json"
}
]
}
}
},
"schemas": {
"description": "An object to hold reusable Schema Object. If this is a Schema Object, then the schemaFormat will be assumed to be 'application/vnd.aai.asyncapi+json;version=asyncapi' where the version is equal to the AsyncAPI Version String.",
"type": "object",
"patternProperties": {
"^[\\w\\d\\.\\-_]+$": {
"$ref": "http://asyncapi.com/definitions/3.1.0/anySchema.json"
}
}
},
"securitySchemes": {
"description": "An object to hold reusable Security Scheme Objects.",
"type": "object",
"patternProperties": {
"^[\\w\\d\\.\\-_]+$": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.1.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.1.0/SecurityScheme.json"
}
]
}
}
},
"serverBindings": {
"description": "An object to hold reusable Server Bindings Objects.",
"type": "object",
"patternProperties": {
"^[\\w\\d\\.\\-_]+$": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.1.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.1.0/serverBindingsObject.json"
}
]
}
}
},
"serverVariables": {
"description": "An object to hold reusable Server Variable Objects.",
"type": "object",
"patternProperties": {
"^[\\w\\d\\.\\-_]+$": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.1.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.1.0/serverVariable.json"
}
]
}
}
},
"servers": {
"description": "An object to hold reusable Server Objects.",
"type": "object",
"patternProperties": {
"^[\\w\\d\\.\\-_]+$": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.1.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.1.0/server.json"
}
]
}
}
},
"tags": {
"description": "An object to hold reusable Tag Objects.",
"type": "object",
"patternProperties": {
"^[\\w\\d\\.\\-_]+$": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.1.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.1.0/tag.json"
}
]
}
}
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.1.0/specificationExtension.json"
}
},
"additionalProperties": false,
"example": {
"$ref": "http://asyncapi.com/examples/3.1.0/components.json"
}
}