@kong-ui-public/spec-renderer 2.0.38 → 2.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/spec-renderer.es.js
CHANGED
|
@@ -49066,11 +49066,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
49066
49066
|
}
|
|
49067
49067
|
init() {
|
|
49068
49068
|
if (Sn(this, Hc))
|
|
49069
|
-
|
|
49069
|
+
return void console.warn("SwaggerUI is already initialized");
|
|
49070
49070
|
if (!this.isConnected)
|
|
49071
|
-
|
|
49071
|
+
return void console.warn("kong-swagger-ui is no longer connected");
|
|
49072
49072
|
if (!Sn(this, Rp) && !Sn(this, Vu))
|
|
49073
|
-
|
|
49073
|
+
return void console.warn("either `spec` or `url` has to be set to initialize SwaggerUI");
|
|
49074
49074
|
if ((this.relativeSidebar && !Sn(this, Wu) || Sn(this, zp) && !Sn(this, fu)) && console.warn('For correct positioning, you must enable the sidebar with `has-sidebar="true"` and should only display essentials with `essentials-only="true"`'), Fk.use({ target: this.shadowRoot, testId: "default-styles" }), d1.use({ target: this.shadowRoot, testId: "overrides-styles" }), Sn(this, Wu) && Sn(this, fu) && Sn(this, zp)) {
|
|
49075
49075
|
const a = document.createElement("style");
|
|
49076
49076
|
a.innerHTML = `
|
|
@@ -49145,7 +49145,7 @@ div#sidebar {
|
|
|
49145
49145
|
}
|
|
49146
49146
|
set spec(r) {
|
|
49147
49147
|
if (!r)
|
|
49148
|
-
|
|
49148
|
+
return void console.warn("spec cannot be empty");
|
|
49149
49149
|
let a;
|
|
49150
49150
|
typeof r == "string" ? a = JSON.parse(r) : typeof r == "object" && (a = r), bl(this, Vu, a), Sn(this, Hc) && Sn(this, Hc).getSystem().specActions.updateJsonSpec(Sn(this, Vu));
|
|
49151
49151
|
}
|