swagger-api / swagger-api/swagger-codegen-generators
[C#] Model template uses unsupported lambda helper
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 299
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
Using swagger 3.0.7
The modelGeneric.mustache template file uses {{#lambda.camelcase_param}} helper that is not supported in handlebars.
From handlebars docs:
The optional Mustache-style lambdas are not supported. Instead Handlebars provides its own lambda resolution that follows the behaviors of helpers.
I verified that after I removed the lambda.camelcase_param the param appeared in the generated code, but of course with wrong format (CamelCase instead of correct camelCase).
The fix would require changing the template and adding a new helper to convert name to camelCase, because there is currently not such helper.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the modelGeneric.mustache template and inspect the generator's existing helper implementations and Handlebars integration. Reproduce the generated C# model with the lambda removed, then add the supported camelCase handling and verify that the generated parameter uses the correct casing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100