diff --git a/specification/eventgrid/data-plane/Microsoft.EventHub/stable/2018-01-01/EventHub.json b/specification/eventgrid/data-plane/Microsoft.EventHub/stable/2018-01-01/EventHub.json new file mode 100644 index 000000000000..ec1251a2b85b --- /dev/null +++ b/specification/eventgrid/data-plane/Microsoft.EventHub/stable/2018-01-01/EventHub.json @@ -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" + } + } + } + } +} \ No newline at end of file diff --git a/specification/eventgrid/data-plane/Microsoft.Storage/stable/2018-01-01/Storage.json b/specification/eventgrid/data-plane/Microsoft.Storage/stable/2018-01-01/Storage.json new file mode 100644 index 000000000000..a4b340b24057 --- /dev/null +++ b/specification/eventgrid/data-plane/Microsoft.Storage/stable/2018-01-01/Storage.json @@ -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" + } + } + } + } +} \ No newline at end of file diff --git a/specification/eventgrid/data-plane/readme.md b/specification/eventgrid/data-plane/readme.md index e4a486974ef0..7357bc5aee07 100644 --- a/specification/eventgrid/data-plane/readme.md +++ b/specification/eventgrid/data-plane/readme.md @@ -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 @@ -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. @@ -55,6 +65,7 @@ csharp: clear-output-folder: true ``` + ## Python These settings apply only when `--python` is specified on the command line.