diff --git a/public/api/specs/liljudd.json b/public/api/specs/liljudd.json index 2b35d6c..faa29e4 100644 --- a/public/api/specs/liljudd.json +++ b/public/api/specs/liljudd.json @@ -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": {