diff --git a/Server/openapi.json b/Server/openapi.json index 36f18a73f..b0b7deba6 100644 --- a/Server/openapi.json +++ b/Server/openapi.json @@ -59,19 +59,31 @@ "200": { "description": "OK", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } } }, "422": { "description": "Unprocessable Content", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } }, "500": { "description": "Internal Server Error", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } } } @@ -85,19 +97,31 @@ "200": { "description": "OK", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } } }, "422": { "description": "Unprocessable Content", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } }, "500": { "description": "Internal Server Error", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } } } @@ -111,19 +135,31 @@ "200": { "description": "OK", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } } }, "422": { "description": "Unprocessable Content", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } }, "500": { "description": "Internal Server Error", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } } } @@ -137,19 +173,31 @@ "200": { "description": "OK", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } } }, "422": { "description": "Unprocessable Content", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } }, "500": { "description": "Internal Server Error", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } } } @@ -161,19 +209,31 @@ "200": { "description": "OK", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } } }, "422": { "description": "Unprocessable Content", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } }, "500": { "description": "Internal Server Error", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } } } @@ -187,19 +247,31 @@ "200": { "description": "OK", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } } }, "422": { "description": "Unprocessable Content", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } }, "500": { "description": "Internal Server Error", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } } } @@ -213,19 +285,31 @@ "200": { "description": "OK", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } } }, "422": { "description": "Unprocessable Content", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } }, "500": { "description": "Internal Server Error", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } } } @@ -239,19 +323,31 @@ "200": { "description": "OK", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } } }, "422": { "description": "Unprocessable Content", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } }, "500": { "description": "Internal Server Error", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } } } @@ -265,19 +361,31 @@ "200": { "description": "OK", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } } }, "422": { "description": "Unprocessable Content", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } }, "500": { "description": "Internal Server Error", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } } } @@ -291,19 +399,31 @@ "200": { "description": "OK", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } } }, "422": { "description": "Unprocessable Content", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } }, "500": { "description": "Internal Server Error", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } } } @@ -317,19 +437,31 @@ "200": { "description": "OK", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } } }, "422": { "description": "Unprocessable Content", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } }, "500": { "description": "Internal Server Error", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } } } @@ -343,23 +475,64 @@ "200": { "description": "OK", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } } }, "422": { "description": "Unprocessable Content", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } }, "500": { "description": "Internal Server Error", "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } } } } } } + }, + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + } + } + }, + "SuccessResponse": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "data": { + "type": "object" + } + } + } + } } }