A simulator that provides endpoints to mimic the functionality of Azure Event Grid topics and subscribers and is compatible with the Azure.Messaging.EventGrid client library.
I think my struggles with the advanced filtering implementation are worth sharing here to maybe consider improving the documentation. Still, this is not supposed to be any blame regarding the general implementation, because we really appreciate this neat little simulator!
Here's a draft:
Advanced Filtering
Every advanced filter config consists of three properties.
operatorType: any in [NumberGreaterThan, NumberGreaterThanOrEquals, NumberLessThan, NumberLessThanOrEquals, NumberIn, NumberNotIn, BoolEquals, StringContains, StringBeginsWith, StringEndsWith, StringIn, StringNotIn]
key: name of a property of the event to filter for. Important: the property name must start with a capital letter, even if the "real" property in the event (i.e. the JSON object) might not.
The third property depends on the operatorType.
For the following operator types (StringIn, StringNotIn, NumberIn and NumberNotIn), use the values property with an array of at most 5 values:
The example given in the current README on the other hand is - if I'm not mistaken - wrong.
The operatorType StringContains does not work with an array of values but only with a value.
I think my struggles with the advanced filtering implementation are worth sharing here to maybe consider improving the documentation. Still, this is not supposed to be any blame regarding the general implementation, because we really appreciate this neat little simulator!
Here's a draft:
Advanced Filtering
Every advanced filter config consists of three properties.
operatorType: any in [NumberGreaterThan, NumberGreaterThanOrEquals, NumberLessThan, NumberLessThanOrEquals, NumberIn, NumberNotIn, BoolEquals, StringContains, StringBeginsWith, StringEndsWith, StringIn, StringNotIn]
key: name of a property of the event to filter for. Important: the property name must start with a capital letter, even if the "real" property in the event (i.e. the JSON object) might not.
The third property depends on the operatorType. For the following operator types (StringIn, StringNotIn, NumberIn and NumberNotIn), use the values property with an array of at most 5 values:
For all the other operator types, use the value property with a single value:
The example given in the current README on the other hand is - if I'm not mistaken - wrong. The operatorType StringContains does not work with an array of values but only with a value.