Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions specification/eventgrid/Azure.Messaging.EventGrid/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -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<ApiKeyLocation.header, "SharedAccessKey">
)
Expand Down Expand Up @@ -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.")
Expand Down Expand Up @@ -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")
Expand Down