asyncapi / saunter

Saunter is a code-first AsyncAPI documentation generator for dotnet.
https://www.asyncapi.com/
MIT License
199 stars 56 forks source link

DictionaryKeyToStringConverter to support lists #94

Closed MattTamsett closed 3 years ago

MattTamsett commented 3 years ago

Hopefully the test is self explanatory, but the DictionaryKeyToStringConverter ran into issues with passed Dictionary inherited classes in lists as it could not cast. More concretely, it was the SecurityRequirement class causing the issue

System.InvalidCastException : Unable to cast object of type DictionaryKeyToStringConverterInner[System.String,System.Collections.Generic.List1[System.String]] to type System.Text.Json.Serialization.JsonConverter[Saunter.AsyncApiSchema.v2.SecurityRequirement].