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

backing store and additional data properties are added to every inheritance level #1671

Closed
baywet opened this issue Jun 28, 2022 · 3 comments · Fixed by #1674
Closed

backing store and additional data properties are added to every inheritance level #1671

baywet opened this issue Jun 28, 2022 · 3 comments · Fixed by #1674
Assignees
Labels
generator Issues or improvements relater to generation capabilities. type:bug A broken experience

Comments

@baywet
Copy link
Member

baywet commented Jun 28, 2022

looking at the latest generation logs and the latest go generation run it seems that both the backing store and the additional data properties are added to every model in the inheritance structure when it should only be added to the first ancestor that supports additional data.

!(model.GetGreatestGrandparent(model)?.ContainsMember(AdditionalDataPropName) ?? false)) {

@baywet baywet added type:bug A broken experience generator Issues or improvements relater to generation capabilities. labels Jun 28, 2022
@baywet baywet self-assigned this Jun 28, 2022
@baywet baywet added this to Kiota Jun 28, 2022
@baywet baywet moved this to Todo in Kiota Jun 28, 2022
@andrueastman
Copy link
Member

It could be that the order of processing the models has changed for some reason.
So, at the time of checking the model, for some reason the parent model hasn't had the AdditionalDataPropName property added to it yet as the generated parent model ends up with the property generated as well.

@baywet
Copy link
Member Author

baywet commented Jun 28, 2022

Thanks for chiming in. As far as I can remember, Kiota requires the base class to be fully generated before it starts injecting the derived one in the CodeDOM, and it's blocking. I haven't had time to look into that just yet but my money is on the GetGreatestGrandparent method derailing for some reason.

@baywet
Copy link
Member Author

baywet commented Jun 28, 2022

you were right, it was an ordering issue triggered by the discriminator mappings. Fixed in #1674

Repository owner moved this from In Progress to Done in Kiota Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
generator Issues or improvements relater to generation capabilities. type:bug A broken experience
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants