Closed OperatorOverload closed 8 months ago
Thank you for your contribution but I can't merge it because it doesn't provide System.Text.Json
support for all model classes.
Understood @MariuszTrybus, thank you for the feedback. I've been using the webhook successfully with the modified code in production for ~2 months now, so I don't know that the other ones are required, but they certainly could be by code that we're not exercising today.
Based on that, I've stepped through and added the System.Text.Json converter to all relevant String Enum types across the project. Would you mind taking another look now?
@OperatorOverload some of the attributes have incorrect argument set that doesn't match the property value. I can fix it myself but I also want to spend some time testing if it works correctly.
@MariuszTrybus thanks for catching that, got a little copy/paste happy. Latest commit should have all of these fixed.
@OperatorOverload Thank you! I will merge it but I won't release it just yet as there are some other issues with System.Text.Json
serialisation of the models.
Thanks @MariuszTrybus. Can you share any more details on the other issues you're seeing? We've got this code in production now catching webhooks, but we're having to maintain a private build to do it, and I'd love to get back on an official release. I'm happy to see if I can help resolve the issues.
@OperatorOverload I've just merged #129 and released v4.8.0. I think webhooks were not affected, it was mainly about the OnDeserialized
handlers and some type mismatches in models.
This update makes the necessary changes to enable compatibility with the System.Text.Json enumerable converter that is the .NET pipeline default in .NET Core 3.1 and later. In .NET Core 3.1, the default project templates and pipeline was adjusted to remove the requirement for Newtonsoft.Json and make the new integrated System.Text.Json library the default. This ensures that the webhook model can be used out of the box with current ASP.NET default project templates and settings.
Note that the change retains compatibility with the older Newtonsoft.Json binder as well by fully qualifying both references, so adding support here is not a breaking change.