Skip to content

Commit

Permalink
feat: allow servers and channels to be defined as components
Browse files Browse the repository at this point in the history
  • Loading branch information
smoya committed Jan 13, 2022
1 parent a4bb034 commit b51f0aa
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions schemas/2.3.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@
"$ref": "#/definitions/info"
},
"servers": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/server"
}
"$ref": "#/definitions/servers"
},
"defaultContentType": {
"type": "string"
Expand Down Expand Up @@ -162,17 +159,20 @@
"server": {
"type": "object",
"description": "An object representing a Server.",
"required": [
"url",
"protocol"
],
"anyOf" : [
{ "required" : ["url", "protocol"] },
{ "required" : ["$ref"] }
],
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
},
"properties": {
"$ref": {
"$ref": "#/definitions/ReferenceObject"
},
"url": {
"type": "string"
},
Expand Down Expand Up @@ -200,6 +200,12 @@
}
}
},
"servers": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/server"
}
},
"serverVariables": {
"type": "object",
"additionalProperties": {
Expand Down Expand Up @@ -261,6 +267,12 @@
"schemas": {
"$ref": "#/definitions/schemas"
},
"servers": {
"$ref": "#/definitions/servers"
},
"channels": {
"$ref": "#/definitions/channels"
},
"messages": {
"$ref": "#/definitions/messages"
},
Expand Down

0 comments on commit b51f0aa

Please sign in to comment.