Skip to content

Commit 81a8220

Browse files
fix: allow references in parameters (#320)
1 parent bda6196 commit 81a8220

File tree

16 files changed

+65
-45
lines changed

16 files changed

+65
-45
lines changed

definitions/2.0.0-rc1/channelItem.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,7 @@
1212
"$ref": "http://asyncapi.com/definitions/2.0.0-rc1/ReferenceObject.json"
1313
},
1414
"parameters": {
15-
"type": "array",
16-
"uniqueItems": true,
17-
"minItems": 1,
18-
"items": {
19-
"$ref": "http://asyncapi.com/definitions/2.0.0-rc1/parameter.json"
20-
}
15+
"$ref": "http://asyncapi.com/definitions/2.0.0-rc1/parameters.json"
2116
},
2217
"publish": {
2318
"$ref": "http://asyncapi.com/definitions/2.0.0-rc1/operation.json"

definitions/2.0.0-rc1/parameters.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
{
22
"type": "object",
33
"additionalProperties": {
4-
"$ref": "http://asyncapi.com/definitions/2.0.0-rc1/parameter.json"
4+
"oneOf": [
5+
{
6+
"$ref": "http://asyncapi.com/definitions/2.0.0-rc1/Reference.json"
7+
},
8+
{
9+
"$ref": "http://asyncapi.com/definitions/2.0.0-rc1/parameter.json"
10+
}
11+
]
512
},
613
"description": "JSON objects describing re-usable channel parameters.",
714
"$schema": "http://json-schema.org/draft-07/schema#",

definitions/2.0.0-rc2/channelItem.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
"$ref": "http://asyncapi.com/definitions/2.0.0-rc2/ReferenceObject.json"
1313
},
1414
"parameters": {
15-
"type": "object",
16-
"additionalProperties": {
17-
"$ref": "http://asyncapi.com/definitions/2.0.0-rc2/parameter.json"
18-
}
15+
"$ref": "http://asyncapi.com/definitions/2.0.0-rc2/parameters.json"
1916
},
2017
"description": {
2118
"type": "string",

definitions/2.0.0-rc2/parameters.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
{
22
"type": "object",
33
"additionalProperties": {
4-
"$ref": "http://asyncapi.com/definitions/2.0.0-rc2/parameter.json"
4+
"oneOf": [
5+
{
6+
"$ref": "http://asyncapi.com/definitions/2.0.0-rc2/Reference.json"
7+
},
8+
{
9+
"$ref": "http://asyncapi.com/definitions/2.0.0-rc2/parameter.json"
10+
}
11+
]
512
},
613
"description": "JSON objects describing re-usable channel parameters.",
714
"$schema": "http://json-schema.org/draft-07/schema#",

definitions/2.0.0/channelItem.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111
"$ref": "http://asyncapi.com/definitions/2.0.0/ReferenceObject.json"
1212
},
1313
"parameters": {
14-
"type": "object",
15-
"additionalProperties": {
16-
"$ref": "http://asyncapi.com/definitions/2.0.0/parameter.json"
17-
}
14+
"$ref": "http://asyncapi.com/definitions/2.0.0/parameters.json"
1815
},
1916
"description": {
2017
"type": "string",

definitions/2.0.0/parameters.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
{
22
"type": "object",
33
"additionalProperties": {
4-
"$ref": "http://asyncapi.com/definitions/2.0.0/parameter.json"
4+
"oneOf": [
5+
{
6+
"$ref": "http://asyncapi.com/definitions/2.0.0/Reference.json"
7+
},
8+
{
9+
"$ref": "http://asyncapi.com/definitions/2.0.0/parameter.json"
10+
}
11+
]
512
},
613
"description": "JSON objects describing re-usable channel parameters.",
714
"$schema": "http://json-schema.org/draft-07/schema#",

definitions/2.1.0/channelItem.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111
"$ref": "http://asyncapi.com/definitions/2.1.0/ReferenceObject.json"
1212
},
1313
"parameters": {
14-
"type": "object",
15-
"additionalProperties": {
16-
"$ref": "http://asyncapi.com/definitions/2.1.0/parameter.json"
17-
}
14+
"$ref": "http://asyncapi.com/definitions/2.1.0/parameters.json"
1815
},
1916
"description": {
2017
"type": "string",

definitions/2.1.0/parameters.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
{
22
"type": "object",
33
"additionalProperties": {
4-
"$ref": "http://asyncapi.com/definitions/2.1.0/parameter.json"
4+
"oneOf": [
5+
{
6+
"$ref": "http://asyncapi.com/definitions/2.1.0/Reference.json"
7+
},
8+
{
9+
"$ref": "http://asyncapi.com/definitions/2.1.0/parameter.json"
10+
}
11+
]
512
},
613
"description": "JSON objects describing re-usable channel parameters.",
714
"$schema": "http://json-schema.org/draft-07/schema#",

definitions/2.2.0/channelItem.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111
"$ref": "http://asyncapi.com/definitions/2.2.0/ReferenceObject.json"
1212
},
1313
"parameters": {
14-
"type": "object",
15-
"additionalProperties": {
16-
"$ref": "http://asyncapi.com/definitions/2.2.0/parameter.json"
17-
}
14+
"$ref": "http://asyncapi.com/definitions/2.2.0/parameters.json"
1815
},
1916
"description": {
2017
"type": "string",

definitions/2.2.0/parameters.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
{
22
"type": "object",
33
"additionalProperties": {
4-
"$ref": "http://asyncapi.com/definitions/2.2.0/parameter.json"
4+
"oneOf": [
5+
{
6+
"$ref": "http://asyncapi.com/definitions/2.2.0/Reference.json"
7+
},
8+
{
9+
"$ref": "http://asyncapi.com/definitions/2.2.0/parameter.json"
10+
}
11+
]
512
},
613
"description": "JSON objects describing re-usable channel parameters.",
714
"$schema": "http://json-schema.org/draft-07/schema#",

0 commit comments

Comments
 (0)