Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EventGrid Typespec] Move @internal to client.tsp #23538

Merged
Merged
Show file tree
Hide file tree
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
10 changes: 10 additions & 0 deletions specification/eventgrid/Azure.Messaging.EventGrid/client.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import "@azure-tools/typespec-client-generator-core";
import "./main.tsp";

using Azure.ClientGenerator.Core;

@@internal(Azure.Messaging.EventGrid.CloudEventEvent);
@@internal(Azure.Messaging.EventGrid.ReceiveDetails);
@@internal(Azure.Messaging.EventGrid.PublishBatchOfCloudEvents);
@@internal(Azure.Messaging.EventGrid.PublishCloudEvent);
@@internal(Azure.Messaging.EventGrid.ReceiveBatchOfCloudEvents);
7 changes: 0 additions & 7 deletions specification/eventgrid/Azure.Messaging.EventGrid/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import "@typespec/rest";
import "@typespec/versioning";
import "@azure-tools/typespec-autorest";
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-client-generator-core";

enum ServiceApiVersions {
v2023_06_01_preview: "2023-06-01-preview"
Expand Down Expand Up @@ -48,10 +47,8 @@ namespace Azure.Messaging.EventGrid {
using TypeSpec.Versioning;
using Azure.Core;
using Azure.Core.Foundations;
using Azure.ClientGenerator.Core;

@doc("Properties of an event published to an Azure Messaging EventGrid Namespace topic using the CloudEvent 1.0 Schema.")
@internal
model CloudEventEvent {
@doc("An identifier for the event. The combination of id and source must be unique for each distinct event.")
id: string;
Expand Down Expand Up @@ -97,7 +94,6 @@ namespace Azure.Messaging.EventGrid {
}

@doc("Receive operation details per Cloud Event.")
@internal
model ReceiveDetails {
@doc("The Event Broker details.")
brokerProperties: BrokerProperties;
Expand Down Expand Up @@ -143,7 +139,6 @@ namespace Azure.Messaging.EventGrid {

@doc("Publish Single Cloud Event to namespace topic.")
@route("/topics/{topicName}:publish", {shared: true})
@internal
@post op PublishCloudEvent is Azure.Core.RpcOperation<{
@doc("content type")
@header("content-type")
Expand All @@ -161,7 +156,6 @@ namespace Azure.Messaging.EventGrid {

@doc("Publish Batch of Cloud Events to namespace topic.")
@route("/topics/{topicName}:publish", {shared: true})
@internal
@post op PublishBatchOfCloudEvents is Azure.Core.RpcOperation<{
@doc("content type")
@header("content-type")
Expand All @@ -178,7 +172,6 @@ namespace Azure.Messaging.EventGrid {

@doc("Receive Batch of Cloud Events from the Event Subscription.")
@route("/topics/{topicName}/eventsubscriptions/{eventSubscriptionName}:receive")
@internal
@post op ReceiveBatchOfCloudEvents is Azure.Core.RpcOperation<{
@doc("Topic Name.")
@path
Expand Down