Fix examples not populating in openapi3 outputs when versioned union variants have enum parameters#9323
Closed
FrankShaw wants to merge 1 commit intomicrosoft:mainfrom
Closed
Conversation
…variants have enum type parameters
Author
|
@microsoft-github-policy-service agree |
Member
|
Hi @FrankShaw I believe this was fixed in #9308 and will be available in this week release. Looks like we had a duplicate issue for this. |
Author
|
Thanks for the heads up @timotheeguerin closing this PR then 😄 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #9229
I took a stab at fixing this. I am not sure whether this is the proper solution, but maybe it can be a starting point. I'm willing to adapt the solution based on feedback.
What I found is that when checking whether an operation example is assignable to an operation in a versioned API, the type-relation-checker for Enums only does a reference comparison of the enum from the example value to the source enum. This breaks because the enum coming from the doc being built is a clone of the original enum (done when creating the versioned projections). I didn't think there was really much that can be done about the fact that a clone of the original enum is created for each version, so I figured I would add a secondary deep compare of the two enums if the original reference comparison fails