Skip to content

fix: adds missing mushing of all of scenarios#4723

Merged
andrueastman merged 5 commits intomainfrom
bugfix/missing-mushing
May 28, 2024
Merged

fix: adds missing mushing of all of scenarios#4723
andrueastman merged 5 commits intomainfrom
bugfix/missing-mushing

Conversation

@baywet
Copy link
Copy Markdown
Member

@baywet baywet commented May 24, 2024

fixes #4714
fixes #4191

Signed-off-by: Vincent Biret <vibiret@microsoft.com>
@baywet baywet requested a review from a team as a code owner May 24, 2024 17:23
@baywet baywet self-assigned this May 24, 2024
@baywet baywet enabled auto-merge May 24, 2024 17:23
@baywet
Copy link
Copy Markdown
Member Author

baywet commented May 24, 2024

@andrueastman I'm running out of time on this one but I thinks it irons out the last allOf scenarios. If you can review and test, I'd appreciate it. Otherwise I'll pick it up when I get back.

I queued a generation build for sanity.

https://microsoftgraph.visualstudio.com/Graph%20Developer%20Experiences/_build/results?buildId=150597&view=results

auto-merge was automatically disabled May 24, 2024 17:27

Pull Request is not mergeable

@baywet
Copy link
Copy Markdown
Member Author

baywet commented May 24, 2024

Generation is identical for Microsoft Graph scenarios! microsoftgraph/msgraph-sdk-dotnet#2517

@andrueastman andrueastman self-assigned this May 27, 2024
Comment thread src/Kiota.Builder/KiotaBuilder.cs Outdated
@andrueastman andrueastman force-pushed the bugfix/missing-mushing branch from 79048dc to a6feb0e Compare May 28, 2024 12:38
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
63.6% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@andrueastman andrueastman enabled auto-merge May 28, 2024 14:30
@andrueastman
Copy link
Copy Markdown
Contributor

Validated with https://dev.azure.com/microsoftgraph/Graph%20Developer%20Experiences/_build/results?buildId=150942&view=results . No diff with latest generation on beta/v1

@0xced
Copy link
Copy Markdown
Contributor

0xced commented May 29, 2024

Since commit 448af8f (which is the first of this pull request) I see a lot of warnings about discriminator not being inherited when generating my client. For example:

Discriminator SObjectRootInfo is not inherited from SObjectRootInfo.

The generated code is identical, only the warnings are new.

This problem can be reproduced by debugging the AddsDiscriminatorMappingsAllOfImplicit test and setting a breakpoint on logger.LogWarning("Discriminator {ComponentKey} is not inherited from {ClassName}.", componentKey, baseClass.Name); in the KiotaBuilder.cs file.

@andrueastman
Copy link
Copy Markdown
Contributor

Thanks for this @0xced. Any chance you can create a new issue with the input openApi document to help investigate?

@0xced
Copy link
Copy Markdown
Contributor

0xced commented May 30, 2024

There's already at least one in the tests where the problem can be reproduced. I edited my previous message after posting it when I figured out that running the AddsDiscriminatorMappingsAllOfImplicit test was reproducing the issue.

@andrueastman
Copy link
Copy Markdown
Contributor

Following this up via #4761

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

AllOf implementation alignement Multiple identical classes are generated for a component schema with allOf inheritance

4 participants