diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/2016-10-10/examples/ApiManagementServiceUpdateHostName.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/2016-10-10/examples/ApiManagementServiceUpdateHostName.json
index 422031175ed1..2c91b41fbb88 100644
--- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/2016-10-10/examples/ApiManagementServiceUpdateHostName.json
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/2016-10-10/examples/ApiManagementServiceUpdateHostName.json
@@ -88,7 +88,7 @@
},
"200": {
"body": {
- "id": "/subscriptions/20010222-2b48-4245-a95c-090db6312d5f/resourceGroups/Admin-ResourceGroup/providers/Microsoft.ApiManagement/service/apimService1",
+ "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1",
"name": "apimService1",
"type": "Microsoft.ApiManagement/service",
"tags": {
diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/2017-03-01/apimanagement.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/2017-03-01/apimanagement.json
index 24f885bcfa3e..fefd15e77f62 100644
--- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/2017-03-01/apimanagement.json
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/2017-03-01/apimanagement.json
@@ -411,7 +411,7 @@
"properties": {
"policyContent": {
"type": "string",
- "description": "Xml Encoded contents of the Policy."
+ "description": "Json escaped Xml Encoded contents of the Policy."
}
},
"required": [
diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/2017-03-01/apimapis.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/2017-03-01/apimapis.json
index 06a3df958919..9a8a27b8b14e 100644
--- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/2017-03-01/apimapis.json
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/2017-03-01/apimapis.json
@@ -1102,6 +1102,232 @@
}
}
}
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas": {
+ "get": {
+ "tags": [
+ "ApiSchema"
+ ],
+ "operationId": "ApiSchema_ListByApi",
+ "description": "Get the schema configuration at the API level.",
+ "x-ms-examples": {
+ "ApiManagementListApiSchemas": {
+ "$ref": "./examples/ApiManagementListApiSchemas.json"
+ }
+ },
+ "parameters": [
+ {
+ "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
+ },
+ {
+ "$ref": "#/parameters/ApiIdParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Apis Schema Collection.",
+ "schema": {
+ "$ref": "#/definitions/SchemaCollection"
+ },
+ "headers": {
+ "ETag": {
+ "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
+ "type": "string"
+ }
+ }
+ },
+ "default": {
+ "description": "Error response describing why the operation failed.",
+ "schema": {
+ "$ref": "./apimanagement.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-pageable": {
+ "nextLinkName": "nextLink"
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}": {
+ "get": {
+ "tags": [
+ "ApiSchema"
+ ],
+ "operationId": "ApiSchema_Get",
+ "description": "Get the schema configuration at the API level.",
+ "x-ms-examples": {
+ "ApiManagementGetApiSchema": {
+ "$ref": "./examples/ApiManagementGetApiSchema.json"
+ }
+ },
+ "parameters": [
+ {
+ "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
+ },
+ {
+ "$ref": "#/parameters/ApiIdParameter"
+ },
+ {
+ "$ref": "#/parameters/SchemaIdParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Api Schema information.",
+ "schema": {
+ "$ref": "#/definitions/SchemaContract"
+ },
+ "headers": {
+ "ETag": {
+ "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
+ "type": "string"
+ }
+ }
+ },
+ "default": {
+ "description": "Error response describing why the operation failed.",
+ "schema": {
+ "$ref": "./apimanagement.json#/definitions/ErrorResponse"
+ }
+ }
+ }
+ },
+ "put": {
+ "tags": [
+ "ApiSchema"
+ ],
+ "operationId": "ApiSchema_CreateOrUpdate",
+ "description": "Creates or updates schema configuration for the API.",
+ "x-ms-examples": {
+ "ApiManagementCreateApiSchema": {
+ "$ref": "./examples/ApiManagementCreateApiSchema.json"
+ }
+ },
+ "parameters": [
+ {
+ "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
+ },
+ {
+ "$ref": "#/parameters/ApiIdParameter"
+ },
+ {
+ "$ref": "#/parameters/SchemaIdParameter"
+ },
+ {
+ "name": "parameters",
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/SchemaContract"
+ },
+ "required": true,
+ "description": "The schema contents to apply."
+ },
+ {
+ "name": "If-Match",
+ "in": "header",
+ "required": false,
+ "description": "The entity state (Etag) version of the Api Schema to update. A value of \"*\" can be used for If-Match to unconditionally apply the operation.",
+ "type": "string"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "Api schema configuration was successfully created.",
+ "schema": {
+ "$ref": "#/definitions/SchemaContract"
+ }
+ },
+ "200": {
+ "description": "Api schema configuration of the tenant was successfully updated.",
+ "schema": {
+ "$ref": "#/definitions/SchemaContract"
+ }
+ },
+ "default": {
+ "description": "Error response describing why the operation failed.",
+ "schema": {
+ "$ref": "./apimanagement.json#/definitions/ErrorResponse"
+ }
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "ApiSchema"
+ ],
+ "operationId": "ApiSchema_Delete",
+ "description": "Deletes the schema configuration at the Api.",
+ "x-ms-examples": {
+ "ApiManagementDeleteApiSchema": {
+ "$ref": "./examples/ApiManagementDeleteApiSchema.json"
+ }
+ },
+ "parameters": [
+ {
+ "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
+ },
+ {
+ "$ref": "#/parameters/ApiIdParameter"
+ },
+ {
+ "$ref": "#/parameters/SchemaIdParameter"
+ },
+ {
+ "name": "If-Match",
+ "in": "header",
+ "required": true,
+ "description": "The entity state (Etag) version of the Api schema to update. A value of \"*\" can be used for If-Match to unconditionally apply the operation.",
+ "type": "string"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "Successfully deleted the schema configuration at the API level."
+ },
+ "default": {
+ "description": "Error response describing why the operation failed.",
+ "schema": {
+ "$ref": "./apimanagement.json#/definitions/ErrorResponse"
+ }
+ }
+ }
+ }
}
},
"x-ms-paths": {
@@ -1728,6 +1954,63 @@
"header": "customHeaderParameterName"
}
}
+ },
+ "SchemaCollection": {
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/SchemaContract"
+ },
+ "description": "Api Schema Contract value."
+ },
+ "nextLink": {
+ "type": "string",
+ "description": "Next page link if any."
+ }
+ },
+ "description": "The response of the list schema operation."
+ },
+ "SchemaContract": {
+ "properties": {
+ "properties": {
+ "x-ms-client-flatten": true,
+ "$ref": "#/definitions/SchemaContractProperties",
+ "description": "Properties of the Schema."
+ }
+ },
+ "allOf": [
+ {
+ "$ref": "#/definitions/Resource"
+ }
+ ],
+ "description": "Schema Contract details."
+ },
+ "SchemaContractProperties": {
+ "properties": {
+ "contentType": {
+ "type": "string",
+ "description": "Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml)."
+ },
+ "document": {
+ "x-ms-client-flatten": true,
+ "$ref": "#/definitions/SchemaDocumentProperties",
+ "description": "Properties of the Schema Document."
+ }
+ },
+ "required": [
+ "contentType"
+ ],
+ "description": "Schema contract Properties."
+ },
+ "SchemaDocumentProperties": {
+ "properties": {
+ "value": {
+ "type": "string",
+ "description": "Json escaped string defining the document representing the Schema."
+ }
+ },
+ "description": "Schema Document Properties."
}
},
"parameters": {
@@ -1752,6 +2035,17 @@
"maxLength": 256,
"pattern": "^[^*#&+:<>?]+$",
"x-ms-parameter-location": "method"
+ },
+ "SchemaIdParameter": {
+ "name": "schemaId",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Schema identifier within an API. Must be unique in the current API Management service instance.",
+ "minLength": 1,
+ "maxLength": 256,
+ "pattern": "^[^*#&+:<>?]+$",
+ "x-ms-parameter-location": "method"
}
}
}
\ No newline at end of file
diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/2017-03-01/examples/ApiManagementCreateApiSchema.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/2017-03-01/examples/ApiManagementCreateApiSchema.json
new file mode 100644
index 000000000000..3d32a35bd0f5
--- /dev/null
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/2017-03-01/examples/ApiManagementCreateApiSchema.json
@@ -0,0 +1,46 @@
+{
+ "parameters": {
+ "serviceName": "apimService1",
+ "resourceGroupName": "rg1",
+ "api-version": "2017-03-01",
+ "subscriptionId": "subid",
+ "apiId": "59d6bb8f1f7fab13dc67ec9b",
+ "schemaId": "ec12520d-9d48-4e7b-8f39-698ca2ac63f1",
+ "parameters": {
+ "properties": {
+ "contentType": "application/vnd.ms-azure-apim.xsd+xml",
+ "document": {
+ "value": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "body": {
+ "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/59d6bb8f1f7fab13dc67ec9b/schemas/ec12520d-9d48-4e7b-8f39-698ca2ac63f1",
+ "type": "Microsoft.ApiManagement/service/apis/schemas",
+ "name": "ec12520d-9d48-4e7b-8f39-698ca2ac63f1",
+ "properties": {
+ "contentType": "application/vnd.ms-azure-apim.xsd+xml",
+ "document": {
+ "value": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n"
+ }
+ }
+ }
+ },
+ "200": {
+ "body": {
+ "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/59d6bb8f1f7fab13dc67ec9b/schemas/ec12520d-9d48-4e7b-8f39-698ca2ac63f1",
+ "type": "Microsoft.ApiManagement/service/apis/schemas",
+ "name": "ec12520d-9d48-4e7b-8f39-698ca2ac63f1",
+ "properties": {
+ "contentType": "application/vnd.ms-azure-apim.xsd+xml",
+ "document": {
+ "value": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n"
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/2017-03-01/examples/ApiManagementDeleteApiSchema.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/2017-03-01/examples/ApiManagementDeleteApiSchema.json
new file mode 100644
index 000000000000..49c9fad00430
--- /dev/null
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/2017-03-01/examples/ApiManagementDeleteApiSchema.json
@@ -0,0 +1,14 @@
+{
+ "parameters": {
+ "serviceName": "apimService1",
+ "resourceGroupName": "rg1",
+ "api-version": "2017-03-01",
+ "subscriptionId": "subid",
+ "apiId": "59d5b28d1f7fab116c282650",
+ "schemaId": "59d5b28e1f7fab116402044e",
+ "If-Match": "*"
+ },
+ "responses": {
+ "204": {}
+ }
+}
\ No newline at end of file
diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/2017-03-01/examples/ApiManagementGetApiSchema.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/2017-03-01/examples/ApiManagementGetApiSchema.json
new file mode 100644
index 000000000000..96eb09ecc2c1
--- /dev/null
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/2017-03-01/examples/ApiManagementGetApiSchema.json
@@ -0,0 +1,25 @@
+{
+ "parameters": {
+ "serviceName": "apimService1",
+ "resourceGroupName": "rg1",
+ "api-version": "2017-03-01",
+ "subscriptionId": "subid",
+ "apiId": "59d6bb8f1f7fab13dc67ec9b",
+ "schemaId": "ec12520d-9d48-4e7b-8f39-698ca2ac63f1"
+ },
+ "responses": {
+ "200": {
+ "body": {
+ "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/59d6bb8f1f7fab13dc67ec9b/schemas/ec12520d-9d48-4e7b-8f39-698ca2ac63f1",
+ "type": "Microsoft.ApiManagement/service/apis/schemas",
+ "name": "ec12520d-9d48-4e7b-8f39-698ca2ac63f1",
+ "properties": {
+ "contentType": "application/vnd.ms-azure-apim.xsd+xml",
+ "document": {
+ "value": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n"
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/2017-03-01/examples/ApiManagementListApiSchemas.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/2017-03-01/examples/ApiManagementListApiSchemas.json
new file mode 100644
index 000000000000..5b8578d14b02
--- /dev/null
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/2017-03-01/examples/ApiManagementListApiSchemas.json
@@ -0,0 +1,26 @@
+{
+ "parameters": {
+ "serviceName": "apimService1",
+ "resourceGroupName": "rg1",
+ "api-version": "2017-03-01",
+ "subscriptionId": "subid",
+ "apiId": "59d5b28d1f7fab116c282650"
+ },
+ "responses": {
+ "200": {
+ "body": {
+ "value": [
+ {
+ "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/59d5b28d1f7fab116c282650/schemas/59d5b28e1f7fab116402044e",
+ "type": "Microsoft.ApiManagement/service/apis/schemas",
+ "name": "59d5b28e1f7fab116402044e",
+ "properties": {
+ "contentType": "application/vnd.ms-azure-apim.swagger.definitions+json"
+ }
+ }
+ ],
+ "nextLink": ""
+ }
+ }
+ }
+}
\ No newline at end of file