Closed johannesmols closed 9 months ago
Apparently the unit tests are failing due to an old URL in a test, and is not related to this change. I made a new PR to fix this in #1651.
Perfect. Perhaps it can then be released with the upcoming v11.
@lahma Any chance of merging this? I'm still having the issue of not being able to generate clients with NSwag, and it would be nice to have it included in a future release to resolve this.
We are waiting for Rico as he does the final call...
I think this is fine... we should not expose Newtonsoft.Json serializer internals as eventually NJS and NSwag will switch to STJ for schema serialization and this option would then go away anyway.
Using NSwag on schemas with large depths causes an exception to be thrown due to the MaxDepth default setting of 64. I am not aware of any way of customizing the Json settings for parsing the schema in a project when using NSwag, as it invokes the precompiled DLL directly. More context here: https://github.com/RicoSuter/NSwag/issues/4394. #1565 is also related, but can be solved by modifying the settings in the project.
I'm not sure if it is the best approach to just change the default setting in this project to solve it. There doesn't seem to be a way of passing in a
JsonSerializerSettings
object or func to modify it inFromJsonAsync
(called from here in NSwag). If there was such an option, the default wouldn't have to be modified here but it could be changed in NSwag where the issue is relevant.