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

Update readme.md #15637

Merged
merged 2 commits into from
Aug 12, 2021
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
45 changes: 45 additions & 0 deletions specification/eventgrid/data-plane/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,51 @@ A sample valid event definition is shown below:
```
~~~

In addition to the event schema definition, you must provide a JSON example of a real event the service can trigger. This example must be in a "examples" folder close to your JSON, and called using snakeCase based on the event final name. The example should contain the envelope, but could be CloudEvent or EventGrid schema, whatever is easier. Example should NOT be handcrafted, but an actual result from a server test environment like canary (it's not required that the event is deployed in production yet). No PR will be accepted without the example.

For the previous schema, the example file should be called "chat_message_received.json" and contains:
~~~ markdown
```json
{
"id": "02272459-badb-4e2e-b538-4cb8a2f71da6",
"topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
"subject": "thread/{thread-id}/sender/{rawId}/recipient/{rawId}",
"data": {
"messageBody": "Welcome to Azure Communication Services",
"messageId": "1613694358927",
"metadata": {
"key": "value",
"description": "A map of data associated with the message"
},
"senderId": "8:acs:109f0644-b956-4cd9-87b1-71024f6e2f44_00000008-578d-7caf-07fd-084822001724",
"senderCommunicationIdentifier": {
"rawId": "8:acs:109f0644-b956-4cd9-87b1-71024f6e2f44_00000008-578d-7caf-07fd-084822001724",
"communicationUser": {
"id": "8:acs:109f0644-b956-4cd9-87b1-71024f6e2f44_00000008-578d-7caf-07fd-084822001724"
}
},
"senderDisplayName": "Jhon",
"composeTime": "2021-02-19T00:25:58.927Z",
"type": "Text",
"version": 1613694358927,
"recipientId": "8:acs:109f0644-b956-4cd9-87b1-71024f6e2f44_00000008-578d-7d05-83fe-084822000f6d",
"recipientCommunicationIdentifier": {
"rawId": "8:acs:109f0644-b956-4cd9-87b1-71024f6e2f44_00000008-578d-7d05-83fe-084822000f6d",
"communicationUser": {
"id": "8:acs:109f0644-b956-4cd9-87b1-71024f6e2f44_00000008-578d-7d05-83fe-084822000f6d"
}
},
"transactionId": "oh+LGB2dUUadMcTAdRWQxQ.1.1.1.1.1827536918.1.7",
"threadId": "19:[email protected]"
},
"eventType": "Microsoft.Communication.ChatMessageReceived",
"dataVersion": "1.0",
"metadataVersion": "1",
"eventTime": "2021-02-19T00:25:59.9436666Z"
}
```
~~~

---
## Getting Started
To build the SDK for EventGrid, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run:
Expand Down