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

[Python] Commenting supportsInheritance is enabling the model properties inhe… #1099

Conversation

narenandu
Copy link

@narenandu narenandu commented Sep 25, 2018

@wing328

CC'ing technical committee: @taxpon @frol @mbohlool @cbornet @kenjones-cisco to review the pull request if your PR is targeting python programming language.

Description of the PR

It is kind of counter intuitive, but setting supportsInheritance = true is failing to get the properties from the parent when a child model inherits. Didn't dive deep in to the actual base class for the code generation, but commenting out the line from PythonClientCodegen.java fixed the issue.

This solves the reported issues

There could be multiple reasons since I didn't go to the root cause

@narenandu
Copy link
Author

I confirm that if I set supportsInheritence = true in GoClientCodegen.java, it breaks the inheritance of model properties from a model's parent

@narenandu narenandu changed the title Commenting supportsInheritance is enabling the model properties inhe… [Python] Commenting supportsInheritance is enabling the model properties inhe… Oct 9, 2018
@wing328
Copy link
Member

wing328 commented Nov 1, 2018

@narenandu first of all, thanks for the PR. I agree the inheritance/composition in Python client needs some enhancements/fixes.

I've filed #1360 with better support for inheritance/composition. I wonder if you can give it a try to see if it works better for your use case.

@wing328
Copy link
Member

wing328 commented Dec 10, 2018

@narenandu #1360 has been merged into master. Can you please give it another try?

@wing328
Copy link
Member

wing328 commented Dec 10, 2018

Closing this PR for the time being. Will reopen if needed

@wing328 wing328 closed this Dec 10, 2018
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

Successfully merging this pull request may close these issues.

None yet

2 participants