Reading configuration parameters from URL search params is by default no longer enabled. To re-enable it, set queryConfigEnabled configuration parameter to true. Functionally, this is a breaking change, but given we're just providing a security vulnerability patch we're considering this a PATCH version bump only. Refs #4872 Refs https://github.com/swagger-api/swagger-ui/security/advisories/GHSA-qrmm-w75w-3wpx
78 lines
1.7 KiB
HTML
78 lines
1.7 KiB
HTML
<!-- HTML for dev server -->
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Swagger UI</title>
|
|
<link rel="stylesheet" type="text/css" href="/swagger-ui.css">
|
|
<style>
|
|
html {
|
|
box-sizing: border-box;
|
|
overflow: -moz-scrollbars-vertical;
|
|
overflow-y: scroll;
|
|
}
|
|
|
|
*,
|
|
*:before,
|
|
*:after {
|
|
box-sizing: inherit;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
background: #fafafa;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="swagger-ui"></div>
|
|
|
|
<script src="/swagger-ui-bundle.js" charset="UTF-8"> </script>
|
|
<script src="/swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
|
|
<script>
|
|
window.onload = function () {
|
|
window["SwaggerUIBundle"] = window["swagger-ui-bundle"]
|
|
window["SwaggerUIStandalonePreset"] = window["swagger-ui-standalone-preset"]
|
|
// Build a system
|
|
const ui = SwaggerUIBundle({
|
|
url: "https://petstore.swagger.io/v2/swagger.json",
|
|
urls: [
|
|
{
|
|
name: "USPTO",
|
|
url: "./uspto.yaml"
|
|
},
|
|
{
|
|
name: "Examples",
|
|
url: "./api-with-examples.yaml"
|
|
},
|
|
],
|
|
dom_id: '#swagger-ui',
|
|
presets: [
|
|
SwaggerUIBundle.presets.apis,
|
|
SwaggerUIStandalonePreset
|
|
],
|
|
plugins: [
|
|
SwaggerUIBundle.plugins.DownloadUrl
|
|
],
|
|
layout: "StandaloneLayout",
|
|
onComplete: () => {
|
|
if (window.completeCount) {
|
|
window.completeCount++
|
|
} else {
|
|
window.completeCount = 1
|
|
}
|
|
},
|
|
queryConfigEnabled: true,
|
|
})
|
|
|
|
window.ui = ui
|
|
}
|
|
</script>
|
|
</body>
|
|
|
|
</html>
|