mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-28 03:51:05 +01:00
Add support for multiple webhooks (#615)
This commit is contained in:
@@ -84,10 +84,18 @@ namespace WireMock.Serialization
|
||||
Response = new ResponseModel
|
||||
{
|
||||
Delay = (int?)response.Delay?.TotalMilliseconds
|
||||
},
|
||||
Webhook = WebhookMapper.Map(mapping.Webhook)
|
||||
}
|
||||
};
|
||||
|
||||
if (mapping.Webhooks?.Length == 1)
|
||||
{
|
||||
mappingModel.Webhook = WebhookMapper.Map(mapping.Webhooks[0]);
|
||||
}
|
||||
else if (mapping.Webhooks?.Length > 1)
|
||||
{
|
||||
mappingModel.Webhooks = mapping.Webhooks.Select(WebhookMapper.Map).ToArray();
|
||||
}
|
||||
|
||||
if (bodyMatcher?.Matchers != null)
|
||||
{
|
||||
mappingModel.Request.Body = new BodyModel();
|
||||
|
||||
Reference in New Issue
Block a user