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" "version": "0.0.0"
}, },
"paths": { "paths": {
"/api/config/boot": { "/api/boot/config": {
"get": { "get": {
"tags": ["Guild configs"], "tags": ["Guild configs"],
"summary": "Find a guild's config by ID", "summary": "Find a guild's config by ID",
@ -41,7 +41,7 @@
] ]
} }
}, },
"/api/config/{guildId}": { "/api/{guildId}/config": {
"get": { "get": {
"tags": ["Guild configs"], "tags": ["Guild configs"],
"summary": "Find a guild's config by ID", "summary": "Find a guild's config by ID",
@ -118,7 +118,7 @@
] ]
} }
}, },
"/api/tp_messages/{guildId}": { "/api/{guildId}/tp_messages": {
"get": { "get": {
"tags": ["Time planning messages"], "tags": ["Time planning messages"],
"summary": "Find the tp_messages of guild by ID", "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": { "post": {
"tags": ["Matches"], "tags": ["Matches"],
"summary": "Save a new created match in channel of guild by IDs", "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": { "put": {
"tags": ["Matches"], "tags": ["Matches"],
"summary": "Set state for match of guild by IDs", "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": { "components": {