Created
June 3, 2025 15:50
-
-
Save huanlin/9daf033ee3c218077b40bf23c8699a3a to your computer and use it in GitHub Desktop.
Enable SwaggerUI Deep Linking in Docsy
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
{{ $original := .Get "src" }} | |
<div id="docsy_swagger_ui"></div> | |
<script> | |
window.onload = function () { | |
const ui = SwaggerUIBundle({ | |
url: {{ $original | relURL }}, | |
dom_id: '#docsy_swagger_ui', | |
deepLinking: true, | |
presets: [ | |
SwaggerUIBundle.presets.apis, | |
SwaggerUIStandalonePreset | |
] | |
}); | |
window.ui = ui; | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment