Allow links to be opened from Swagger UI documentations
What does this MR do and why?
This MR relaxes the sandbox restrictions for Swagger UI to make the links openable. We found couple of instances where links are present in the specification documents, and it'd be fine to allow them to be opened.
This was fixed by adding the allow-popups
to the iFrame sandbox attribute:
Allows popups (like from window.open, target="_blank", showModalDialog). If this keyword is not used, that functionality will silently fail.
Screenshots or screen recordings
The links are currently blocked with the issue:
No browser error after this change
How to set up and validate locally
- Create a new
openapi.yml
file (example) - Add an external link to another website
- The link should be openable now.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Eduardo Sanz García