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

Class with inherited fields are missing from generation #23

Closed
egaga opened this issue Sep 23, 2015 · 1 comment
Closed

Class with inherited fields are missing from generation #23

egaga opened this issue Sep 23, 2015 · 1 comment
Milestone

Comments

@egaga
Copy link
Member

egaga commented Sep 23, 2015

abstract class A {
   public int foo = 1;
}

class B extends A {
   public int bar = 2;
}

If class B is used in api response type, the generated file does not contain field foo from class A.
Namely, inherited fields do not appear anywhere.

There should be configuration option how inheritance hierarchy is transferred to target code, e.g. by flattening the class hierarchy, or having corresponding hierarchy in target language.

@egaga egaga added the bug label Sep 23, 2015
@komu
Copy link
Member

komu commented Sep 23, 2015

Yes, this needs to be implemented.

I'm not sure about the option though: I think it's better to do some hard thinking about which option would be best and then implement only that. If someone really needs the other option later on, it can always be added later on, but I believe at the start it's better to limit the API surface, lest we paint ourselves in a corner. If we can make it "just work" without any extra configuration and documentation, it would be best.

@komu komu added enhancement and removed bug labels Sep 28, 2015
@komu komu added this to the 0.4 milestone Sep 28, 2015
@komu komu closed this as completed in 9fc8886 Oct 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants