diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/apimanagement.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/apimanagement.json
index 2903909d050f..9a9d03d842f6 100644
--- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/apimanagement.json
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/apimanagement.json
@@ -607,17 +607,6 @@
"description": "The name of the resource group.",
"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": 80,
- "pattern": "^[^*#&+:<>?]+$",
- "x-ms-parameter-location": "method"
- },
"ServiceNameParameter": {
"name": "serviceName",
"in": "path",
@@ -765,6 +754,16 @@
"minLength": 1,
"maxLength": 80,
"x-ms-parameter-location": "method"
+ },
+ "SchemaIdParameter": {
+ "name": "schemaId",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Schema id identifier. Must be unique in the current API Management service instance.",
+ "minLength": 1,
+ "maxLength": 80,
+ "x-ms-parameter-location": "method"
}
}
}
diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/apimschema.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/apimschema.json
new file mode 100644
index 000000000000..d071e9d07e30
--- /dev/null
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/apimschema.json
@@ -0,0 +1,331 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "ApiManagementClient",
+ "description": "Use these REST APIs for performing operations on Schema entity in Azure API Management deployment.",
+ "version": "2021-08-01"
+ },
+ "host": "management.azure.com",
+ "schemes": [
+ "https"
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "security": [
+ {
+ "azure_auth": [
+ "user_impersonation"
+ ]
+ }
+ ],
+ "securityDefinitions": {
+ "azure_auth": {
+ "type": "oauth2",
+ "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
+ "flow": "implicit",
+ "description": "Azure Active Directory OAuth2 Flow.",
+ "scopes": {
+ "user_impersonation": "impersonate your user account"
+ }
+ }
+ },
+ "paths": {
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas": {
+ "get": {
+ "tags": [
+ "Schema"
+ ],
+ "operationId": "GlobalSchema_ListByService",
+ "description": "Lists a collection of schemas registered with service instance.",
+ "x-ms-examples": {
+ "ApiManagementListSchemas": {
+ "$ref": "./examples/ApiManagementListGlobalSchemas.json"
+ }
+ },
+ "parameters": [
+ {
+ "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
+ },
+ {
+ "name": "$filter",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "description": "| Field | Usage | Supported operators | Supported functions ||-------------|-------------|-------------|-------------|| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/TopQueryParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Lists a collection of Schema entities.",
+ "schema": {
+ "$ref": "./definitions.json#/definitions/GlobalSchemaCollection"
+ }
+ },
+ "default": {
+ "description": "Error response describing why the operation failed.",
+ "schema": {
+ "$ref": "./apimanagement.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-pageable": {
+ "nextLinkName": "nextLink"
+ },
+ "x-ms-odata": "./definitions.json#/definitions/GlobalSchemaContract"
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}": {
+ "head": {
+ "tags": [
+ "Schema"
+ ],
+ "operationId": "GlobalSchema_GetEntityTag",
+ "description": "Gets the entity state (Etag) version of the Schema specified by its identifier.",
+ "x-ms-examples": {
+ "ApiManagementHeadApi": {
+ "$ref": "./examples/ApiManagementHeadGlobalSchema.json"
+ }
+ },
+ "parameters": [
+ {
+ "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/SchemaIdParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Specified Schema entity exists and current entity state version is present in the ETag header.",
+ "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"
+ }
+ }
+ }
+ },
+ "get": {
+ "tags": [
+ "Schema"
+ ],
+ "operationId": "GlobalSchema_Get",
+ "description": "Gets the details of the Schema specified by its identifier.",
+ "x-ms-examples": {
+ "ApiManagementGetSchema1": {
+ "$ref": "./examples/ApiManagementGetGlobalSchema1.json"
+ },
+ "ApiManagementGetSchema2": {
+ "$ref": "./examples/ApiManagementGetGlobalSchema2.json"
+ }
+ },
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/SchemaIdParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The response body contains the specified Schema entity.",
+ "schema": {
+ "$ref": "./definitions.json#/definitions/GlobalSchemaContract"
+ },
+ "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": [
+ "Schema"
+ ],
+ "operationId": "GlobalSchema_CreateOrUpdate",
+ "description": "Creates new or updates existing specified Schema of the API Management service instance.",
+ "x-ms-examples": {
+ "ApiManagementCreateSchema1": {
+ "$ref": "./examples/ApiManagementCreateGlobalSchema1.json"
+ },
+ "ApiManagementCreateSchema2": {
+ "$ref": "./examples/ApiManagementCreateGlobalSchema2.json"
+ }
+ },
+ "parameters": [
+ {
+ "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/SchemaIdParameter"
+ },
+ {
+ "name": "parameters",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "./definitions.json#/definitions/GlobalSchemaContract"
+ },
+ "description": "Create or update parameters."
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "The new Schema was successfully added.",
+ "headers": {
+ "ETag": {
+ "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
+ "type": "string"
+ }
+ },
+ "schema": {
+ "$ref": "./definitions.json#/definitions/GlobalSchemaContract"
+ }
+ },
+ "200": {
+ "description": "The Schema details were successfully updated.",
+ "headers": {
+ "ETag": {
+ "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
+ "type": "string"
+ }
+ },
+ "schema": {
+ "$ref": "./definitions.json#/definitions/GlobalSchemaContract"
+ }
+ },
+ "202": {
+ "description": "Accepted the change when updating the service."
+ },
+ "default": {
+ "description": "Error response describing why the operation failed.",
+ "schema": {
+ "$ref": "./apimanagement.json#/definitions/ErrorResponse"
+ }
+ }
+ },
+ "x-ms-long-running-operation": true,
+ "x-ms-long-running-operation-options": {
+ "final-state-via": "location"
+ }
+ },
+ "delete": {
+ "tags": [
+ "Schema"
+ ],
+ "operationId": "GlobalSchema_Delete",
+ "description": "Deletes specific Schema.",
+ "x-ms-examples": {
+ "ApiManagementDeleteSchema": {
+ "$ref": "./examples/ApiManagementDeleteGlobalSchema.json"
+ }
+ },
+ "parameters": [
+ {
+ "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/SchemaIdParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The Schema was successfully deleted."
+ },
+ "204": {
+ "description": "The Schema was successfully deleted."
+ },
+ "default": {
+ "description": "Error response describing why the operation failed.",
+ "schema": {
+ "$ref": "./apimanagement.json#/definitions/ErrorResponse"
+ }
+ }
+ }
+ }
+ }
+ },
+ "definitions": {},
+ "parameters": {}
+}
diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/definitions.json
index b49a35b974b7..8f7c9e174b96 100644
--- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/definitions.json
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/definitions.json
@@ -5001,7 +5001,7 @@
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/SchemaContractProperties",
- "description": "Properties of the Schema."
+ "description": "Properties of the API Schema."
}
},
"allOf": [
@@ -5009,7 +5009,7 @@
"$ref": "./../../../../../common-types/resource-management/v2/types.json#/definitions/Resource"
}
],
- "description": "Schema Contract details."
+ "description": "API Schema Contract details."
},
"SchemaContractProperties": {
"properties": {
@@ -5020,7 +5020,7 @@
"document": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/SchemaDocumentProperties",
- "description": "Create or update Properties of the Schema Document."
+ "description": "Create or update Properties of the API Schema Document."
}
},
"required": [
@@ -5036,14 +5036,101 @@
},
"definitions": {
"type": "object",
- "description": "Types definitions. Used for OpenAPI v2 (Swagger) schemas only, null otherwise."
+ "description": "Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise."
},
"components": {
"type": "object",
- "description": "Types definitions. Used for OpenAPI v3 schemas only, null otherwise."
+ "description": "Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise."
}
},
- "description": "Schema Document Properties."
+ "description": "Api Schema Document Properties."
+ },
+ "GlobalSchemaCollection": {
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/GlobalSchemaContract"
+ },
+ "description": "Global Schema Contract value.",
+ "readOnly": true
+ },
+ "count": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Total record count number."
+ },
+ "nextLink": {
+ "type": "string",
+ "description": "Next page link if any.",
+ "readOnly": true
+ }
+ },
+ "description": "The response of the list schema operation."
+ },
+ "GlobalSchemaContract": {
+ "properties": {
+ "properties": {
+ "x-ms-client-flatten": true,
+ "$ref": "#/definitions/GlobalSchemaContractProperties",
+ "description": "Properties of the Global Schema."
+ }
+ },
+ "allOf": [
+ {
+ "$ref": "./../../../../../common-types/resource-management/v2/types.json#/definitions/Resource"
+ }
+ ],
+ "description": "Global Schema Contract details."
+ },
+ "GlobalSchemaContractProperties": {
+ "properties": {
+ "schemaType": {
+ "type": "string",
+ "description": "Schema Type. Immutable.",
+ "enum": [
+ "xml",
+ "json"
+ ],
+ "x-ms-client-name": "SchemaType",
+ "x-ms-enum": {
+ "name": "SchemaType",
+ "modelAsString": true,
+ "values": [
+ {
+ "value": "xml",
+ "description": "Xml schema type.",
+ "name": "Xml"
+ },
+ {
+ "value": "json",
+ "description": "Json schema type.",
+ "name": "Json"
+ }
+ ]
+ }
+ },
+ "description": {
+ "type": "string",
+ "description": "Free-form schema entity description."
+ },
+ "value": {
+ "description": "Json-encoded string for non json-based schema."
+ },
+ "document": {
+ "x-ms-client-flatten": true,
+ "$ref": "#/definitions/GlobalSchemaDocumentProperties",
+ "description": "Global Schema document object for json-based schema formats(e.g. json schema)."
+ }
+ },
+ "required": [
+ "schemaType"
+ ],
+ "description": "Schema create or update contract Properties."
+ },
+ "GlobalSchemaDocumentProperties": {
+ "type": "object",
+ "description": "Global Schema Document Properties."
},
"SubscriptionCollection": {
"properties": {
diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGlobalSchema1.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGlobalSchema1.json
new file mode 100644
index 000000000000..ef34ad1f2c6f
--- /dev/null
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGlobalSchema1.json
@@ -0,0 +1,47 @@
+{
+ "parameters": {
+ "serviceName": "apimService1",
+ "resourceGroupName": "rg1",
+ "api-version": "2021-08-01",
+ "subscriptionId": "subid",
+ "schemaId": "schema1",
+ "parameters": {
+ "properties": {
+ "description": "sample schema description",
+ "schemaType": "xml",
+ "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"
+ }
+ }
+ },
+ "responses": {
+ "202": {
+ "headers": {
+ "location": "https://management.azure.com/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201"
+ }
+ },
+ "201": {
+ "body": {
+ "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1",
+ "type": "Microsoft.ApiManagement/service/schemas",
+ "name": "schema1",
+ "properties": {
+ "description": "sample schema description",
+ "schemaType": "xml",
+ "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"
+ }
+ }
+ },
+ "200": {
+ "body": {
+ "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1",
+ "type": "Microsoft.ApiManagement/service/schemas",
+ "name": "schema1",
+ "properties": {
+ "description": "sample schema description",
+ "schemaType": "xml",
+ "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"
+ }
+ }
+ }
+ }
+}
diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGlobalSchema2.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGlobalSchema2.json
new file mode 100644
index 000000000000..5942d1fd3852
--- /dev/null
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGlobalSchema2.json
@@ -0,0 +1,107 @@
+{
+ "parameters": {
+ "serviceName": "apimService1",
+ "resourceGroupName": "rg1",
+ "api-version": "2021-08-01",
+ "subscriptionId": "subid",
+ "schemaId": "schema1",
+ "parameters": {
+ "properties": {
+ "description": "sample schema description",
+ "schemaType": "json",
+ "document": {
+ "$id": "https://example.com/person.schema.json",
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "title": "Person",
+ "type": "object",
+ "properties": {
+ "firstName": {
+ "type": "string",
+ "description": "The person's first name."
+ },
+ "lastName": {
+ "type": "string",
+ "description": "The person's last name."
+ },
+ "age": {
+ "description": "Age in years which must be equal to or greater than zero.",
+ "type": "integer",
+ "minimum": 0
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "202": {
+ "headers": {
+ "location": "https://management.azure.com/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201"
+ }
+ },
+ "201": {
+ "body": {
+ "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1",
+ "type": "Microsoft.ApiManagement/service/schemas",
+ "name": "schema1",
+ "properties": {
+ "description": "sample schema description",
+ "schemaType": "json",
+ "document": {
+ "$id": "https://example.com/person.schema.json",
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "title": "Person",
+ "type": "object",
+ "properties": {
+ "firstName": {
+ "type": "string",
+ "description": "The person's first name."
+ },
+ "lastName": {
+ "type": "string",
+ "description": "The person's last name."
+ },
+ "age": {
+ "description": "Age in years which must be equal to or greater than zero.",
+ "type": "integer",
+ "minimum": 0
+ }
+ }
+ }
+ }
+ }
+ },
+ "200": {
+ "body": {
+ "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1",
+ "type": "Microsoft.ApiManagement/service/schemas",
+ "name": "schema1",
+ "properties": {
+ "description": "sample schema description",
+ "schemaType": "json",
+ "document": {
+ "$id": "https://example.com/person.schema.json",
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "title": "Person",
+ "type": "object",
+ "properties": {
+ "firstName": {
+ "type": "string",
+ "description": "The person's first name."
+ },
+ "lastName": {
+ "type": "string",
+ "description": "The person's last name."
+ },
+ "age": {
+ "description": "Age in years which must be equal to or greater than zero.",
+ "type": "integer",
+ "minimum": 0
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteGlobalSchema.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteGlobalSchema.json
new file mode 100644
index 000000000000..fcb01b494eb9
--- /dev/null
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteGlobalSchema.json
@@ -0,0 +1,14 @@
+{
+ "parameters": {
+ "serviceName": "apimService1",
+ "resourceGroupName": "rg1",
+ "api-version": "2021-08-01",
+ "subscriptionId": "subid",
+ "schemaId": "schema1",
+ "If-Match": "*"
+ },
+ "responses": {
+ "200": {},
+ "204": {}
+ }
+}
diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGlobalSchema1.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGlobalSchema1.json
new file mode 100644
index 000000000000..bf41871406d3
--- /dev/null
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGlobalSchema1.json
@@ -0,0 +1,23 @@
+{
+ "parameters": {
+ "serviceName": "apimService1",
+ "resourceGroupName": "rg1",
+ "api-version": "2021-08-01",
+ "subscriptionId": "subid",
+ "schemaId": "schema1"
+ },
+ "responses": {
+ "200": {
+ "body": {
+ "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1",
+ "type": "Microsoft.ApiManagement/service/schemas",
+ "name": "schema1",
+ "properties": {
+ "description": "sample schema description",
+ "schemaType": "xml",
+ "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"
+ }
+ }
+ }
+ }
+}
diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGlobalSchema2.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGlobalSchema2.json
new file mode 100644
index 000000000000..df993b696ebc
--- /dev/null
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGlobalSchema2.json
@@ -0,0 +1,43 @@
+{
+ "parameters": {
+ "serviceName": "apimService1",
+ "resourceGroupName": "rg1",
+ "api-version": "2021-08-01",
+ "subscriptionId": "subid",
+ "schemaId": "schema2"
+ },
+ "responses": {
+ "200": {
+ "body": {
+ "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema2",
+ "type": "Microsoft.ApiManagement/service/schemas",
+ "name": "schema2",
+ "properties": {
+ "description": "sample schema description",
+ "schemaType": "json",
+ "document": {
+ "$id": "https://example.com/person.schema.json",
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "title": "Person",
+ "type": "object",
+ "properties": {
+ "firstName": {
+ "type": "string",
+ "description": "The person's first name."
+ },
+ "lastName": {
+ "type": "string",
+ "description": "The person's last name."
+ },
+ "age": {
+ "description": "Age in years which must be equal to or greater than zero.",
+ "type": "integer",
+ "minimum": 0
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadGlobalSchema.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadGlobalSchema.json
new file mode 100644
index 000000000000..1210e40ca6b5
--- /dev/null
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadGlobalSchema.json
@@ -0,0 +1,16 @@
+{
+ "parameters": {
+ "serviceName": "apimService1",
+ "resourceGroupName": "rg1",
+ "api-version": "2021-08-01",
+ "subscriptionId": "subid",
+ "schemaId": "myschema"
+ },
+ "responses": {
+ "200": {
+ "headers": {
+ "etag": "AAAAAAAAAAa="
+ }
+ }
+ }
+}
diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListGlobalSchemas.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListGlobalSchemas.json
new file mode 100644
index 000000000000..382414d43044
--- /dev/null
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListGlobalSchemas.json
@@ -0,0 +1,58 @@
+{
+ "parameters": {
+ "serviceName": "apimService1",
+ "resourceGroupName": "rg1",
+ "api-version": "2021-08-01",
+ "subscriptionId": "subid"
+ },
+ "responses": {
+ "200": {
+ "body": {
+ "value": [
+ {
+ "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1",
+ "type": "Microsoft.ApiManagement/service/schemas",
+ "name": "schema1",
+ "properties": {
+ "description": "sample schema description",
+ "schemaType": "xml",
+ "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"
+ }
+ },
+ {
+ "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema2",
+ "type": "Microsoft.ApiManagement/service/schemas",
+ "name": "schema2",
+ "properties": {
+ "description": "sample schema description",
+ "schemaType": "json",
+ "document": {
+ "$id": "https://example.com/person.schema.json",
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "title": "Person",
+ "type": "object",
+ "properties": {
+ "firstName": {
+ "type": "string",
+ "description": "The person's first name."
+ },
+ "lastName": {
+ "type": "string",
+ "description": "The person's last name."
+ },
+ "age": {
+ "description": "Age in years which must be equal to or greater than zero.",
+ "type": "integer",
+ "minimum": 0
+ }
+ }
+ }
+ }
+ }
+ ],
+ "count": 2,
+ "nextLink": ""
+ }
+ }
+ }
+}
diff --git a/specification/apimanagement/resource-manager/readme.md b/specification/apimanagement/resource-manager/readme.md
index 07eba9058b41..95f7b6e16885 100644
--- a/specification/apimanagement/resource-manager/readme.md
+++ b/specification/apimanagement/resource-manager/readme.md
@@ -78,6 +78,7 @@ input-file:
- Microsoft.ApiManagement/stable/2021-08-01/apimquotas.json
- Microsoft.ApiManagement/stable/2021-08-01/apimregions.json
- Microsoft.ApiManagement/stable/2021-08-01/apimreports.json
+ - Microsoft.ApiManagement/stable/2021-08-01/apimschema.json
- Microsoft.ApiManagement/stable/2021-08-01/apimsettings.json
- Microsoft.ApiManagement/stable/2021-08-01/apimskus.json
- Microsoft.ApiManagement/stable/2021-08-01/apimsubscriptions.json