diff --git a/custom-words.txt b/custom-words.txt
index 1480ad5ddb0d..c8fc8175067f 100644
--- a/custom-words.txt
+++ b/custom-words.txt
@@ -104,6 +104,7 @@ apimproperties
apimquotas
apimregions
apimreports
+apimschema
apimsubscriptions
apimtagresources
apimtags
diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/apimanagement.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/apimanagement.json
index b5c09291b632..247c505fe581 100644
--- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/apimanagement.json
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/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/preview/2021-04-01-preview/apimapis.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/apimapis.json
index 95f12fcad9ee..7bb04a782406 100644
--- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/apimapis.json
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/apimapis.json
@@ -2184,7 +2184,7 @@
"200": {
"description": "Apis Schema Collection.",
"schema": {
- "$ref": "./definitions.json#/definitions/SchemaCollection"
+ "$ref": "./definitions.json#/definitions/ApiSchemaCollection"
}
},
"default": {
@@ -2284,7 +2284,7 @@
"200": {
"description": "Api Schema information.",
"schema": {
- "$ref": "./definitions.json#/definitions/SchemaContract"
+ "$ref": "./definitions.json#/definitions/ApiSchemaContract"
},
"headers": {
"ETag": {
@@ -2330,7 +2330,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "./definitions.json#/definitions/SchemaContract"
+ "$ref": "./definitions.json#/definitions/ApiSchemaContract"
},
"description": "The schema contents to apply."
},
@@ -2351,7 +2351,7 @@
"201": {
"description": "Api schema configuration was successfully created.",
"schema": {
- "$ref": "./definitions.json#/definitions/SchemaContract"
+ "$ref": "./definitions.json#/definitions/ApiSchemaContract"
},
"headers": {
"ETag": {
@@ -2363,7 +2363,7 @@
"200": {
"description": "Api schema configuration of the tenant was successfully updated.",
"schema": {
- "$ref": "./definitions.json#/definitions/SchemaContract"
+ "$ref": "./definitions.json#/definitions/ApiSchemaContract"
},
"headers": {
"ETag": {
diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/apimschema.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/apimschema.json
new file mode 100644
index 000000000000..f12b31022fce
--- /dev/null
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/apimschema.json
@@ -0,0 +1,328 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "ApiManagementClient",
+ "description": "Use these REST APIs for performing operations on Schema entity in Azure API Management deployment.",
+ "version": "2021-04-01-preview"
+ },
+ "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": "Schema_ListByService",
+ "description": "Lists a collection of schemas registered with service instance.",
+ "x-ms-examples": {
+ "ApiManagementListSchemas": {
+ "$ref": "./examples/ApiManagementListSchemas.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/SchemaCollection"
+ }
+ },
+ "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/SchemaContract"
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}": {
+ "head": {
+ "tags": [
+ "Schema"
+ ],
+ "operationId": "Schema_GetEntityTag",
+ "description": "Gets the entity state (Etag) version of the Schema specified by its identifier.",
+ "x-ms-examples": {
+ "ApiManagementHeadApi": {
+ "$ref": "./examples/ApiManagementHeadSchema.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": "Schema_Get",
+ "description": "Gets the details of the Schema specified by its identifier.",
+ "x-ms-examples": {
+ "ApiManagementGetSchema1": {
+ "$ref": "./examples/ApiManagementGetSchema1.json"
+ },
+ "ApiManagementGetSchema2": {
+ "$ref": "./examples/ApiManagementGetSchema2.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/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": [
+ "Schema"
+ ],
+ "operationId": "Schema_CreateOrUpdate",
+ "description": "Creates new or updates existing specified Schema of the API Management service instance.",
+ "x-ms-examples": {
+ "ApiManagementCreateSchema1": {
+ "$ref": "./examples/ApiManagementCreateSchema1.json"
+ },
+ "ApiManagementCreateSchema2": {
+ "$ref": "./examples/ApiManagementCreateSchema2.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/SchemaContract"
+ },
+ "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/SchemaContract"
+ }
+ },
+ "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/SchemaContract"
+ }
+ },
+ "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
+ },
+ "delete": {
+ "tags": [
+ "Schema"
+ ],
+ "operationId": "Schema_Delete",
+ "description": "Deletes specific Schema.",
+ "x-ms-examples": {
+ "ApiManagementDeleteSchema": {
+ "$ref": "./examples/ApiManagementDeleteSchema.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/preview/2021-04-01-preview/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/definitions.json
index 41161235a43b..353ef951ed96 100644
--- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/definitions.json
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/definitions.json
@@ -4973,12 +4973,12 @@
],
"description": "Parameters supplied to the Save Tenant Configuration operation."
},
- "SchemaCollection": {
+ "ApiSchemaCollection": {
"properties": {
"value": {
"type": "array",
"items": {
- "$ref": "#/definitions/SchemaContract"
+ "$ref": "#/definitions/ApiSchemaContract"
},
"description": "API Schema Contract value.",
"readOnly": true
@@ -4996,12 +4996,12 @@
},
"description": "The response of the list schema operation."
},
- "SchemaContract": {
+ "ApiSchemaContract": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
- "$ref": "#/definitions/SchemaContractProperties",
- "description": "Properties of the Schema."
+ "$ref": "#/definitions/ApiSchemaContractProperties",
+ "description": "Properties of the API Schema."
}
},
"allOf": [
@@ -5009,9 +5009,9 @@
"$ref": "./../../../../../common-types/resource-management/v2/types.json#/definitions/Resource"
}
],
- "description": "Schema Contract details."
+ "description": "API Schema Contract details."
},
- "SchemaContractProperties": {
+ "ApiSchemaContractProperties": {
"properties": {
"contentType": {
"type": "string",
@@ -5019,8 +5019,8 @@
},
"document": {
"x-ms-client-flatten": true,
- "$ref": "#/definitions/SchemaDocumentProperties",
- "description": "Create or update Properties of the Schema Document."
+ "$ref": "#/definitions/ApiSchemaDocumentProperties",
+ "description": "Create or update Properties of the API Schema Document."
}
},
"required": [
@@ -5028,7 +5028,7 @@
],
"description": "API Schema create or update contract Properties."
},
- "SchemaDocumentProperties": {
+ "ApiSchemaDocumentProperties": {
"properties": {
"value": {
"type": "string",
@@ -5036,13 +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": "Api Schema Document Properties."
+ },
+ "SchemaCollection": {
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/SchemaContract"
+ },
+ "description": "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."
+ },
+ "SchemaContract": {
+ "properties": {
+ "properties": {
+ "x-ms-client-flatten": true,
+ "$ref": "#/definitions/SchemaContractProperties",
+ "description": "Properties of the Schema."
}
},
+ "allOf": [
+ {
+ "$ref": "./../../../../../common-types/resource-management/v2/types.json#/definitions/Resource"
+ }
+ ],
+ "description": "Schema Contract details."
+ },
+ "SchemaContractProperties": {
+ "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": {
+ "type": "string",
+ "description": "Json-encoded string for non json-based schema."
+ },
+ "document": {
+ "x-ms-client-flatten": true,
+ "$ref": "#/definitions/SchemaDocumentProperties",
+ "description": "Schema document object for json-based schema formats(e.g. json schema)."
+ }
+ },
+ "required": [
+ "schemaType"
+ ],
+ "description": "Schema create or update contract Properties."
+ },
+ "SchemaDocumentProperties": {
+ "type": "object",
"description": "Schema Document Properties."
},
"SubscriptionCollection": {
diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementCreateSchema1.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementCreateSchema1.json
new file mode 100644
index 000000000000..10722840ce6f
--- /dev/null
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementCreateSchema1.json
@@ -0,0 +1,47 @@
+{
+ "parameters": {
+ "serviceName": "apimService1",
+ "resourceGroupName": "rg1",
+ "api-version": "2021-04-01-preview",
+ "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-04-01-preview&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/preview/2021-04-01-preview/examples/ApiManagementCreateSchema2.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementCreateSchema2.json
new file mode 100644
index 000000000000..16c1853f34cd
--- /dev/null
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementCreateSchema2.json
@@ -0,0 +1,107 @@
+{
+ "parameters": {
+ "serviceName": "apimService1",
+ "resourceGroupName": "rg1",
+ "api-version": "2021-04-01-preview",
+ "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-04-01-preview&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/preview/2021-04-01-preview/examples/ApiManagementDeleteSchema.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementDeleteSchema.json
new file mode 100644
index 000000000000..fea4f1e3a306
--- /dev/null
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementDeleteSchema.json
@@ -0,0 +1,14 @@
+{
+ "parameters": {
+ "serviceName": "apimService1",
+ "resourceGroupName": "rg1",
+ "api-version": "2021-04-01-preview",
+ "subscriptionId": "subid",
+ "schemaId": "schema1",
+ "If-Match": "*"
+ },
+ "responses": {
+ "200": {},
+ "204": {}
+ }
+}
diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementGetSchema1.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementGetSchema1.json
new file mode 100644
index 000000000000..787f1176176c
--- /dev/null
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementGetSchema1.json
@@ -0,0 +1,23 @@
+{
+ "parameters": {
+ "serviceName": "apimService1",
+ "resourceGroupName": "rg1",
+ "api-version": "2021-04-01-preview",
+ "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/preview/2021-04-01-preview/examples/ApiManagementGetSchema2.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementGetSchema2.json
new file mode 100644
index 000000000000..668296771099
--- /dev/null
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementGetSchema2.json
@@ -0,0 +1,43 @@
+{
+ "parameters": {
+ "serviceName": "apimService1",
+ "resourceGroupName": "rg1",
+ "api-version": "2021-04-01-preview",
+ "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/preview/2021-04-01-preview/examples/ApiManagementHeadSchema.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementHeadSchema.json
new file mode 100644
index 000000000000..9ef6e610f210
--- /dev/null
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementHeadSchema.json
@@ -0,0 +1,16 @@
+{
+ "parameters": {
+ "serviceName": "apimService1",
+ "resourceGroupName": "rg1",
+ "api-version": "2021-04-01-preview",
+ "subscriptionId": "subid",
+ "schemaId": "myschema"
+ },
+ "responses": {
+ "200": {
+ "headers": {
+ "etag": "AAAAAAAAAAa="
+ }
+ }
+ }
+}
diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementListSchemas.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementListSchemas.json
new file mode 100644
index 000000000000..d6f72dc70635
--- /dev/null
+++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementListSchemas.json
@@ -0,0 +1,58 @@
+{
+ "parameters": {
+ "serviceName": "apimService1",
+ "resourceGroupName": "rg1",
+ "api-version": "2021-04-01-preview",
+ "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 dba367e68076..07eba9058b41 100644
--- a/specification/apimanagement/resource-manager/readme.md
+++ b/specification/apimanagement/resource-manager/readme.md
@@ -126,6 +126,7 @@ input-file:
- Microsoft.ApiManagement/preview/2021-04-01-preview/apimquotas.json
- Microsoft.ApiManagement/preview/2021-04-01-preview/apimregions.json
- Microsoft.ApiManagement/preview/2021-04-01-preview/apimreports.json
+ - Microsoft.ApiManagement/preview/2021-04-01-preview/apimschema.json
- Microsoft.ApiManagement/preview/2021-04-01-preview/apimsettings.json
- Microsoft.ApiManagement/preview/2021-04-01-preview/apimskus.json
- Microsoft.ApiManagement/preview/2021-04-01-preview/apimsubscriptions.json
@@ -623,10 +624,6 @@ See configuration in [readme.go.md](./readme.go.md)
See configuration in [readme.java.md](./readme.java.md)
-## AZ
-
-See configuration in [readme.az.md](./readme.az.md)
-
## Suppression
``` yaml
@@ -703,6 +700,9 @@ directive:
- suppress: R4009
from: apimportalrevisions.json
reason: Warning raised to error while PR was being reviewed. SystemData will implement in next preview version.
+ - suppress: R4009
+ from: apimschema.json
+ reason: Warning raised to error while PR was being reviewed. SystemData will implement in next preview version.
- suppress: R4009
from: apimsettings.json
reason: Warning raised to error while PR was being reviewed. SystemData will implement in next preview version.
@@ -724,4 +724,7 @@ directive:
- suppress: R4009
from: apimprivatelink.json
reason: Warning raised to error while PR was being reviewed. SystemData will implement in next preview version.
+ - suppress: R4009
+ from: apimprivatelink.json
+ reason: Warning raised to error while PR was being reviewed. SystemData will implement in next preview version.
```