Skip to content
Merged
88 changes: 88 additions & 0 deletions bindings/ros2/0.1.0/operation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/bindings/ros2/0.1.0/operation.json",
"description": "This object contains information about the operation representation in ROS 2.",
"examples": [
{
"node": "/turtlesim",
"qosPolicies": {
"deadline": "-1",
"durability": "volatile",
"history": "unknown",
"leaseDuration": "-1",
"lifespan": "-1",
"liveliness": "automatic",
"reliability": "reliable"
},
"role": "subscriber"
}
],
"type": "object",
"required": [ "role", "node" ],
"properties": {
"bindingVersion": {
"description": "The version of this binding. If omitted, 'latest' MUST be assumed.",
"type": "string",
"enum": [ "0.1.0" ]
},
"node": {
"description": "The name of the ROS 2 node that implements this operation.",
"type": "string"
},
"qosPolicies": {
"type": "object",
"properties": {
"deadline": {
"description": "The expected maximum amount of time between subsequent messages being published to a topic. -1 means infinite.",
"type": "integer"
},
"durability": {
"description": "Persistence specification that determines message availability for late-joining subscribers",
"type": "string",
"enum": [ "transient_local", "volatile" ]
},
"history": {
"description": "Policy parameter that defines the maximum number of samples maintained in the middleware queue",
"type": "string",
"enum": [ "keep_last", "keep_all", "unknown" ]
},
"leaseDuration": {
"description": "The maximum period of time a publisher has to indicate that it is alive before the system considers it to have lost liveliness. -1 means infinite.",
"type": "integer"
},
"lifespan": {
"description": "The maximum amount of time between the publishing and the reception of a message without the message being considered stale or expired. -1 means infinite.",
"type": "integer"
},
"liveliness": {
"description": "Defines the mechanism by which the system monitors and determines the operational status of communication entities within the network.",
"type": "string",
"enum": [ "automatic", "manual" ]
},
"reliability": {
"description": "Specifies the communication guarantee model that determines whether message delivery confirmation between publisher and subscriber is required.",
"type": "string",
"enum": [ "best_effort", "realiable" ]
}
}
},
"role": {
"description": "Specifies the ROS 2 type of the node for this operation.",
"type": "string",
"enum": [
"publisher",
"action_client",
"service_client",
"subscriber",
"action_server",
"service_server"
]
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
"additionalProperties": false
}
35 changes: 35 additions & 0 deletions bindings/ros2/0.1.0/server.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/bindings/ros2/0.1.0/server.json",
"description": "This object contains information about the server representation in ROS 2.",
"examples": [
{
"domainId": "0",
"rmwImplementation": "rmw_fastrtps_cpp"
}
],
"type": "object",
"required": [ "host", "protocol" ],
"properties": {
"bindingVersion": {
"description": "The version of this binding. If omitted, 'latest' MUST be assumed.",
"type": "string",
"enum": [ "0.1.0" ]
},
"domainId": {
"description": "All ROS 2 nodes use domain ID 0 by default. To prevent interference between different groups of computers running ROS 2 on the same network, a group can be set with a unique domain ID.",
"type": "integer",
"maximum": 231,
"minimum": 0
},
"rmwImplementation": {
"description": "Specifies the ROS 2 middleware implementation to be used. This determines the underlying middleware implementation that handles communication.",
"type": "string"
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
}
}
35 changes: 35 additions & 0 deletions definitions/3.0.0/operationBindingsObject.json
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,41 @@
},
"stomp": {},
"redis": {},
"ros2": {
"properties": {
"bindingVersion": {
"enum": ["0.1.0"]
}
},
"allOf": [
{
"description": "If no bindingVersion specified, use the latest binding",
"if": {
"not": {
"required": [
"bindingVersion"
]
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/ros2/0.1.0/operation.json"
}
},
{
"if": {
"required": [ "bindingVersion" ],
"properties": {
"bindingVersion": {
"const": "0.1.0"
}
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/ros2/0.1.0/operation.json"
}
}
]
},
"ibmmq": {},
"solace": {
"properties": {
Expand Down
37 changes: 36 additions & 1 deletion definitions/3.0.0/serverBindingsObject.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,41 @@
"sqs": {},
"stomp": {},
"redis": {},
"ros2": {
"properties": {
"bindingVersion": {
"enum": ["0.1.0"]
}
},
"allOf": [
{
"description": "If no bindingVersion specified, use the latest binding",
"if": {
"not": {
"required": [
"bindingVersion"
]
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/ros2/0.1.0/server.json"
}
},
{
"if": {
"required": [ "bindingVersion" ],
"properties": {
"bindingVersion": {
"const": "0.1.0"
}
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/ros2/0.1.0/server.json"
}
}
]
},
"ibmmq": {
"properties": {
"bindingVersion": {
Expand Down Expand Up @@ -284,4 +319,4 @@
},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json"
}
}
3 changes: 3 additions & 0 deletions test/ajv-schemes.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ function bindingSchemes(ajv) {
ajv.addSchema(require('@bindings/pulsar/0.1.0/channel.json'));
ajv.addSchema(require('@bindings/pulsar/0.1.0/server.json'));

ajv.addSchema(require('@bindings/ros2/0.1.0/operation.json'));
ajv.addSchema(require('@bindings/ros2/0.1.0/server.json'));

ajv.addSchema(require('@bindings/sns/0.1.0/channel.json'));
ajv.addSchema(require('@bindings/sns/0.1.0/operation.json'));

Expand Down
Loading