From 2055e486690504b64a7be0df84df97baec723127 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Mon, 6 Nov 2023 15:47:40 -0800 Subject: [PATCH] [EventGrid] Update generated autorest (#26581) - Continuation of #26425 - Update generate autorest with latest version of TypeSpec packages --- .../stable/2023-11-01/EventGrid.json | 80 +++++++++++++++---- 1 file changed, 66 insertions(+), 14 deletions(-) diff --git a/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2023-11-01/EventGrid.json b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2023-11-01/EventGrid.json index 9b2b6a277171..fc9af99aef21 100644 --- a/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2023-11-01/EventGrid.json +++ b/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2023-11-01/EventGrid.json @@ -55,10 +55,10 @@ "paths": { "/topics/{topicName}:publish": { "post": { - "operationId": "PublishCloudEvents", - "description": "Publish Batch Cloud Event to namespace topic. In case of success, the server responds with an HTTP 200 status code with an empty JSON object in response. Otherwise, the server can return various error codes. For example, 401: which indicates authorization failure, 403: which indicates quota exceeded or message is too large, 410: which indicates that specific topic is not found, 400: for bad request, and 500: for internal server error. ", + "operationId": "PublishCloudEvent", + "description": "Publish Single Cloud Event to namespace topic. In case of success, the server responds with an HTTP 200 status code with an empty JSON object in response. Otherwise, the server can return various error codes. For example, 401: which indicates authorization failure, 403: which indicates quota exceeded or message is too large, 410: which indicates that specific topic is not found, 400: for bad request, and 500: for internal server error. ", "consumes": [ - "application/cloudevents-batch+json; charset=utf-8" + "application/cloudevents+json; charset=utf-8" ], "parameters": [ { @@ -72,15 +72,12 @@ "type": "string" }, { - "name": "events", + "name": "event", "in": "body", - "description": "Array of Cloud Events being published.", + "description": "Single Cloud Event being published.", "required": true, "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudEvent" - } + "$ref": "#/definitions/CloudEvent" } } ], @@ -103,11 +100,6 @@ } } } - }, - "x-ms-examples": { - "Publish Cloud Event": { - "$ref": "./examples/publish.json" - } } } }, @@ -358,6 +350,66 @@ } } }, + "x-ms-paths": { + "/topics/{topicName}:publish?_overload=publishCloudEvents": { + "post": { + "operationId": "PublishCloudEvents", + "description": "Publish Batch Cloud Event to namespace topic. In case of success, the server responds with an HTTP 200 status code with an empty JSON object in response. Otherwise, the server can return various error codes. For example, 401: which indicates authorization failure, 403: which indicates quota exceeded or message is too large, 410: which indicates that specific topic is not found, 400: for bad request, and 500: for internal server error. ", + "consumes": [ + "application/cloudevents-batch+json; charset=utf-8" + ], + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "topicName", + "in": "path", + "description": "Topic Name.", + "required": true, + "type": "string" + }, + { + "name": "events", + "in": "body", + "description": "Array of Cloud Events being published.", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudEvent" + } + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PublishResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Publish Cloud Event": { + "$ref": "./examples/publish.json" + } + } + } + } + }, "definitions": { "AcknowledgeOptions": { "type": "object",