refactor(dist): remove inline-code (#7905)

* apply /dist changes to /dev-helpers

* add missing "useBasicAuthenticationWithAccessCodeGrant: false" after merge conflict

Co-authored-by: akop <akop@ppi.de>
Co-authored-by: Tim Lai <timothy.lai@gmail.com>
This commit is contained in:
Daniil Leontiev
2022-03-24 02:11:50 +03:00
committed by GitHub
parent 7b06ac1b7c
commit ec51dc38e9
8 changed files with 108 additions and 125 deletions

View File

@@ -0,0 +1,31 @@
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: "StandaloneLayout"
})
window.ui = ui
ui.initOAuth({
clientId: "your-client-id",
clientSecret: "your-client-secret-if-required",
realm: "your-realms",
appName: "your-app-name",
scopeSeparator: " ",
scopes: "openid profile email phone address",
additionalQueryStringParams: {},
useBasicAuthenticationWithAccessCodeGrant: false,
usePkceWithAuthorizationCodeGrant: false
})
}