Skip to content

fix(resolver): re-evaluate element to be transcluded#4191

Draft
glowcloud wants to merge 1 commit intomasterfrom
fix/swg-18979-missing-resolved-operation
Draft

fix(resolver): re-evaluate element to be transcluded#4191
glowcloud wants to merge 1 commit intomasterfrom
fix/swg-18979-missing-resolved-operation

Conversation

@glowcloud
Copy link
Copy Markdown
Contributor

Fixes an issue where resolving a subtree would cause it to be null.

This issue could be seen in Swagger Editor when trying to edit an operation that was expanded in Swagger UI - sometimes the operation would disappear. The resolver was called 3 times with the expanded operation and the last one would sometimes return null. This was caused by the transcluder being unable to find the element that should be replaced inside of the original spec, most likely due to mutations that happened to the dereferenced element. To prevent this, an additional evaluation of JSON pointer was added to find the original element and try to transclude it instead of the mutated one.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant