Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: consistency and nested traits #342

Merged
24 changes: 0 additions & 24 deletions definitions/3.0.0/bindingsObject.json

This file was deleted.

9 changes: 8 additions & 1 deletion definitions/3.0.0/channelMessages.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
{
"type": "object",
"additionalProperties": {
"$ref": "http://asyncapi.com/definitions/3.0.0/message.json"
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/message.json"
}
]
},
"description": "A map of the messages that will be sent to this channel by any application at any time. **Every message sent to this channel MUST be valid against one, and only one, of the message objects defined in this map.**",
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down
8 changes: 6 additions & 2 deletions definitions/3.0.0/channels.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
"type": "object",
"additionalProperties": {
"oneOf": [
{ "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" },
{ "$ref": "http://asyncapi.com/definitions/3.0.0/channel.json" }
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/channel.json"
}
]
},
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down
5 changes: 0 additions & 5 deletions definitions/3.0.0/external.json

This file was deleted.

35 changes: 14 additions & 21 deletions definitions/3.0.0/message.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@
{
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"oneOf": [
{
"type": "object",
"required": [
"oneOf"
],
"additionalProperties": false,
"properties": {
"oneOf": {
"type": "array",
"items": {
"$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json"
}
}
"type": "object",
"required": [
"oneOf"
],
"additionalProperties": false,
"properties": {
"oneOf": {
"type": "array",
"items": {
"$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json"
}
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json"
}
]
}
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/messageObject.json"
}
],
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down
9 changes: 8 additions & 1 deletion definitions/3.0.0/messages.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
{
"type": "object",
"additionalProperties": {
"$ref": "http://asyncapi.com/definitions/3.0.0/message.json"
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/message.json"
}
]
},
"description": "JSON objects describing the messages being consumed and produced by the API.",
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down
19 changes: 0 additions & 19 deletions definitions/3.0.0/operation.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,6 @@
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json"
},
{
"type": "array",
"items": [
{
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/operationTrait.json"
}
]
},
{
"type": "object",
"additionalItems": true
}
]
}
]
}
Expand Down
8 changes: 6 additions & 2 deletions definitions/3.0.0/operations.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
"type": "object",
"additionalProperties": {
"oneOf": [
{ "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" },
{ "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" }
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/operation.json"
}
]
},
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down