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 39ce8d34f987..516b9bea1e92 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 @@ -463,7 +463,9 @@ "description": "Format of the policyContent.", "enum": [ "xml", - "xml-link" + "xml-link", + "rawxml", + "rawxml-link" ], "x-ms-enum": { "name": "PolicyContentFormat", @@ -476,6 +478,14 @@ { "value": "xml-link", "description": "The policy XML document is hosted on a http endpoint accessible from the API Management service." + }, + { + "value": "rawxml", + "description": "The contents are inline and Content type is a non XML encoded policy document." + }, + { + "value": "rawxml-link", + "description": "The policy document is not Xml encoded and is hosted on a http endpoint accessible from the API Management service." } ] }, 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 9e1dd8b0477d..7ab7c3aecb45 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 @@ -1630,6 +1630,9 @@ "x-ms-examples": { "ApiManagementCreateApiPolicy": { "$ref": "./examples/ApiManagementCreateApiPolicy.json" + }, + "ApiManagementCreateApiPolicyNonXmlEncoded": { + "$ref": "./examples/ApiManagementCreateApiPolicyNonXmlEncoded.json" } }, "consumes": [ diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json new file mode 100644 index 000000000000..e525ce4da05e --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2018-01-01", + "subscriptionId": "subid", + "apiId": "5600b57e7e8880006a040001", + "policyId": "policy", + "If-Match": "*", + "parameters": { + "properties": { + "policyContent": "\r\n \r\n \r\n \r\n \"@(context.Request.Headers.FirstOrDefault(h => h.Ke==\"Via\"))\" \r\n \r\n \r\n ", + "contentFormat": "rawxml" + } + } + }, + "responses": { + "201": { + "body": { + "id": "/subscriptions/4c1a3bc6-89f9-46fe-a175-5d8984b25095/resourcegroups/Api-DF-West-US/providers/Microsoft.ApiManagement/service/samirmsiservice2/apis/echo-api/operations/create-resource/policies/policy", + "type": "Microsoft.ApiManagement/service/apis/operations/policies", + "name": "policy", + "properties": { + "policyContent": "\r\n \r\n \r\n \r\n \"@(context.Request.Headers.FirstOrDefault(h => h.Ke==\"Via\"))\" \r\n \r\n \r\n" + } + } + }, + "200": { + "body": { + "id": "/subscriptions/4c1a3bc6-89f9-46fe-a175-5d8984b25095/resourcegroups/Api-DF-West-US/providers/Microsoft.ApiManagement/service/samirmsiservice2/apis/echo-api/operations/create-resource/policies/policy", + "type": "Microsoft.ApiManagement/service/apis/operations/policies", + "name": "policy", + "properties": { + "policyContent": "\r\n \r\n \r\n \r\n \"@(context.Request.Headers.FirstOrDefault(h => h.Ke==\"Via\"))\" \r\n \r\n \r\n" + } + } + } + } +} \ No newline at end of file