Skip to content

Commit

Permalink
fix: allow references in parameters (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
magicmatatjahu authored Feb 7, 2023
1 parent bda6196 commit 81a8220
Show file tree
Hide file tree
Showing 16 changed files with 65 additions and 45 deletions.
7 changes: 1 addition & 6 deletions definitions/2.0.0-rc1/channelItem.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,7 @@
"$ref": "http://asyncapi.com/definitions/2.0.0-rc1/ReferenceObject.json"
},
"parameters": {
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": {
"$ref": "http://asyncapi.com/definitions/2.0.0-rc1/parameter.json"
}
"$ref": "http://asyncapi.com/definitions/2.0.0-rc1/parameters.json"
},
"publish": {
"$ref": "http://asyncapi.com/definitions/2.0.0-rc1/operation.json"
Expand Down
9 changes: 8 additions & 1 deletion definitions/2.0.0-rc1/parameters.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
{
"type": "object",
"additionalProperties": {
"$ref": "http://asyncapi.com/definitions/2.0.0-rc1/parameter.json"
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/2.0.0-rc1/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.0.0-rc1/parameter.json"
}
]
},
"description": "JSON objects describing re-usable channel parameters.",
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down
5 changes: 1 addition & 4 deletions definitions/2.0.0-rc2/channelItem.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
"$ref": "http://asyncapi.com/definitions/2.0.0-rc2/ReferenceObject.json"
},
"parameters": {
"type": "object",
"additionalProperties": {
"$ref": "http://asyncapi.com/definitions/2.0.0-rc2/parameter.json"
}
"$ref": "http://asyncapi.com/definitions/2.0.0-rc2/parameters.json"
},
"description": {
"type": "string",
Expand Down
9 changes: 8 additions & 1 deletion definitions/2.0.0-rc2/parameters.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
{
"type": "object",
"additionalProperties": {
"$ref": "http://asyncapi.com/definitions/2.0.0-rc2/parameter.json"
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/2.0.0-rc2/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.0.0-rc2/parameter.json"
}
]
},
"description": "JSON objects describing re-usable channel parameters.",
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down
5 changes: 1 addition & 4 deletions definitions/2.0.0/channelItem.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
"$ref": "http://asyncapi.com/definitions/2.0.0/ReferenceObject.json"
},
"parameters": {
"type": "object",
"additionalProperties": {
"$ref": "http://asyncapi.com/definitions/2.0.0/parameter.json"
}
"$ref": "http://asyncapi.com/definitions/2.0.0/parameters.json"
},
"description": {
"type": "string",
Expand Down
9 changes: 8 additions & 1 deletion definitions/2.0.0/parameters.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
{
"type": "object",
"additionalProperties": {
"$ref": "http://asyncapi.com/definitions/2.0.0/parameter.json"
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/2.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.0.0/parameter.json"
}
]
},
"description": "JSON objects describing re-usable channel parameters.",
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down
5 changes: 1 addition & 4 deletions definitions/2.1.0/channelItem.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
"$ref": "http://asyncapi.com/definitions/2.1.0/ReferenceObject.json"
},
"parameters": {
"type": "object",
"additionalProperties": {
"$ref": "http://asyncapi.com/definitions/2.1.0/parameter.json"
}
"$ref": "http://asyncapi.com/definitions/2.1.0/parameters.json"
},
"description": {
"type": "string",
Expand Down
9 changes: 8 additions & 1 deletion definitions/2.1.0/parameters.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
{
"type": "object",
"additionalProperties": {
"$ref": "http://asyncapi.com/definitions/2.1.0/parameter.json"
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/2.1.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.1.0/parameter.json"
}
]
},
"description": "JSON objects describing re-usable channel parameters.",
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down
5 changes: 1 addition & 4 deletions definitions/2.2.0/channelItem.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
"$ref": "http://asyncapi.com/definitions/2.2.0/ReferenceObject.json"
},
"parameters": {
"type": "object",
"additionalProperties": {
"$ref": "http://asyncapi.com/definitions/2.2.0/parameter.json"
}
"$ref": "http://asyncapi.com/definitions/2.2.0/parameters.json"
},
"description": {
"type": "string",
Expand Down
9 changes: 8 additions & 1 deletion definitions/2.2.0/parameters.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
{
"type": "object",
"additionalProperties": {
"$ref": "http://asyncapi.com/definitions/2.2.0/parameter.json"
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/2.2.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.2.0/parameter.json"
}
]
},
"description": "JSON objects describing re-usable channel parameters.",
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down
5 changes: 1 addition & 4 deletions definitions/2.3.0/channelItem.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
"$ref": "http://asyncapi.com/definitions/2.3.0/ReferenceObject.json"
},
"parameters": {
"type": "object",
"additionalProperties": {
"$ref": "http://asyncapi.com/definitions/2.3.0/parameter.json"
}
"$ref": "http://asyncapi.com/definitions/2.3.0/parameters.json"
},
"description": {
"type": "string",
Expand Down
9 changes: 8 additions & 1 deletion definitions/2.3.0/parameters.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
{
"type": "object",
"additionalProperties": {
"$ref": "http://asyncapi.com/definitions/2.3.0/parameter.json"
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/2.3.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.3.0/parameter.json"
}
]
},
"description": "JSON objects describing re-usable channel parameters.",
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down
5 changes: 1 addition & 4 deletions definitions/2.4.0/channelItem.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
"$ref": "http://asyncapi.com/definitions/2.4.0/ReferenceObject.json"
},
"parameters": {
"type": "object",
"additionalProperties": {
"$ref": "http://asyncapi.com/definitions/2.4.0/parameter.json"
}
"$ref": "http://asyncapi.com/definitions/2.4.0/parameters.json"
},
"description": {
"type": "string",
Expand Down
9 changes: 8 additions & 1 deletion definitions/2.4.0/parameters.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
{
"type": "object",
"additionalProperties": {
"$ref": "http://asyncapi.com/definitions/2.4.0/parameter.json"
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/2.4.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.4.0/parameter.json"
}
]
},
"description": "JSON objects describing re-usable channel parameters.",
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down
5 changes: 1 addition & 4 deletions definitions/2.5.0/channelItem.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
"$ref": "http://asyncapi.com/definitions/2.5.0/ReferenceObject.json"
},
"parameters": {
"type": "object",
"additionalProperties": {
"$ref": "http://asyncapi.com/definitions/2.5.0/parameter.json"
}
"$ref": "http://asyncapi.com/definitions/2.5.0/parameters.json"
},
"description": {
"type": "string",
Expand Down
5 changes: 1 addition & 4 deletions definitions/2.6.0/channelItem.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
"$ref": "http://asyncapi.com/definitions/2.6.0/ReferenceObject.json"
},
"parameters": {
"type": "object",
"additionalProperties": {
"$ref": "http://asyncapi.com/definitions/2.6.0/parameter.json"
}
"$ref": "http://asyncapi.com/definitions/2.6.0/parameters.json"
},
"description": {
"type": "string",
Expand Down

0 comments on commit 81a8220

Please sign in to comment.