Swashbuckle seems to serialize objects to camel case, I use NewtonSoft lib to serialize objects in the app which has an attribute [JsonProperty(name="")] and these are used in serialization. Is there a way I can customize Swashbuckle to use the same api used in the application?
Hey there
Swashbuckle 5.0 honors Json attributes out-of-the-box. It's currently in alpha and is available as a Nuget pre-release:
Upgrade-Package Swashbuckle -Pre
It does introduce some significant changes including a move to Swagger 2.0 and subsequent changes to the config API. If you're only using the UI, it should remain relatively unchanged, If you have other consumers of the raw Swagger document, you'll need to ensure they can accept Swagger 2.0.
Finally, if you're using the Swashbuckle config API extensively, you should take a look at the transition guide here - https://github.com/domaindrivendev/Swashbuckle/tree/swagger_2.0#transitioning-to-swashbuckle-50
Other than that, the upgrade should be relatively seamless. Complete docs for the alpha version are available here - https://github.com/domaindrivendev/Swashbuckle/tree/swagger_2.0
Let me know how it goes ...
Great, thanks for the swift response. It definitely resolves my issue.
But is there way we can plug in a different serializer? Thanks again.
This is fixed!
An answer to this question "But is there way we can plug in a different serializer? Thanks again." would be great
Most helpful comment
An answer to this question "But is there way we can plug in a different serializer? Thanks again." would be great