You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

74 rivejä
1.8 KiB

  1. <!-- HTML for dev server -->
  2. <!DOCTYPE html>
  3. <html lang="en">
  4. <head>
  5. <meta charset="UTF-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>Swagger UI</title>
  8. <link rel="stylesheet" type="text/css" href="./swagger-ui.css" >
  9. <link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
  10. <link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
  11. <style>
  12. html
  13. {
  14. box-sizing: border-box;
  15. overflow: -moz-scrollbars-vertical;
  16. overflow-y: scroll;
  17. }
  18. *,
  19. *:before,
  20. *:after
  21. {
  22. box-sizing: inherit;
  23. }
  24. body
  25. {
  26. margin:0;
  27. background: #fafafa;
  28. }
  29. </style>
  30. </head>
  31. <body>
  32. <div id="swagger-ui"></div>
  33. <script src="./swagger-ui-bundle.js"> </script>
  34. <script src="./swagger-ui-standalone-preset.js"> </script>
  35. <script>
  36. window.onload = function() {
  37. window["SwaggerUIBundle"] = window["swagger-ui-bundle"]
  38. window["SwaggerUIStandalonePreset"] = window["swagger-ui-standalone-preset"]
  39. // Build a system
  40. const ui = SwaggerUIBundle({
  41. url: "https://petstore.swagger.io/v2/swagger.json",
  42. dom_id: '#swagger-ui',
  43. presets: [
  44. SwaggerUIBundle.presets.apis,
  45. SwaggerUIStandalonePreset
  46. ],
  47. plugins: [
  48. SwaggerUIBundle.plugins.DownloadUrl
  49. ],
  50. layout: "StandaloneLayout"
  51. })
  52. window.ui = ui
  53. ui.initOAuth({
  54. clientId: "your-client-id",
  55. clientSecret: "your-client-secret-if-required",
  56. realm: "your-realms",
  57. appName: "your-app-name",
  58. scopeSeparator: " ",
  59. scopes: "openid profile email phone address",
  60. additionalQueryStringParams: {},
  61. usePkceWithAuthorizationCodeGrant: false
  62. })
  63. }
  64. </script>
  65. </body>
  66. </html>