-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix for underscore field names fo ToGo/ToGoPrivate #1753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Hi! Hmm... It looks like the check-generate script is failing for one of the integration tests:
Did you try running it locally?
|
Hi @StevenACoffman, didn't run it, now I see We have such code for models generation gqlgen/plugin/modelgen/models.gotpl Lines 33 to 35 in 47015f1
So now it changed to |
Sorry I haven't been able to give this much attention. Have you considered instead replacing the underscore ( In another project, oapi-codegen has ToCamelCase which serves a similar purpose, but has a completely different implementation. In swagger/openAPI a number of valid parameter names are invalid Go variable names. I'm not sure if anything in there approach is relevant or inspiring for your specific problem here, but it might be worth a look. |
I'm running into this. Any chance we can get this PR fixed and merged? Thanks |
@robertcnix Please file a new PR. This PR author has been MIA for over a year. |
Describe your PR and link to any relevant issues.
I have:
We have such case with our graphql schema definition:
which is templated to:
since "_" is valid variable for golang, I've added small fixed to resolve such case