Closed ptasev closed 9 months ago
Looks like the issue is with Namotion.Reflection
library. This error occurs on all versions >= 2.0.0
. However, looks like this code path is only hit with NJsonSchema
version 11.0.0
.
using Namotion.Reflection;
var ct = typeof(Point2D<double>).ToContextualType();
// Getting fields fails
var fs = ct.Fields;
I'm getting the same issue when generating an openApi spec with generic type via nswag
Thanks for reporting, seems to be the same as this one here https://github.com/RicoSuter/NSwag/issues/4524#issuecomment-1833089046
I'm updating NSwag to 14.0.0 previews and I ran into a problem. Turns out it's with this library. I am getting the following exception message with version
11.0.0-preview006
:I did not have this problem with the same exact code in version
10.9.0
of the library. The problem goes away if the static field is removed. See code to reproduce below (tested with .NET 8.0):