Swashbuckle.AspNetCore
Swashbuckle.AspNetCore copied to clipboard
Fix casing of enum keys in a dictionary with CamelCasePropertyNamesContractResolver
Pull Request
The issue or feature being addressed
Instead of opening an issue I made a PR with a failing test and a possible fix
When using CamelCasePropertyNamesContractResolver, the serializer will use enum keys in camelCase, but the schema will have PascalCase.
Details on the issue fix or feature implementation
Added a test to check that the keys the schema generator produces appear in the output produced by the same serializer. Added a fix that runs the keys through the actual serializer instead of assuming they will be serialized as-is.