diff --git a/specification/eventgrid/Azure.Messaging.EventGrid/main.tsp b/specification/eventgrid/Azure.Messaging.EventGrid/main.tsp index 9af6f29d3450..02b9dd348e95 100644 --- a/specification/eventgrid/Azure.Messaging.EventGrid/main.tsp +++ b/specification/eventgrid/Azure.Messaging.EventGrid/main.tsp @@ -3,10 +3,6 @@ import "@typespec/rest"; import "@typespec/versioning"; import "@azure-tools/typespec-azure-core"; -enum ServiceApiVersions { - v2023_06_01_preview: "2023-06-01-preview" -} - @useAuth( ApiKeyAuth ) @@ -43,6 +39,11 @@ namespace Azure.Messaging.EventGrid { using Azure.Core; using Azure.Core.Foundations; + enum ServiceApiVersions { + @useDependency(Azure.Core.Versions.v1_0_Preview_2) + v2023_06_01_preview: "2023-06-01-preview" + } + @doc("Properties of an event published to an Azure Messaging EventGrid Namespace topic using the CloudEvent 1.0 Schema.") model CloudEvent { @doc("An identifier for the event. The combination of id and source must be unique for each distinct event.") @@ -180,7 +181,8 @@ namespace Azure.Messaging.EventGrid { }, PublishResult>; - @doc("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. ") @route("/topics/{topicName}:publish", {shared: true}) + @doc("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. ") + @route("/topics/{topicName}:publish", {shared: true}) @post op PublishCloudEvents is Azure.Core.RpcOperation<{ @doc("content type") @header("content-type")