Exception thrown when using generics
See original GitHub issueAn exception is thrown when using newer versions of NJsonSchema and NSwag with any simple generics such as class A<T> { }
.
I’m still working on isolating this further, but my current test case is located at https://github.com/grovesNL/nswag-test
Running ConsoleApp2 (referencing older NJsonSchema and NSwag versions) will succeed.
Running ConsoleApp3 (referencing newer NJsonSchema and NSwag versions) will fail with System.ArgumentException: 'Invalid type owner for DynamicMethod.'
.
I know generics are not fully supported yet (https://github.com/RSuter/NJsonSchema/issues/23 and https://github.com/RSuter/NSwag/issues/704), but for now I was using TypeScriptResolver
to replace A`1
with A<T>
and it worked well with older versions.
I’ll continue to look into it and use the older versions for now.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (5 by maintainers)
https://github.com/RSuter/NJsonSchema/commit/d6ae1f01ca436c8a121688858cc1c30f9590d519
This one is “fixed” for now - at least it works as before.
@RSuter Sounds great, thanks!