Closed MarkusBux closed 2 years ago
Hey @MarkusBux,
Thanks for raising this.
It looks like the introduction of the discriminator values in the reference openApi
document resulted in generation of extra cases at this code which results in an error getting thrown when the response payload does not have the key value in Json response.
Ideally, we should handle this gracefully and will implement a fix in the serialization library to resolve this.
After upgrading the NuGet package to version
5.4.0-preview
I get aSystem.Collections.Generic.KeyNotFoundException
. Message:The given key was not present in the dictionary.
Rolling back to
5.3.0-preview
solves the issue.code that throws the exception:
Stacktrace