You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using nswag to generate C# Client code and i had to include all the Microsoft.AspNetCore.Mvc stuff with all its dependencies. One Client is a PowerShell module.
Copying the code seems fine. I's 57 lines of code and most of them are comments. I'm not sure it makes sense to make another assembly just to put this type in it.
Bottom line: ProblemDetails is such a crappy implementation of a good idea. Even the documentation on it basically says "beware, this might not behave the way you hope":
The round-tripping behavior for Extensions is determined by the implementation of the Input \ Output formatters. In particular, complex types or collection types may not round-trip to the original type when using the built-in JSON or XML formatters.
I'm using nswag to generate C# Client code and i had to include all the Microsoft.AspNetCore.Mvc stuff with all its dependencies. One Client is a PowerShell module.
not so nice Solution
I copied the source code of https://github.com/aspnet/AspNetCore/blob/master/src/Mvc/Mvc.Core/src/ProblemDetails.cs and change the namespace.
Describe alternatives you've considered
If ProblemDetails lives in a an NetStandard Assembly I can share this with my (.Net-Core and .Net-Framework) Clients.
The text was updated successfully, but these errors were encountered: