How to change casing when generate c# client from openapi document. #4101
Unanswered
PaulinusWong
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It is very common that a web api provides us a swagger json with snake case property name, such as "first_name". This is not the convention casing when generating C# client. A property name in C# should be like "FirstName".
I have spent years to find out a way to do this conversion, especially under the scenario like using NSwagStudio, or MSBuild, but no success. The closest solution I feel is a property named "propertyNameGeneratorType" in the nswag setting file, but I really no idea how to use it if I generate the C# client by using NSwagStudio or MSBuild (from the swagger json obtained by a source web api url.)
Wish someone can give me some inspiration on this.
Beta Was this translation helpful? Give feedback.
All reactions