Chore: Update api paths

This commit is contained in:
Aron Malcher 2024-02-12 10:49:28 +01:00
parent 590e7d8265
commit 1974152b48
Signed by: aronmal
GPG key ID: 816B7707426FC612

View file

@ -10,7 +10,7 @@
"version": "0.0.0"
},
"paths": {
"/api/config/boot": {
"/api/boot/config": {
"get": {
"tags": ["Guild configs"],
"summary": "Find a guild's config by ID",
@ -41,7 +41,7 @@
]
}
},
"/api/config/{guildId}": {
"/api/{guildId}/config": {
"get": {
"tags": ["Guild configs"],
"summary": "Find a guild's config by ID",
@ -118,7 +118,7 @@
]
}
},
"/api/tp_messages/{guildId}": {
"/api/{guildId}/tp_messages": {
"get": {
"tags": ["Time planning messages"],
"summary": "Find the tp_messages of guild by ID",
@ -208,7 +208,56 @@
]
}
},
"/api/match/{guildId}/{channelId}": {
"/api/{guildId}/matches": {
"get": {
"tags": ["Matches"],
"summary": "Find all matches of guild by ID",
"description": "Returns tp_messages for a guild",
"operationId": "getMatchesOfGuildById",
"parameters": [
{
"name": "guildId",
"in": "path",
"description": "ID of guild's tp_messages to return",
"required": true,
"schema": {
"type": "string",
"format": "varchar(20)"
}
}
],
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/tp_messages"
}
}
}
}
},
"204": {
"description": "Time planning not enabled for this guild"
},
"400": {
"description": "Invalid ID supplied"
},
"404": {
"description": "Guild not found"
}
},
"security": [
{
"api_key": []
}
]
}
},
"/api/{guildId}/matches/{channelId}": {
"post": {
"tags": ["Matches"],
"summary": "Save a new created match in channel of guild by IDs",
@ -264,7 +313,7 @@
]
}
},
"/api/match/{guildId}/{channelId}/{matchMessageId}": {
"/api/{guildId}/matches/{channelId}/{matchMessageId}": {
"put": {
"tags": ["Matches"],
"summary": "Set state for match of guild by IDs",
@ -329,55 +378,6 @@
}
]
}
},
"/api/match/{guildId}": {
"get": {
"tags": ["Matches"],
"summary": "Find all matches of guild by ID",
"description": "Returns tp_messages for a guild",
"operationId": "getMatchesOfGuildById",
"parameters": [
{
"name": "guildId",
"in": "path",
"description": "ID of guild's tp_messages to return",
"required": true,
"schema": {
"type": "string",
"format": "varchar(20)"
}
}
],
"responses": {
"200": {
"description": "successful operation",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/tp_messages"
}
}
}
}
},
"204": {
"description": "Time planning not enabled for this guild"
},
"400": {
"description": "Invalid ID supplied"
},
"404": {
"description": "Guild not found"
}
},
"security": [
{
"api_key": []
}
]
}
}
},
"components": {