Fix for failed lookups by GetReferenceIdFromOriginalSchema
in multilevel AllOfs
#2446
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to failed build at https://dev.azure.com/microsoftgraph/Graph%20Developer%20Experiences/_build/results?buildId=110434&view=results
Currently
GetReferenceIdFromOriginalSchema
function would lookup reference ids from AllOf definitions only one level up.In the event that a lookup was more than once level up across different namespaces, this would cause failed lookups resulting to model duplication due in the two namespaces causing build errors.
This PR updates the
GetReferenceIdFromOriginalSchema
function to call theGetSchemaReferenceIds
function which will find referenceIds recursively through AllOfs OneOfs and AnyOfs.Generation run at
https://dev.azure.com/microsoftgraph/Graph%20Developer%20Experiences/_build/results?buildId=110634&view=logs&j=09be00da-8404-5a6e-d496-3b97eba1ba4f&t=8df1ae88-b8fc-5f10-3e45-77a7724c8a3f
Related to microsoftgraph/msgraph-beta-sdk-dotnet#634