Skip to content

Commit

Permalink
disable url parameter in swagger-ui page (backport cosmos#11202) (cos…
Browse files Browse the repository at this point in the history
…mos#11207)

* disable url parameter in swagger-ui page (cosmos#11202)

Closes: cosmos#11201
Solution:
- update swagger-ui to recent release
- add option `queryConfigEnabled: false`

(cherry picked from commit cb6fea9)

# Conflicts:
#	client/docs/statik/statik.go
#	client/docs/swagger-ui/swagger-ui-bundle.js
#	client/docs/swagger-ui/swagger-ui-bundle.js.map
#	client/docs/swagger-ui/swagger-ui-es-bundle-core.js
#	client/docs/swagger-ui/swagger-ui-es-bundle-core.js.map
#	client/docs/swagger-ui/swagger-ui-es-bundle.js
#	client/docs/swagger-ui/swagger-ui-es-bundle.js.map
#	client/docs/swagger-ui/swagger-ui-standalone-preset.js
#	client/docs/swagger-ui/swagger-ui-standalone-preset.js.map
#	client/docs/swagger-ui/swagger-ui.js
#	client/docs/swagger-ui/swagger-ui.js.map

* fix conflicts

* override swagger-ui after resolve conflicts

Co-authored-by: yihuang <[email protected]>
Co-authored-by: marbar3778 <[email protected]>
  • Loading branch information
3 people authored and JeancarloBarrios committed Sep 28, 2024
1 parent f8778c3 commit f7c130d
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 1 deletion.
27 changes: 26 additions & 1 deletion client/docs/swagger-ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,31 @@
<script type="module" src="rapidoc-min.js"></script>
</head>
<body>
<rapi-doc spec-url = "swagger.yaml"> </rapi-doc>
<div id="swagger-ui"></div>

<script src="swagger-ui-bundle.js"> </script>
<script src="swagger-ui-standalone-preset.js"> </script>
<script>
window.onload = function() {

// Build a system
const ui = SwaggerUIBundle({
url: "./swagger.yaml",
dom_id: '#swagger-ui',
deepLinking: true,
queryConfigEnabled: false,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
})

window.ui = ui
}
</script>
</body>
</html>
1 change: 1 addition & 0 deletions client/docs/swagger-ui/swagger-ui-bundle.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions client/docs/swagger-ui/swagger-ui-es-bundle-core.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions client/docs/swagger-ui/swagger-ui-es-bundle-core.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions client/docs/swagger-ui/swagger-ui-es-bundle.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions client/docs/swagger-ui/swagger-ui-es-bundle.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions client/docs/swagger-ui/swagger-ui-standalone-preset.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions client/docs/swagger-ui/swagger-ui.css.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions client/docs/swagger-ui/swagger-ui.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions client/docs/swagger-ui/swagger-ui.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions scripts/update-swagger-ui-statik.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
statik -src=./client/docs/swagger-ui -dest=./client/docs -f

0 comments on commit f7c130d

Please sign in to comment.