From 0d11dc866c1da876bd208ef9111ba68ed0d35f47 Mon Sep 17 00:00:00 2001 From: LostLuma Date: Sun, 17 Nov 2024 00:05:10 +0100 Subject: [PATCH] Some API spec fixed --- echo/openapi.json | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/echo/openapi.json b/echo/openapi.json index a0fb064..0bd7779 100644 --- a/echo/openapi.json +++ b/echo/openapi.json @@ -64,7 +64,18 @@ } }, "400": { - "description": "The body data was malformed or incorrect.", + "description": "Request body malformed or incorrect.", + "content": { + "application/json": { + "schema": { + "type": "object", + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "422": { + "description": "Request body contained semantic errors.", "content": { "application/json": { "schema": { @@ -144,7 +155,7 @@ } ], "get": { - "summary": "Security Token Info.", + "summary": "Security Token Info", "description": "View which Paste a particular security token is associated with.", "operationId": "security-info", "tags": ["Security"], @@ -172,7 +183,7 @@ } }, "delete": { - "summary": "Delete Paste with Security Token.", + "summary": "Delete Paste with Security Token", "description": "Delete the Paste associated with this security token.", "operationId": "security-delete", "tags": ["Security"], @@ -417,11 +428,18 @@ "ErrorResponse": { "title": "ErrorResponse", "type": "object", + "description": "Generic response when something went wrong.", "properties": { "message": { - "type": "string" + "type": "string", + "description": "The error message." + }, + "errors": { + "type": "object", + "description": "Detailed information on the error. May not be present." } - } + }, + "required": ["message"] } } }