-
Notifications
You must be signed in to change notification settings - Fork 6k
Fix issue #2449: SubClass annotations are missing from the base class. #2467
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
Conversation
@yaelah thanks for the PR. As shown in the commit tab, the commit is not linked to your Github account, which means your credit won't count in https://github.com/swagger-api/swagger-codegen/graphs/contributors I would suggest you to fix it by setting a proper git email address in your local environment. |
I am not sure how to get rid of the first 2 commits. Should I just delete this pull request and create a new fork with the correct account? |
@yaelah would this help? https://help.github.com/articles/changing-author-info/ |
e867458
to
5ca261e
Compare
… base class. Added a children property to CodegenModel and write out the necessary annotations.
@@ -47,6 +47,7 @@ | |||
|
|||
public JavaClientCodegen() { | |||
super(); | |||
supportsInheritance = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This cannot be done at the moment. See : #1120 (comment)
Does it work if you keep supportsInheritance to false ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, I have a PR on the swagger-parser that would make supportsInheritance work : swagger-api/swagger-parser#246
This is a matter of taste :) |
@@ -123,6 +123,19 @@ public void processOpts() { | |||
} | |||
} | |||
} | |||
// Let parent know about all its children | |||
for (String name : allModels.keySet()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (CodegenModel cm : allModels.values())
?
I'm OK with early return if there is code after the return statement which is not the case here. But you're right, that's opiniated... |
Added a children property to CodegenModel and write out the necessary annotations.
Please give me your feedback on this change and let me know if there is something else I should do.
thanks.