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

Swagger definitions for the schemas of the Event Grid events published by Azure Storage and Azure EventHub services. #2147

Merged
merged 24 commits into from
Jan 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
9314dac
Swagger for Azure Event Grid.
kalyanaj Aug 14, 2017
96596d1
Merge remote-tracking branch 'upstream/current' into current
kalyanaj Sep 7, 2017
4707e7b
Added x-ms-examples for all the operations.
kalyanaj Sep 7, 2017
65b8a6c
Removed TopicTypes_list.json as the casing doesn't match what's refer…
kalyanaj Sep 8, 2017
2235427
Re-adding TopicTypes_List.json with the correct casing.
kalyanaj Sep 8, 2017
7902a23
Fixed a set of validation errors in the examples.
kalyanaj Sep 11, 2017
4ecef88
Merge remote-tracking branch 'upstream/current' into current
kalyanaj Sep 18, 2017
b020430
Added x-ms-examples for the 2017-09-15-preview API version of Azure E…
kalyanaj Sep 18, 2017
fc67380
Fixed examples to avoid the double forward slash in the scope parameter.
kalyanaj Sep 18, 2017
60808df
Merge remote-tracking branch 'upstream/current' into current
kalyanaj Oct 25, 2017
8bf5c66
Support for patching an EventGrid topic (to update tags).
kalyanaj Oct 25, 2017
afe99ba
Updated description in the response of topic patch operation.
kalyanaj Oct 30, 2017
2bf3b79
Swagger for the Event Grid data plane.
kalyanaj Dec 1, 2017
15743d2
Merge branch 'current' of https://github.com/Azure/azure-rest-api-spe…
kalyanaj Dec 1, 2017
7bb4f22
Fixed the casing of readOnly field, added x-ms-example.
kalyanaj Dec 4, 2017
a97bd33
Fixed a missing parameter in the example file.
kalyanaj Dec 4, 2017
003c52e
Added readme.md to capture the AutoRest configuration for EventGrid d…
kalyanaj Dec 7, 2017
3425e57
Merge branch 'current' of https://github.com/Azure/azure-rest-api-spe…
kalyanaj Dec 7, 2017
29f1d3f
Merge branch 'current' of https://github.com/Azure/azure-rest-api-spe…
kalyanaj Dec 8, 2017
51e4dd0
Merge branch 'current' of https://github.com/Azure/azure-rest-api-spe…
kalyanaj Dec 13, 2017
dac435e
Swagger definitions for the schemas of the Event Grid events publishe…
kalyanaj Dec 13, 2017
36c9379
Resolved the validation errors.
kalyanaj Dec 13, 2017
1d93b8a
Merge remote-tracking branch 'upstream/current' into current
kalyanaj Jan 2, 2018
009f9d6
Use the new convention ("stable") in the directory structure.
kalyanaj Jan 2, 2018
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"swagger": "2.0",
"info": {
"version": "2018-01-01",
"title": "Schema of Azure EventHub events published to Azure Event Grid",
"description": "Describes the schema of the Azure EventHub events published to Azure Event Grid. This corresponds to the Data property of an EventGridEvent."
},
"paths": {},
"definitions": {
"CaptureFileCreatedEventData": {
"description": "Schema of the Data property of an EventGridEvent for an Microsoft.EventHub.CaptureFileCreated event.",
"type": "object",
"properties": {
"fileurl": {
"description": "The path to the capture file.",
"type": "string"
},
"fileType": {
"description": "The file type of the capture file.",
"type": "string"
},
"partitionId": {
"description": "The shard ID.",
"type": "string"
},
"sizeInBytes": {
"description": "The file size.",
"type": "integer"
},
"eventCount": {
"description": "The number of events in the file.",
"type": "integer"
},
"firstSequenceNumber": {
"description": "The smallest sequence number from the queue.",
"type": "integer"
},
"lastSequenceNumber": {
"description": "The last sequence number from the queue.",
"type": "integer"
},
"firstEnqueueTime": {
"description": "The first time from the queue.",
"format": "date-time",
"type": "string"
},
"lastEnqueueTime": {
"description": "The last time from the queue.",
"format": "date-time",
"type": "string"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"swagger": "2.0",
"info": {
"version": "2018-01-01",
"title": "Schema of Azure Storage events published to Azure Event Grid",
"description": "Describes the schema of the Azure Storage events published to Azure Event Grid. This corresponds to the Data property of an EventGridEvent."
},
"paths": {},
"definitions": {
"BlobCreatedEventData": {
"description": "Schema of the Data property of an EventGridEvent for an Microsoft.Storage.BlobCreated event.",
"type": "object",
"properties": {
"api": {
"description": "The name of the API/operation that triggered this event.",
"type": "string"
},
"clientRequestId": {
"description": "A request id provided by the client of the storage API operation that triggered this event.",
"type": "string"
},
"requestId": {
"description": "The request id generated by the Storage service for the storage API operation that triggered this event.",
"type": "string"
},
"eTag": {
"description": "The etag of the object at the time this event was triggered.",
"type": "string"
},
"contentType": {
"description": "The content type of the blob. This is the same as what would be returned in the Content-Type header from the blob.",
"type": "string"
},
"contentLength": {
"description": "The size of the blob in bytes. This is the same as what would be returned in the Content-Length header from the blob.",
"type": "integer"
},
"blobType": {
"description": "The type of blob.",
"type": "string"
},
"url": {
"description": "The path to the blob.",
"type": "string"
},
"sequencer": {
"description": "An opaque string value representing the logical sequence of events for any particular blob name. Users can use standard string comparison to understand the relative sequence of two events on the same blob name.",
"type": "string"
},
"storageDiagnostics": {
"description": "For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers.",
"type": "object"
}
}
},
"BlobDeletedEventData": {
"description": "Schema of the Data property of an EventGridEvent for an Microsoft.Storage.BlobDeleted event.",
"type": "object",
"properties": {
"api": {
"description": "The name of the API/operation that triggered this event.",
"type": "string"
},
"clientRequestId": {
"description": "A request id provided by the client of the storage API operation that triggered this event.",
"type": "string"
},
"requestId": {
"description": "The request id generated by the Storage service for the storage API operation that triggered this event.",
"type": "string"
},
"contentType": {
"description": "The content type of the blob. This is the same as what would be returned in the Content-Type header from the blob.",
"type": "string"
},
"blobType": {
"description": "The type of blob.",
"type": "string"
},
"url": {
"description": "The path to the blob.",
"type": "string"
},
"sequencer": {
"description": "An opaque string value representing the logical sequence of events for any particular blob name. Users can use standard string comparison to understand the relative sequence of two events on the same blob name.",
"type": "string"
},
"storageDiagnostics": {
"description": "For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers.",
"type": "object"
}
}
}
}
}
13 changes: 12 additions & 1 deletion specification/eventgrid/data-plane/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
This is the AutoRest configuration file for EventGrid.


Multiple Azure services publish events to Azure Event Grid. This is the configuration file for generating
the Publish API and the schemas for those events. Each Azure service publishing to Azure Event Grid has its own tag OpenAPI specification
that describes the schemas for its events.

This configuration enables packaging all of the above as one EventGrid data plane library.
This enables customers to download one EventGrid data plane library instead of having to install separate packages to get the event schemas for each service.


---
## Getting Started
Expand All @@ -29,17 +36,20 @@ openapi-type: data-plane
tag: package-2018-01
```


### Tag: package-2018-01

These settings apply only when `--tag=package-2018-01` is specified on the command line.

``` yaml $(tag) == 'package-2018-01'
input-file:
- Microsoft.Storage/stable/2018-01-01/Storage.json
- Microsoft.EventHub/stable/2018-01-01/EventHub.json
- Microsoft.EventGrid/stable/2018-01-01/EventGrid.json
```

---
# Code Generation

## C#

These settings apply only when `--csharp` is specified on the command line.
Expand All @@ -55,6 +65,7 @@ csharp:
clear-output-folder: true
```


## Python

These settings apply only when `--python` is specified on the command line.
Expand Down