Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
d7284df
[Do not Merge] Eventgrid to CADL (#19819)
rakshith91 Nov 3, 2022
1a9c0c8
updating healthcare api enum for cadl
l0lawrence Nov 7, 2022
0ad7d1a
change number in Maps.cadl to float64
l0lawrence Nov 7, 2022
3564397
changing Map<k,V> to Record<V>
l0lawrence Nov 7, 2022
6191b61
update service title and version for healthcareapi
l0lawrence Nov 15, 2022
02a5366
fix containerregistry
l0lawrence Nov 17, 2022
40afdc0
container registry updated
l0lawrence Nov 28, 2022
aa8343f
updating container service cadl
l0lawrence Nov 28, 2022
9a146ed
eventgrid service version
l0lawrence Nov 28, 2022
c133524
eventhub cadl service version
l0lawrence Nov 28, 2022
0326639
healthcare api cadl
l0lawrence Nov 28, 2022
b5daefb
iothub cadl
l0lawrence Nov 28, 2022
186f053
keyvault cadl
l0lawrence Nov 28, 2022
5174820
machine learning cadl
l0lawrence Nov 29, 2022
6480ba5
maps cadl
l0lawrence Nov 29, 2022
7c0c300
policyInsights cadl
l0lawrence Nov 29, 2022
fd56f85
redis cache cadl
l0lawrence Nov 29, 2022
2cc082b
resources cadl
l0lawrence Nov 29, 2022
2728b33
servicebus cadl
l0lawrence Nov 29, 2022
6a71398
signalRservice cadl
l0lawrence Nov 29, 2022
69ed0fe
web cadl -- may need improvements
l0lawrence Nov 29, 2022
6e69f1e
updating cadl inheritance story
l0lawrence Dec 2, 2022
62e6dc2
made a remove an add on communication
l0lawrence Dec 2, 2022
b5a4bf8
trying 2 namespaces
l0lawrence Dec 2, 2022
ebd117b
cleaning up container
l0lawrence Dec 2, 2022
4002746
2nd anmespace for baseevent container
l0lawrence Dec 2, 2022
36bc57b
adding in docs to healthcare cadl
l0lawrence Dec 2, 2022
84f3405
add doc for healthcareresourcetype enum
l0lawrence Dec 2, 2022
63b2367
save recent
l0lawrence Dec 3, 2022
1c9ca89
two namespaces mediaservices
l0lawrence Dec 3, 2022
e3000d1
policy insights 2 namespaces
l0lawrence Dec 3, 2022
0856ceb
two namespaces resources
l0lawrence Dec 3, 2022
0808996
two namespaces sb
l0lawrence Dec 3, 2022
2b0c100
2 namespace signalr
l0lawrence Dec 3, 2022
e5a85c6
storage 2 namespaces
l0lawrence Dec 4, 2022
89f640e
2 namespaces web cadl
l0lawrence Dec 4, 2022
da3f901
ran prettier on cadl
l0lawrence Dec 6, 2022
a46b210
working on adding publish to EG cadl
l0lawrence Dec 6, 2022
742752a
updating EG cadl
l0lawrence Dec 6, 2022
0970042
updated cadl version
l0lawrence Dec 7, 2022
c741509
remove service
l0lawrence Dec 9, 2022
85de2ed
remove repo level files
l0lawrence Dec 9, 2022
bfbfe31
changing baseEvents to alias
l0lawrence Dec 12, 2022
be8bacd
adding evnetgrid subnamespace to all files
l0lawrence Dec 13, 2022
842f647
inital generated swagger files from cadl
l0lawrence Dec 19, 2022
f3c8ca4
generation step initial
l0lawrence Dec 19, 2022
19d4e18
generation step initial2
l0lawrence Dec 19, 2022
35ea75f
changing gen steps
l0lawrence Dec 20, 2022
9182432
change extends to spread
l0lawrence Dec 21, 2022
02294ac
added in apimanagementgateway to cadl
l0lawrence Jan 21, 2023
cdd1126
cadl databox
l0lawrence Jan 21, 2023
034493e
updating cadl to align with public client
l0lawrence Feb 16, 2023
a669945
adding auth and apiversion fix
l0lawrence Feb 16, 2023
1ed3972
adding cadl output and operations file to show overlaod
l0lawrence Feb 17, 2023
2247408
overload?
l0lawrence Feb 17, 2023
4d0dc44
eg
l0lawrence Feb 17, 2023
4dd8329
try overlaod again
l0lawrence Feb 17, 2023
af79213
save here try to see why models are not showing
l0lawrence Feb 17, 2023
3d466e7
save
l0lawrence Feb 17, 2023
8e882fd
generalevent publish function
l0lawrence Feb 17, 2023
13d4832
shared route
l0lawrence Mar 14, 2023
04de999
remove commented code
l0lawrence Mar 14, 2023
50b2542
rename to typespec
l0lawrence Mar 15, 2023
d935fe5
eventgrid updates
l0lawrence Mar 15, 2023
bce4065
update format
l0lawrence May 23, 2023
ffb0086
refactoring
l0lawrence Jun 1, 2023
6780e3e
zonedDateTime to utcDateTime
l0lawrence Jun 1, 2023
6e6d95e
update eg versioning
l0lawrence Jun 1, 2023
80716b4
remove unused folders
l0lawrence Jun 1, 2023
af10c65
update eg tsp
l0lawrence Jun 1, 2023
4d05fc3
fix web warnings
l0lawrence Jun 1, 2023
563a818
storage warnings
l0lawrence Jun 1, 2023
8ce62b7
fix signalr warnings
l0lawrence Jun 1, 2023
62e60c5
addressing warnings
l0lawrence Jun 2, 2023
a878da6
update warnings
l0lawrence Jun 2, 2023
60bfe3d
typespec openapi.json
l0lawrence Jun 2, 2023
35d54d5
addressed warnings
l0lawrence Jun 2, 2023
4315099
gen swagger to compare
l0lawrence Jun 2, 2023
c468b0d
update format
l0lawrence Jun 2, 2023
76c28e4
update mapping script
l0lawrence Jun 5, 2023
cd0fbb8
updates
l0lawrence Jun 5, 2023
f57a117
fix appconfig
l0lawrence Jun 5, 2023
37faf55
update ACS
l0lawrence Jun 5, 2023
0f15f0e
update containerservice
l0lawrence Jun 5, 2023
ea018e9
regen and edits
l0lawrence Jun 5, 2023
9c53b11
update databox
l0lawrence Jun 5, 2023
3583182
update script
l0lawrence Jun 5, 2023
95c1585
update healthcare
l0lawrence Jun 5, 2023
51e0fcd
iothub
l0lawrence Jun 6, 2023
2be3ea7
updating mapping script
l0lawrence Jun 6, 2023
3e95515
update ref
l0lawrence Jun 6, 2023
592d75b
enum doc .45
l0lawrence Jun 8, 2023
1ac8ff6
update to valueof string
l0lawrence Jun 8, 2023
b52b383
update preview tag
l0lawrence Jun 8, 2023
92fa68c
extra period appconfig
l0lawrence Jun 9, 2023
be0b4a1
update communication tsp
l0lawrence Jun 9, 2023
2429175
update containerservice
l0lawrence Jun 9, 2023
41798fe
update databox
l0lawrence Jun 9, 2023
882ba7b
iohtub upstate
l0lawrence Jun 9, 2023
ef4cdee
update healthcareAPis
l0lawrence Jun 9, 2023
07cf40a
media services read visb
l0lawrence Jun 9, 2023
55dff1f
add storage events
l0lawrence Jun 9, 2023
ab33599
refactor EG
l0lawrence Jun 9, 2023
8be624e
changed integer to int64
l0lawrence Jun 12, 2023
5670db2
int64
l0lawrence Jun 12, 2023
1f6bdc9
update readme
l0lawrence Jun 15, 2023
fa5347b
move location of tsp-config for generation
l0lawrence Aug 4, 2023
d7f9e6a
updates for gen testing
l0lawrence Aug 4, 2023
bc590a9
tsp format
l0lawrence Aug 4, 2023
070ab8c
blank line
l0lawrence Aug 7, 2023
6ea36dd
delete gen file
l0lawrence Aug 7, 2023
431e92d
changes
l0lawrence Aug 9, 2023
9882eac
add script
l0lawrence Aug 9, 2023
670be36
update import
l0lawrence Aug 9, 2023
03c4473
update
l0lawrence Aug 9, 2023
39fa279
update client
l0lawrence Aug 9, 2023
61ab8e7
add tsp
l0lawrence Aug 9, 2023
fe43c3e
remove autorest import
l0lawrence Aug 9, 2023
a6b98f9
iotHub update
l0lawrence Aug 10, 2023
ce5c985
typo viop -> voip
l0lawrence Aug 10, 2023
a560607
update int type
l0lawrence Aug 11, 2023
5b5217f
update type
l0lawrence Aug 11, 2023
e361e8c
eventhub int32
l0lawrence Aug 11, 2023
202b1a9
update maps
l0lawrence Aug 11, 2023
c32874f
update tsp
l0lawrence Aug 14, 2023
d81ab41
update auth
l0lawrence Aug 14, 2023
78d5e68
add eg system events
l0lawrence Aug 22, 2023
3d3efff
remove excess models
l0lawrence Aug 23, 2023
d664245
work on versioning -- part 1
l0lawrence Aug 23, 2023
9ce42b5
generate only eventgrid sys events
l0lawrence Aug 24, 2023
f65f9c5
typspec sys events
l0lawrence Aug 24, 2023
3b091db
remove uneeded import
l0lawrence Aug 28, 2023
0a54853
tsp format
l0lawrence Sep 7, 2023
b5cc3de
add doc
l0lawrence Sep 7, 2023
e588980
add app config models
l0lawrence Sep 7, 2023
188fc86
mark internal for gen of v1
l0lawrence Sep 8, 2023
5434b48
Revert "mark internal for gen of v1"
l0lawrence Sep 11, 2023
b2d9d24
@usage
l0lawrence Sep 11, 2023
383611e
add ACS event change
l0lawrence Sep 13, 2023
dbc5280
use @usage
l0lawrence Sep 13, 2023
ca2cbdd
move systemEvents into preview version for compile
l0lawrence Sep 13, 2023
ac08b85
update to just output
l0lawrence Sep 13, 2023
8217089
add access public
l0lawrence Sep 14, 2023
5696e61
add acess to script
l0lawrence Sep 14, 2023
cef4fb3
remove commented
l0lawrence Sep 14, 2023
9dd5b0c
system events not specific to version
l0lawrence Sep 18, 2023
01c8237
change import level
l0lawrence Sep 18, 2023
a7562dc
update generate swagger
l0lawrence Sep 18, 2023
569c837
initializing "write in typespec doc"
l0lawrence Sep 18, 2023
8aa5ca8
move typespec guide to typespec readme
l0lawrence Sep 19, 2023
98f848e
oct events tsp
l0lawrence Sep 25, 2023
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

Large diffs are not rendered by default.

159 changes: 159 additions & 0 deletions specification/eventgrid/Azure.Messaging.EventGrid/2018-01-01/main.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
import "@typespec/http";
import "@typespec/rest";
import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";

@useAuth({
type: AuthType.http,
scheme: "SharedAccessKey",
})
@service({
title: "EventGridClient",
})
@server(
"{endpoint}",
"The host name of the topic",
{
@doc("The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net")
endpoint: url,
}
)
@doc("Azure EventGrid Client")
@versioned(ServiceApiVersions)
namespace EventGrid;
using TypeSpec.Http;
using TypeSpec.Rest;
using TypeSpec.Versioning;
using Azure.Core;
using Azure.Core.Foundations;

@doc("The API version of the EventGrid service.")
enum ServiceApiVersions {
@doc("2018-01-01")
@useDependency(Azure.Core.Versions.v1_0_Preview_2)
v2018_01_01: "2018-01-01",
}

@doc("Properties of an event published to an Event Grid topic using the EventGrid Schema.")
model EventGridEvent {
@doc("An unique identifier for the event.")
id: string;

@doc("The resource path of the event source.")
topic?: string;

@doc("A resource path relative to the topic path.")
subject: string;

@doc("Event data specific to the event type.")
data: unknown;

@doc("The type of the event that occurred.")
eventType: string;

@doc("The time (in UTC) the event was generated.")
eventTime: utcDateTime;

@doc("The schema version of the event metadata.")
@visibility("read")
metadataVersion?: string;

@doc("The schema version of the data object.")
dataVersion: string;
}

@doc("Properties of an event published to an Azure Messaging EventGrid Namespace topic using the CloudEvent 1.0 Schema.")
model CloudEventEvent {
@doc("An identifier for the event. The combination of id and source must be unique for each distinct event.")
id: string;

@doc("Identifies the context in which an event happened. The combination of id and source must be unique for each distinct event.")
source: string;

#suppress "@azure-tools/typespec-azure-core/no-unknown" "Using 'unknown' for data is intentional. Following CloudEvent spec."
@doc("Event data specific to the event type.")
data?: unknown;

#suppress "@azure-tools/typespec-azure-core/casing-style" "Using 'data_base64' is intentional. Following CloudEvent spec."
@doc("Event data specific to the event type, encoded as a base64 string.")
data_base64?: bytes;

@doc("Type of event related to the originating occurrence.")
type: string;

@doc("The time (in UTC) the event was generated, in RFC3339 format.")
time?: utcDateTime;

@doc("The version of the CloudEvents specification which the event uses.")
specversion: string;

@doc("Identifies the schema that data adheres to.")
dataschema?: string;

@doc("Content type of data value.")
datacontenttype?: string;

@doc("This describes the subject of the event in the context of the event producer (identified by source).")
subject?: string;
}

@doc("Properties of an event published to an Event Grid topic using a custom schema")
model CustomEventEvent {}

// USE SHARED ROUTES

@doc("Publish CloudEvents")
@route("/send")
@sharedRoute
op publishCloudEvent is Azure.Core.RpcOperation<
{
@doc("content type")
@header("content-type")
contentType: "application/cloudevents-batch+json; charset=utf-8";

@doc("Required only when publishing to partner namespaces with partner topic routing mode ChannelNameHeader.")
@header("aeg-channel-name")
channelName?: string;

#suppress "@azure-tools/typespec-azure-core/request-body-problem" "Events is a valid request body."
@doc("Events being published.")
@body
events: CloudEventEvent[];
},
{}
>;

@doc("Publish EventGridEvents")
@route("/send")
@sharedRoute
op publishEventGridEvent is Azure.Core.RpcOperation<
{
@doc("content type")
@header("content-type")
contentType: "application/json";

#suppress "@azure-tools/typespec-azure-core/request-body-problem" "Events is a valid request body."
@doc("Events being published.")
@body
events: EventGridEvent[];
},
{}
>;

@doc("Publish custom events")
@route("/send")
@sharedRoute
op publishCustomEvent is Azure.Core.RpcOperation<
{
@doc("content type")
@header("content-type")
contentType: "application/json";

#suppress "@azure-tools/typespec-azure-core/request-body-problem" "Events is a valid request body."
@doc("Events being published.")
@body
events: CustomEventEvent[];
},
{}
>;

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
parameters:
"service-dir":
default: "sdk/eventgrid"
"service-directory-name":
default: "eventgrid"
emit: [
"@azure-tools/typespec-autorest",
]
options:
"@azure-tools/typespec-autorest":
examples-directory: ../examples
omit-unreachable-types: false
output-file: TypespecEventGrid.json
emitter-output-dir: "{project-root}/../../data-plane/Microsoft.EventGrid/stable/2018-01-01"
"@azure-tools/typespec-python":
package-pprint-name: "\"Azure Event Grid\""
package-mode: "dataplane"
package-version: 4.13.0
package-dir: "azure-eventgrid"
package-name: "{package-dir}"
emitter-output-dir: "{project-root}/{service-dir}/{package-name}"
# Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code
# Commenting out until https://github.com/Azure/autorest.csharp/issues/3515 is resolved -- project file not found b/c feature branch
# "@azure-tools/typespec-csharp":
# package-dir: Azure.Messaging.EventGridV2
# model-namespace: false
# generate-convenience-methods: false
# namespace: Azure.Messaging.EventGrid.Namespaces
Loading