Closed mariusmuntean closed 3 months ago
I'd like to work on this issue because I'd profit from it in my personal projects. Currently, after each code generation, I have to manually rename all the class members to pascal case.
Already have a working solution for controlling the naming convention for class names: https://github.com/mariusmuntean/graphql-code-generator-community/tree/fix/CSharpMemberNameCasing
do you want to send in a PR @mariusmuntean ?
Yes, I'm familiarizing myself with the codebase and working on the improvement.
@saihaj my draft PR is ready. Please have a look and advise on how to proceed.
Fully addressed by #806 and #816
Which packages are impacted by your issue?
@graphql-codegen/c-sharp @graphql-codegen/c-sharp-operation
Describe the bug
The C# plugin doesn't take into account what the value of the config parameter
namingConvention
is. In C# it is customary for public property names to be pascal-case, but the plugin generates camel-case property names.Your Example Website or App
https://codesandbox.io/p/devbox/github/mariusmuntean/graphql-code-generator-issue-sandbox-template-namingConventionIssue/tree/master/?file=%2Fcodegen.ts
Steps to Reproduce the Bug or Issue
namingConvention: 'change-case-all#pascalCase'
to the configExpected behavior
As a user I expect the namingConvention config parameter to have an effect on the generated class property names, but the output always contains properties with camel case names.
Screenshots or Videos
No response
Platform
@graphql-codegen/c-sharp
version(s): 5.0.0@graphql-codegen/c-sharp-operations
version(s): 3.0.0Codegen Config File
No response
Additional context