Rewrite getRouteDescriptions, fix message route not appearing in openapi spec

This commit is contained in:
Madeline
2023-04-16 01:51:52 +10:00
parent a263ebb1e5
commit b438f2b071
14 changed files with 247 additions and 120 deletions
+141
View File
@@ -14646,6 +14646,147 @@
]
}
},
"/channels/{channel_id}/messages/": {
"get": {
"security": [
{
"bearer": []
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/APIMessageArray"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/APIErrorResponse"
}
}
}
},
"403": {
"description": "No description available"
},
"404": {
"description": "No description available"
}
},
"parameters": [
{
"name": "channel_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "channel_id"
},
{
"name": "around",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "before",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "after",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "limit",
"in": "query",
"schema": {
"type": "number"
},
"description": "max number of messages to return (1-100). defaults to 50"
}
],
"tags": [
"channels"
]
},
"post": {
"x-right-required": "SEND_MESSAGES",
"x-permission-required": "SEND_MESSAGES",
"security": [
{
"bearer": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageCreateSchema"
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Message"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/APIErrorResponse"
}
}
}
},
"403": {
"description": "No description available"
},
"404": {
"description": "No description available"
}
},
"parameters": [
{
"name": "channel_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "channel_id"
}
],
"tags": [
"channels"
]
}
},
"/channels/{channel_id}/messages/bulk-delete/": {
"post": {
"security": [