Azure / azure-functions-eventgrid-extension

EventGrid extension for Azure Functions
MIT License
48 stars 32 forks source link

Input binding for Event Grid does not work for out of proc languages #79

Closed ankitkumarr closed 11 hours ago

ankitkumarr commented 4 years ago

For input binding,

  1. if we are using batch type, it is expected that the parameter type be a JArray. For out of proc languages. the parameter type would usually be a string. This ends us throwing an exception. We should also check if the requested type is string and treat the binding accordingly.
  2. if we are using a single event type, we expect the parameter to be a string or JObject. Even if it is a string, we parse it to a JObject. This breaks scenarios where users are passing a JArray of events. When triggered from the portal, you are very highly to hit this scenario causing all sorts of errors. We should try to parse it as a JArray as well.

TLDR; we expect binding type to be a JSON object. That's not a fair expectation, we should also allow JSON Arrays.

Gamecock commented 3 years ago

I think I am hitting this from the portal: System.InvalidOperationException: Exception binding parameter 'event'

Is there documentation on how to correctly format eventgrid input.

I am also getting the same response when testing the topic using this.

Is there documentation on how to format an event grid?