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

Revert dictionary clone helper logic #1219

Merged
merged 6 commits into from
Apr 17, 2023

Conversation

MaggieKimani1
Copy link
Contributor

Reverts the DictionaryCloneHelper logic for cloning dictionaries in order to unblock Kiota. This fix was a result of this issue which introduced this bug that is blocking Kiota. Since DeX API has a Cloning workaround, I've reverted this logic for us to unblock Kiota as we take more time to investigate on how to prevent the StackOverflow exception generated as a result of circular object dependencies when cloning an OpenApiDocument.

Example:

System.Text.Json.JsonException : A possible object cycle was detected. This can either be due to a cycle or if the object depth is larger than the maximum allowed depth of 64. Consider using ReferenceHandler.Preserve on JsonSerializerOptions to support cycles.
Path: $.Operations.Responses.Content.Schema.AllOf.Reference.HostDocument.Paths.Operations.Responses.Content.Schema.AllOf.Reference.HostDocument.Paths.Operations.Responses.Content.Schema.AllOf.Reference.HostDocument.Paths.Operations.Responses.Content.Schema.AllOf.Reference.HostDocument.Paths.Operations.Responses.Content.Schema.AllOf.Properties.Type.

src/Microsoft.OpenApi/Microsoft.OpenApi.csproj Outdated Show resolved Hide resolved
src/Microsoft.OpenApi/Any/OpenApiAnyCloneHelper.cs Outdated Show resolved Hide resolved
src/Microsoft.OpenApi/Microsoft.OpenApi.csproj Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Apr 17, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@MaggieKimani1 MaggieKimani1 merged commit afa6b3c into vnext Apr 17, 2023
@MaggieKimani1 MaggieKimani1 deleted the mk/bug-fix-cloning-stackoverflow-exception branch April 17, 2023 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants