From 01563419f540c27a96abae75f9feaa3e5e9a1f13 Mon Sep 17 00:00:00 2001 From: Jan Novak Date: Mon, 14 Jun 2021 17:45:52 +0200 Subject: [PATCH] add http errors schemas --- .../communicationservicessiprouting.json | 9 +++++ .../examples/PatchSipConfiguration.json | 34 +++++++++++++------ 2 files changed, 33 insertions(+), 10 deletions(-) diff --git a/specification/communication/data-plane/SipRouting/preview/2021-05-01-preview/communicationservicessiprouting.json b/specification/communication/data-plane/SipRouting/preview/2021-05-01-preview/communicationservicessiprouting.json index c7ec23e21ea7..f50f588232fd 100644 --- a/specification/communication/data-plane/SipRouting/preview/2021-05-01-preview/communicationservicessiprouting.json +++ b/specification/communication/data-plane/SipRouting/preview/2021-05-01-preview/communicationservicessiprouting.json @@ -79,14 +79,23 @@ }, "415": { "description": "Unsupported media type of the patch.", + "schema": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" + }, "x-ms-error-response": true }, "422": { "description": "If the request is empty, unprocessable or inconsistent with the stored data.", + "schema": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" + }, "x-ms-error-response": true }, "500": { "description": "All other api errors.", + "schema": { + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" + }, "x-ms-error-response": true }, "default": { diff --git a/specification/communication/data-plane/SipRouting/preview/2021-05-01-preview/examples/PatchSipConfiguration.json b/specification/communication/data-plane/SipRouting/preview/2021-05-01-preview/examples/PatchSipConfiguration.json index 79ed863ef577..ba703fcfde76 100644 --- a/specification/communication/data-plane/SipRouting/preview/2021-05-01-preview/examples/PatchSipConfiguration.json +++ b/specification/communication/data-plane/SipRouting/preview/2021-05-01-preview/examples/PatchSipConfiguration.json @@ -41,21 +41,35 @@ ] } }, - "415": {}, + "415": { + "headers": {}, + "body": { + "error": { + "code": "UnsupportedMediaType", + "message": "Unsupported Media Type." + } + } + }, "422": { - "error": { - "code": "UnprocessableEntity", - "message": "One or more request inputs are not valid.", - "innererror": { - "code": "InvalidRegex", - "message": "Unsupported regex format provided." + "headers": {}, + "body": { + "error": { + "code": "UnprocessableEntity", + "message": "One or more request inputs are not valid.", + "innererror": { + "code": "InvalidRegex", + "message": "Unsupported regex format provided." + } } } }, "500": { - "error": { - "code": "InternalError", - "message": "The server encountered an internal error." + "headers": {}, + "body": { + "error": { + "code": "InternalError", + "message": "The server encountered an internal error." + } } } }