-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[REQ] Support modelPropertyNaming=original for Python #5214
Comments
This is being worked in my the new python-expeirmental generator in this PR: #8325
ModelC should contain properties someProp and some_prop Also per this ticket: |
@jonashaag @alessandromarchetti @gbm001 @rm3l @gbvanrenswoude can you try the python-experimental generator? |
@spacether Sure. I just tried to quickly run the
|
Thanks for letting me know. It looks like our code is defaulting to mustache templates and the generator is erroring. You should be able to get past it by passing in the |
I have a PR posted to fix it and I am waiting on a review from the core team: |
Thanks. The generator command worked with |
I'm not a Python expert, but after quickly taking a look at the code generated, this looks good to me, at least for the names of endpoint parameters and model properties. |
Doing that is possible. If you want it please thumbs up vote it in the issue that I have created here: |
Can this issue be closed now that model property naming is consistent with spec naming in python-experimental? |
Looks good to me with |
Update: I just merged by above PR that defaults the templating engine to handlebars for the python-experimental generator. So one no longer needs to pass in the |
Closing this issue because we now have the python-experimental generator which uses spec case for model properties and endpoint parameters.
|
Add support for
modelPropertyNaming
(or similar) to Python codegen.If you have definitions like this one:
Then the resulting code uses underscore notation:
It should also be supported to leave the identifiers as-is, so that the code is:
Related tickets:
The text was updated successfully, but these errors were encountered: