You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Azure REST API documentation defines the properties.destination field in the Event Subscription as having type one of WebHookEventSubscriptionDestination, EventHubEventSubscriptionDestination, StorageQueueEventSubscriptionDestination... Each of these types contain an endpointType field and a properties field giving details of the endpoint.
The autogenerated azure_mgmt_eventgrid crate has the properties.destination field as having type EventSubscriptionDestination. This only contains the endpoint_type field and not the properties field. So it is impossible to use the crate to create an Event Subscription.
Ideas
I'm not sure if this is a bug in the Rust code autogenerator or the Azure REST API spec. The OpenAPI spec has:
"EventSubscriptionProperties": {
..."destination": {
"$ref": "#/definitions/EventSubscriptionDestination",
"description": "Information about the destination where events have to be delivered for the event subscription.\r\nUses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / dead-lettering."
},
and
"EventSubscriptionDestination": {
"description": "Information about the destination for an event subscription.",
"required": [
"endpointType"
],
"type": "object",
"properties": {
"endpointType": {
"description": "Type of the endpoint for the event subscription destination.",
"enum": [
"WebHook",
"EventHub",
"StorageQueue",
"HybridConnection",
"ServiceBusQueue",
"ServiceBusTopic",
"AzureFunction"
],
"type": "string",
"x-ms-enum": {
"name": "EndpointType",
"modelAsString": true
}
}
},
"discriminator": "endpointType"
},
and
"StorageQueueEventSubscriptionDestination": {
"description": "Information about the storage queue destination for an event subscription.",
"type": "object",
"allOf": [
{
"$ref": "#/definitions/EventSubscriptionDestination"
}
],
"properties": {
"properties": {
"$ref": "#/definitions/StorageQueueEventSubscriptionDestinationProperties",
"description": "Storage Queue Properties of the event subscription destination.",
"x-ms-client-flatten": true
}
},
"x-ms-discriminator-value": "StorageQueue"
},
So perhaps some combination of discriminator and AllOf that the generator doesn't handle?
The generated Rust code has the model for the StorageQueueEventSubscriptionDestination type but isn't using it in the EventSubscription create or update request.
The text was updated successfully, but these errors were encountered:
Problem
The Azure REST API documentation defines the
properties.destination
field in the Event Subscription as having type one ofWebHookEventSubscriptionDestination
,EventHubEventSubscriptionDestination
,StorageQueueEventSubscriptionDestination
... Each of these types contain anendpointType
field and aproperties
field giving details of the endpoint.The autogenerated
azure_mgmt_eventgrid
crate has theproperties.destination
field as having typeEventSubscriptionDestination
. This only contains theendpoint_type
field and not theproperties
field. So it is impossible to use the crate to create an Event Subscription.Ideas
I'm not sure if this is a bug in the Rust code autogenerator or the Azure REST API spec. The OpenAPI spec has:
and
and
So perhaps some combination of discriminator and AllOf that the generator doesn't handle?
The generated Rust code has the model for the
StorageQueueEventSubscriptionDestination
type but isn't using it in theEventSubscription
create or update request.The text was updated successfully, but these errors were encountered: