Skip to content
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

enumVars.name breaks python code #61

Closed
b3nab opened this issue May 19, 2019 · 0 comments
Closed

enumVars.name breaks python code #61

b3nab opened this issue May 19, 2019 · 0 comments

Comments

@b3nab
Copy link
Contributor

b3nab commented May 19, 2019

The code generation works fine, this package is really easy to use and to setup with custom configs or templates.

However I started using it to auto generate a client sdk for the App Center API from the App Center swagger.json.
When I tried running the sdk I solved the #23 changing the var name in python config from modelPackage to modelsPackage, but then another error came out from the enumVars that not manage well the name property:

let e = { name: v, value: '"'+v+'"' }; // insane, why aren't the quotes in the template?

It can be useful to change that to:

 let e = { name: Case.pascal(v), value: '"'+v+'"' };

or add another property to the dict, like it's done some lines below:

entry.nameInCamelCase = Case.pascal(entry.name); // for erlang-client

What's the suggested method? Eventually I can do a PR. 👍

b3nab added a commit to b3nab/openapi-codegen that referenced this issue May 19, 2019
Gambo019 added a commit to Gambo019/openapi-codegen that referenced this issue Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant