AutoWrapper
AutoWrapper copied to clipboard
.NET 5.0 support
Is it possible to release a version with .NET 5.0 support?
Yes. The plan is also to migrate or atleast support System.Text.Json
. Been busy at work these days but will work on it when time permits. It's on my priority list :)
Updates - The .NET 5 migration is currently still on-hold because my son was admitted in the hospital. I'll resume the migration hopefully next week when everything is okay. You can see the work I've started here: https://github.com/proudmonkey/AutoWrapper/tree/v5-beta
Thanks, Vince
Hope your son gets well soon
Hope your son gets well soon. praying for your son.
On Wed, Mar 24, 2021 at 10:20 PM Matt McKinstry @.***> wrote:
Hope your son gets well soon
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/proudmonkey/AutoWrapper/issues/86#issuecomment-806011313, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHKQ3HLW7RGPI6KULN6WG3TFINOBANCNFSM4UCQBDEA .
-- Best Regard: Sajid Ali Software Engineer (+92) 333 6528504 / 321 786 5510
Hi :) Hope your son is doing better.
Do you have an estimate of when support for 5 will be released? I'm in the situation that I need to hand the project in at the end of the month, if you won't have the time, it's totally understandable just wish to know before it's to late to work around it.
Best regards and wishes Peter
Any news about the improvements? @proudmonkey
https://www.nuget.org/packages/AutoWrapper.Core.Net5/4.5.1
@proudmonkey seems someone added support for .NET5, if you can extend this to include .NET6, that would be great
https://www.nuget.org/packages/AutoWrapper.Core.Net5/4.5.1
@proudmonkey seems someone added support for .NET5, if you can extend this to include .NET6, that would be great
That was me. Its just a fork with some added target framework xml. We couldnt wait any longer on the official implementation as it was holding up our move to .Net 5
All - I've released an RC version just to test out the migration to .NET 5. Alot of code refactoring has been done for v5 and there are breaking changes. I would really appreciate if you could test it out as well: https://www.nuget.org/packages/AutoWrapper.Core/5.0.0-rc
Please provide feedback if there are any issues you encountered. Thank you!
Breaking changes
- This release only supports .NET 5
- Middleware has been renamed from
UseApiResponseAndExceptionWrapper
toUseAutoWrapper
. Make sure to update yourStartup.cs
to use the new name. -
ProblemDetails
is now the default exception format - Removed
Newtonsoft.Json
dependency and replaced it withSystem.Text.Json
- Use the interface
IApiResponse
model instead of the concreteApiResponse
model for returning responses using the default format. This allows you to add your own properties that will wrapped within theResult
property. -
AutoWrapIgnore
andRequestDataLogIgnore
attributes now leaves underAutoWrapper.Attributes
namespace. The implementation was changed from usingIActionFilter
to useAttribute
, eliminating all the request header logic. - The following options has been removed:
- ApiVersion
- ReferenceLoopHandling
- UseCustomSchema
ReferenceLoopHandling
andDefaultContractResolver
aren't still supported in .NET 5 that's why handling reference loop andApiResponse
property mappings will not be supported when targetting .NET 5. .NET Core 3.1 will still use Newtonsoft.Json and it's only supported by AutoWrapper <= v4.5.0
Had a quick play.
ApiRequestHandler.HandleSuccessfulRequestAsync does not work when returning a collection.
Think it needs the following change
if (root.ValueKind == JsonValueKind.Object || root.ValueKind == JsonValueKind.Array)
Thank you! PR for this fix has been submitted. I've found other issues as well and will release a new rc
version within the week for us to test it out again :)
New rc
version has been released: https://www.nuget.org/packages/AutoWrapper.Core/5.0.0-rc-02
Handling of ApiProblemDetailsException seems to be broken
Doing the following produces a 500 Internal Server error now
throw new ApiProblemDetailsException($"Record with id: {id} does not exist.", Status404NotFound);
@mattmckinstry - thank you for the feedback. I'll look into this.
@mattmckinstry This should now be fixed in rc-03
: https://www.nuget.org/packages/AutoWrapper.Core/5.0.0-rc-03
Please keep you feedback coming to better improve this project. Thank you and I appreciate all the support and feedback! ❤️
Shame this doesn't work with .NET 6, looks like a great library.
@replete - Not yet :)
@proudmonkey any news regarding .NET 6?