From 24863a2fb72cc8d516fac95126a117ccb1a2d811 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Wed, 25 Sep 2024 11:03:50 +0800 Subject: [PATCH] Add put to monitors/:monitorId doc --- Server/openapi.json | 80 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/Server/openapi.json b/Server/openapi.json index e03ca93ac..0d07292e6 100644 --- a/Server/openapi.json +++ b/Server/openapi.json @@ -882,6 +882,66 @@ } ] }, + "put": { + "tags": ["monitors"], + "description": "Update monitor by id", + "parameters": [ + { + "name": "monitorId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateMonitorBody" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, "delete": { "tags": ["monitors"], "description": "Delete monitor by id", @@ -1353,6 +1413,26 @@ } } } + }, + "UpdateMonitorBody": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "interval": { + "type": "integer" + }, + "notifications": { + "type": "array", + "items": { + "type": "string" + } + } + } } } }