diff --git a/specification/schemaregistry/data-plane/Microsoft.EventHub/stable/2021-10/examples/OperationSchema_QueryIdByContent.json b/specification/schemaregistry/data-plane/Microsoft.EventHub/stable/2021-10/examples/OperationSchema_QueryIdByContent.json index 41d8d68d871c..7194f8a6da95 100644 --- a/specification/schemaregistry/data-plane/Microsoft.EventHub/stable/2021-10/examples/OperationSchema_QueryIdByContent.json +++ b/specification/schemaregistry/data-plane/Microsoft.EventHub/stable/2021-10/examples/OperationSchema_QueryIdByContent.json @@ -17,6 +17,16 @@ "Schema-Version": 3 } }, - "415": {} + "415": { + "headers": { + "x-ms-error-code": "InvalidSchemaType" + }, + "body": { + "error": { + "code": "InvalidSchemaType", + "message": "Invalid schema type for POST request. 'not-valid' is not supported. TrackingId:7fe9dcfb-0fca-4ab2-9beb-473aa5fe6406_G23, SystemTracker:endpoint:$schemaGroups/sample-sr-group/schemas/sample-schema-name:get-id, Timestamp:2021-11-10T07:53:32" + } + } + } } } diff --git a/specification/schemaregistry/data-plane/Microsoft.EventHub/stable/2021-10/examples/OperationSchema_Register.json b/specification/schemaregistry/data-plane/Microsoft.EventHub/stable/2021-10/examples/OperationSchema_Register.json index 41d8d68d871c..e35597f1d9fb 100644 --- a/specification/schemaregistry/data-plane/Microsoft.EventHub/stable/2021-10/examples/OperationSchema_Register.json +++ b/specification/schemaregistry/data-plane/Microsoft.EventHub/stable/2021-10/examples/OperationSchema_Register.json @@ -17,6 +17,16 @@ "Schema-Version": 3 } }, - "415": {} + "415": { + "headers": { + "x-ms-error-code": "InvalidSchemaType" + }, + "body": { + "error": { + "code": "InvalidSchemaType", + "message": "Invalid schema type for PUT request. 'not-valid' is not supported. TrackingId:a20c52d6-9818-4748-b91a-aad9ca35212e_G23, SystemTracker:endpoint:$schemaGroups/sample-sr-group/schemas/sample-schema-name, Timestamp:2021-11-10T07:53:30" + } + } + } } } diff --git a/specification/schemaregistry/data-plane/Microsoft.EventHub/stable/2021-10/schemaregistry.json b/specification/schemaregistry/data-plane/Microsoft.EventHub/stable/2021-10/schemaregistry.json index 99a916620bd9..6201347d8621 100644 --- a/specification/schemaregistry/data-plane/Microsoft.EventHub/stable/2021-10/schemaregistry.json +++ b/specification/schemaregistry/data-plane/Microsoft.EventHub/stable/2021-10/schemaregistry.json @@ -169,13 +169,7 @@ "type": "string" }, { - "name": "schemaName", - "in": "path", - "description": "Name of schema being registered.", - "required": true, - "type": "string", - "maxLength": 50, - "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]*$" + "$ref": "#/parameters/SchemaName" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -228,13 +222,7 @@ "type": "string" }, { - "name": "schemaName", - "in": "path", - "description": "Name of requested schema.", - "required": true, - "type": "string", - "maxLength": 50, - "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]*$" + "$ref": "#/parameters/SchemaName" }, { "name": "schemaContent", @@ -281,7 +269,17 @@ } }, "415": { - "description": "Unsupported Media Type - Content type of the supplied schema is unsupported by schema group." + "description": "Unsupported Media Type - Content type of the supplied schema is unsupported by schema group.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, + "schema": { + "$ref": "#/definitions/Error" + }, + "x-ms-error-response": true }, "default": { "description": "An error response received from the Azure Schema Registry service.", @@ -323,13 +321,7 @@ "type": "string" }, { - "name": "schemaName", - "in": "path", - "description": "Name of schema being registered.", - "required": true, - "type": "string", - "maxLength": 50, - "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]*$" + "$ref": "#/parameters/SchemaName" }, { "name": "schemaContent", @@ -376,7 +368,17 @@ } }, "415": { - "description": "Unsupported Media Type - Content type of the supplied schema is unsupported by schema group." + "description": "Unsupported Media Type - Content type of the supplied schema is unsupported by schema group.", + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "Error code for specific error that occurred." + } + }, + "schema": { + "$ref": "#/definitions/Error" + }, + "x-ms-error-response": true }, "default": { "description": "An error response received from the Azure Schema Registry service.", @@ -492,6 +494,16 @@ "in": "path", "x-ms-skip-url-encoding": true, "x-ms-parameter-location": "client" + }, + "SchemaName": { + "name": "schemaName", + "in": "path", + "description": "Name of schema.", + "required": true, + "type": "string", + "maxLength": 50, + "pattern": "^[A-Za-z0-9][^\\\\/$:]*$", + "x-ms-parameter-location": "method" } } }