From 3b3a12fed93ab875bf6f9a042bff20b9a6d5934d Mon Sep 17 00:00:00 2001 From: Samir Solanki Date: Fri, 2 Mar 2018 05:09:12 -0800 Subject: [PATCH] Bring back default responses and fix examples --- .../preview/2018-01-01/apimanagement.json | 25 ++++++++++++++++++- .../preview/2018-01-01/apimapis.json | 7 ++++++ .../preview/2018-01-01/apimdiagnostics.json | 6 +++++ .../preview/2018-01-01/apimgroups.json | 6 +++++ .../preview/2018-01-01/apimnotifications.json | 12 +++++++++ .../preview/2018-01-01/apimproducts.json | 12 +++++++++ .../preview/2018-01-01/apimreports.json | 2 +- ...ApiManagementCreateApiOperationPolicy.json | 1 + .../ApiManagementCreateApiPolicy.json | 1 + .../examples/ApiManagementCreatePolicy.json | 1 + .../ApiManagementCreateProductPolicy.json | 1 + .../ApiManagementHeadDiagnosticLogger.json | 4 ++- .../examples/ApiManagementHeadGroupUser.json | 8 +++--- ...agementHeadNotificationRecipientEmail.json | 4 +-- ...nagementHeadNotificationRecipientUser.json | 4 +-- .../examples/ApiManagementHeadProductApi.json | 10 ++++---- .../ApiManagementHeadProductGroup.json | 4 +-- 17 files changed, 90 insertions(+), 18 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimanagement.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimanagement.json index 8cc150c3e9cf..e0793fba9743 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimanagement.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimanagement.json @@ -411,6 +411,29 @@ "policyContent": { "type": "string", "description": "Json escaped Xml Encoded contents of the Policy." + }, + "contentFormat": { + "type": "string", + "description": "Format of the policyContent.", + "enum": [ + "xml", + "xml-link" + ], + "x-ms-enum": { + "name": "PolicyContentFormat", + "modelAsString": true, + "values": [ + { + "value": "xml", + "description": "The contents are inline and Content type is an XML document." + }, + { + "value": "xml-link", + "description": "The policy XML document is hosted on a http endpoint accessible from the API Management service." + } + ] + }, + "default": "xml" } }, "required": [ @@ -584,7 +607,7 @@ "name": "PolicyIdName" }, "x-ms-parameter-location": "method" - }, + }, "IfMatchRequiredParameter": { "name": "If-Match", "in": "header", diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimapis.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimapis.json index f47291ca2f2b..5bd6bf615570 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimapis.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimapis.json @@ -370,6 +370,13 @@ { "$ref": "#/parameters/ApiIdRevParameter" }, + { + "name": "deleteRevisions", + "in": "query", + "required": false, + "type": "boolean", + "description": "Delete all revisions of the Api." + }, { "$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter" }, diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimdiagnostics.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimdiagnostics.json index f45bc8be6769..6525516ce625 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimdiagnostics.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimdiagnostics.json @@ -449,6 +449,12 @@ }, "404" : { "description": "The logger is not associated with the diagnostic entity." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } } } }, diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimgroups.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimgroups.json index a36948b5b0f8..0e4e9aa54dd2 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimgroups.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimgroups.json @@ -449,6 +449,12 @@ }, "404" : { "description": "Entity does not exists." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } } } }, diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimnotifications.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimnotifications.json index 22d3aa880dda..7abf971b664f 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimnotifications.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimnotifications.json @@ -253,6 +253,12 @@ }, "404" : { "description": "Entity does not exists." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } } } }, @@ -438,6 +444,12 @@ }, "404" : { "description": "The Users is not subscribed to receive the notification." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } } } }, diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimproducts.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimproducts.json index 0eb3b57dfa37..e73cc00e7eac 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimproducts.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimproducts.json @@ -463,6 +463,12 @@ }, "404" : { "description": "API is not associated with the product." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } } } }, @@ -665,6 +671,12 @@ }, "404" : { "description": "The Group entity is not associated with the Product." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } } } }, diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimreports.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimreports.json index c49fd7935fd5..da029fd6e13b 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimreports.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimreports.json @@ -461,7 +461,7 @@ } }, "x-ms-pageable": { - "nextLinkName": "nextLink" + "nextLinkName": null }, "x-ms-odata": "#/definitions/RequestReportRecordContract" } diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementCreateApiOperationPolicy.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementCreateApiOperationPolicy.json index dbc8c6b129e4..2cae66c70fb0 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementCreateApiOperationPolicy.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementCreateApiOperationPolicy.json @@ -10,6 +10,7 @@ "If-Match": "*", "parameters": { "properties": { + "contentFormat": "xml", "policyContent": " " } } diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementCreateApiPolicy.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementCreateApiPolicy.json index 520453cbefcd..13a0921fe4b5 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementCreateApiPolicy.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementCreateApiPolicy.json @@ -9,6 +9,7 @@ "If-Match":"*", "parameters": { "properties": { + "contentFormat": "xml", "policyContent": " " } } diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementCreatePolicy.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementCreatePolicy.json index 0f244f9863d7..1c309641f58f 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementCreatePolicy.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementCreatePolicy.json @@ -7,6 +7,7 @@ "policyId": "policy", "parameters": { "properties": { + "contentFormat": "xml", "policyContent": "\r\n \r\n \r\n \r\n \r\n \r\n" } } diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementCreateProductPolicy.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementCreateProductPolicy.json index bb767df03963..642e89902e2d 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementCreateProductPolicy.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementCreateProductPolicy.json @@ -8,6 +8,7 @@ "policyId": "policy", "parameters": { "properties": { + "contentFormat": "xml", "policyContent": "\r\n \r\n \r\n \r\n @( string.Join(\",\", DateTime.UtcNow, context.Deployment.ServiceName, context.RequestId, context.Request.IpAddress, context.Operation.Name) ) \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n" } } diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementHeadDiagnosticLogger.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementHeadDiagnosticLogger.json index 4e52d880e773..9a7b1c996036 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementHeadDiagnosticLogger.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementHeadDiagnosticLogger.json @@ -9,6 +9,8 @@ }, "responses": { "204": { - } + }, + "404":{ + } } } \ No newline at end of file diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementHeadGroupUser.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementHeadGroupUser.json index 1ee0803b3555..feaef80c1d04 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementHeadGroupUser.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementHeadGroupUser.json @@ -4,11 +4,11 @@ "resourceGroupName": "rg1", "api-version": "2018-01-01", "subscriptionId": "subid", - "groupId": "59306a29e4bbd510dc24e5f9", + "groupId": "59306a29e4bbd510dc24e5f9", "uid": "5931a75ae4bbd512a88c680b" }, "responses": { - "204": { - } - } + "204": {}, + "404": {} + } } \ No newline at end of file diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementHeadNotificationRecipientEmail.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementHeadNotificationRecipientEmail.json index c1975521c12a..c3c3880361ef 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementHeadNotificationRecipientEmail.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementHeadNotificationRecipientEmail.json @@ -8,7 +8,7 @@ "email": "contoso@live.com" }, "responses": { - "204": { - } + "204": {}, + "404": {} } } \ No newline at end of file diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementHeadNotificationRecipientUser.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementHeadNotificationRecipientUser.json index 8c11740b3f78..58d709942bc9 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementHeadNotificationRecipientUser.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementHeadNotificationRecipientUser.json @@ -8,7 +8,7 @@ "uid": "576823d0a40f7e74ec07d642" }, "responses": { - "204": { - } + "204": {}, + "404": {} } } \ No newline at end of file diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementHeadProductApi.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementHeadProductApi.json index 4c1e998542fe..427b0f0f9600 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementHeadProductApi.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementHeadProductApi.json @@ -4,11 +4,11 @@ "resourceGroupName": "rg1", "api-version": "2017-03-01", "subscriptionId": "subid", - "productId": "5931a75ae4bbd512a88c680b", - "apiId": "59306a29e4bbd510dc24e5f9" + "productId": "5931a75ae4bbd512a88c680b", + "apiId": "59306a29e4bbd510dc24e5f9" }, "responses": { - "204": { - } - } + "204": {}, + "404": {} + } } \ No newline at end of file diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementHeadProductGroup.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementHeadProductGroup.json index 6dec4b991447..fec9e0e7e5f9 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementHeadProductGroup.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementHeadProductGroup.json @@ -8,7 +8,7 @@ "groupId": "59306a29e4bbd510dc24e5f9" }, "responses": { - "204": { - } + "204": {}, + "404": {} } } \ No newline at end of file