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

feat: add reusable tags and externalDocs objects #245

10 changes: 0 additions & 10 deletions definitions/3.0.0/asyncapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,6 @@
},
"components": {
"$ref": "http://asyncapi.com/definitions/3.0.0/components.json"
},
"tags": {
"type": "array",
"items": {
"$ref": "http://asyncapi.com/definitions/3.0.0/tag.json"
},
"uniqueItems": true
},
"externalDocs": {
"$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json"
}
}
}
24 changes: 19 additions & 5 deletions definitions/3.0.0/channel.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,32 @@
},
"uniqueItems": true
},
"bindings": {
"$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json"
},
"tags": {
"type": "array",
"items": {
"$ref": "http://asyncapi.com/definitions/3.0.0/tag.json"
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/tag.json"
}
]
},
"uniqueItems": true
},
"externalDocs": {
"$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json"
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json"
}
]
},
"bindings": {
"$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json"
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down
26 changes: 26 additions & 0 deletions definitions/3.0.0/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,32 @@
"additionalProperties": {
"$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json"
}
},
"tags": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/tag.json"
}
]
}
},
"externalDocs": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json"
}
]
}
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down
18 changes: 16 additions & 2 deletions definitions/3.0.0/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,26 @@
"tags": {
"type": "array",
"items": {
"$ref": "http://asyncapi.com/definitions/3.0.0/tag.json"
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/tag.json"
}
]
},
"uniqueItems": true
},
"externalDocs": {
"$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json"
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json"
}
]
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down
18 changes: 16 additions & 2 deletions definitions/3.0.0/message.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,14 @@
"tags": {
"type": "array",
"items": {
"$ref": "http://asyncapi.com/definitions/3.0.0/tag.json"
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/tag.json"
}
]
},
"uniqueItems": true
},
Expand All @@ -87,7 +94,14 @@
"description": "A longer description of the message. CommonMark is allowed."
},
"externalDocs": {
"$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json"
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json"
}
]
},
"deprecated": {
"type": "boolean",
Expand Down
18 changes: 16 additions & 2 deletions definitions/3.0.0/messageTrait.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,14 @@
"tags": {
"type": "array",
"items": {
"$ref": "http://asyncapi.com/definitions/3.0.0/tag.json"
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/tag.json"
}
]
},
"uniqueItems": true
},
Expand All @@ -64,7 +71,14 @@
"description": "A longer description of the message. CommonMark is allowed."
},
"externalDocs": {
"$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json"
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json"
}
]
},
"deprecated": {
"type": "boolean",
Expand Down
18 changes: 16 additions & 2 deletions definitions/3.0.0/operation.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,26 @@
"tags": {
"type": "array",
"items": {
"$ref": "http://asyncapi.com/definitions/3.0.0/tag.json"
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/tag.json"
}
]
},
"uniqueItems": true
},
"externalDocs": {
"$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json"
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json"
}
]
},
"bindings": {
"$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json"
Expand Down
9 changes: 8 additions & 1 deletion definitions/3.0.0/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,14 @@
"type": "string"
},
"externalDocs": {
"$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json"
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json"
}
]
},
"deprecated": {
"type": "boolean",
Expand Down
24 changes: 24 additions & 0 deletions definitions/3.0.0/server.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,30 @@
"$ref": "http://asyncapi.com/definitions/3.0.0/SecurityRequirement.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
},
"externalDocs": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json"
}
]
},
"bindings": {
"$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json"
}
Expand Down
9 changes: 8 additions & 1 deletion definitions/3.0.0/tag.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@
"type": "string"
},
"externalDocs": {
"$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json"
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json"
}
]
}
},
"patternProperties": {
Expand Down