Skip to content

Commit

Permalink
Disable swagger try it out buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
odan committed Mar 27, 2022
1 parent 4332fbe commit d705770
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions templates/doc/swagger.php
Expand Up @@ -7,7 +7,7 @@
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/3.35.0/swagger-ui.min.css"
integrity="sha512-jsql70MmFqKJfWGCXmi3GHPP2q2oi3Ad+6PRQWNeo6df+rxKB07IuBvcCXSrpgKPXaikkQgEQVO2YrtgmSJhUw=="
crossorigin="anonymous" />
crossorigin="anonymous"/>
</head>
<body>
<div id="swagger-ui"></div>
Expand All @@ -23,16 +23,27 @@
window.onload = function () {
const ui = SwaggerUIBundle({
spec: <?= $spec ?>,
dom_id: '#swagger-ui',
dom_id: '#swagger-ui',
deepLinking: true,
supportedSubmitMethods: [],
presets: [
SwaggerUIBundle.presets.apis,
],
SwaggerUIBundle.presets.apis,
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
})
SwaggerUIBundle.plugins.DownloadUrl,
function() {
return {
statePlugins: {
spec: {
wrapSelectors: {
allowTryItOutFor: () => () => false
}
}
}
}
}
],
})
window.ui = ui
}
</script>
Expand Down

0 comments on commit d705770

Please sign in to comment.