forked from swagger-api/swagger-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improvement: generate default oauth2RedirectUrl based on page locatio…
…n, including the path (an omission of swagger-api#5085)
- Loading branch information
1 parent
325909f
commit 65c3fb7
Showing
3 changed files
with
86 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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 file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<!-- 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" > | ||
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32" /> | ||
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16" /> | ||
<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", | ||
dom_id: '#swagger-ui', | ||
presets: [ | ||
SwaggerUIBundle.presets.apis, | ||
SwaggerUIStandalonePreset | ||
], | ||
plugins: [ | ||
SwaggerUIBundle.plugins.DownloadUrl | ||
], | ||
layout: SwaggerUIStandalonePreset ? "StandaloneLayout" : "BaseLayout", | ||
onComplete: () => { | ||
if(window.completeCount) { | ||
window.completeCount++ | ||
} else { | ||
window.completeCount = 1 | ||
} | ||
} | ||
}) | ||
|
||
window.ui = ui | ||
} | ||
</script> | ||
</body> | ||
|
||
</html> |
This file contains 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