Skip to content

Commit c737c0a

Browse files
committed
update doc
1 parent 62c3284 commit c737c0a

File tree

16 files changed

+261
-214
lines changed

16 files changed

+261
-214
lines changed

docs/demo/build-in-multiple/index.html

Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<script>__md_scope=new URL("../..",location),__md_hash=e=>[...e].reduce((e,_)=>(e<<5)-e+_.charCodeAt(0),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
1818
<script id="__analytics">function __md_analytics(){function n(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],n("js",new Date),n("config","G-XYSWM3DNCQ"),document.addEventListener("DOMContentLoaded",function(){if(document.forms.search&&document.forms.search.query.addEventListener("blur",function(){this.value&&n("event","search",{search_term:this.value})}),document.forms.feedback){var e,a=document.forms.feedback;for(e of a.querySelectorAll("[type=submit]"))e.addEventListener("click",function(e){e.preventDefault();var t=document.location.pathname,e=this.getAttribute("data-md-value");n("event","feedback",{page:t,data:e}),a.firstElementChild.disabled=!0;e=a.querySelector(".md-feedback__note [data-md-value='"+e+"']");e&&(e.hidden=!1)}),a.hidden=!1}"undefined"!=typeof location$&&location$.subscribe(function(e){n("config","G-XYSWM3DNCQ",{page_path:e.pathname})})});var e=document.createElement("script");e.async=!0,e.src="https://www.googletagmanager.com/gtag/js?id=G-XYSWM3DNCQ",document.getElementById("__analytics").insertAdjacentElement("afterEnd",e)}</script>
1919
<script>"undefined"!=typeof __md_analytics&&__md_analytics()</script>
20-
<link href="../../assets/stylesheets/glightbox.min.css" rel="stylesheet"/><script src="../../assets/javascripts/glightbox.min.js"></script></head>
20+
<link href="../../assets/stylesheets/glightbox.min.css" rel="stylesheet"/><style>html.glightbox-open { overflow: initial; }</style><script src="../../assets/javascripts/glightbox.min.js"></script></head>
2121
<body data-md-color-accent="" data-md-color-primary="" data-md-color-scheme="" dir="ltr">
2222
<input autocomplete="off" class="md-toggle" data-md-toggle="drawer" id="__drawer" type="checkbox"/>
2323
<input autocomplete="off" class="md-toggle" data-md-toggle="search" id="__search" type="checkbox"/>
@@ -221,10 +221,10 @@ <h2 id="markdown">Markdown</h2>
221221
<a href="#__codelineno-0-5" id="__codelineno-0-5" name="__codelineno-0-5"></a>&lt;swagger-ui grouped name="Sample Third" src="./openapi-spec/sample-third.yaml"/&gt;
222222
</code></pre></div>
223223
<h2 id="multiple-oas-in-single-swagger-ui">Multiple OAS in single Swagger UI</h2>
224-
<p><iframe frameborder="0" id="c7184bba" src="swagger-c7184bba.html" style="overflow:hidden;width:100%;" width="100%"></iframe>
224+
<p><iframe class="swagger-ui-iframe" frameborder="0" id="8bb4c4ec" src="swagger-8bb4c4ec.html" style="overflow:hidden;width:100%;" width="100%"></iframe>
225225
</p>
226226
<h2 id="other-independent-swagger-ui">Other independent Swagger UI</h2>
227-
<p><iframe frameborder="0" id="908d8886" src="swagger-908d8886.html" style="overflow:hidden;width:100%;" width="100%"></iframe></p>
227+
<p><iframe class="swagger-ui-iframe" frameborder="0" id="0c50a7b3" src="swagger-0c50a7b3.html" style="overflow:hidden;width:100%;" width="100%"></iframe></p>
228228
</article>
229229
<script>var input,hash=location.hash.slice(1);hash.startsWith("__tabbed_")&&((input=document.getElementById(hash)).checked=!0)</script>
230230
</div>
@@ -265,46 +265,47 @@ <h2 id="other-independent-swagger-ui">Other independent Swagger UI</h2>
265265
</div>
266266
<script id="__config" type="application/json">{"base": "../..", "features": ["toc.integrate"], "search": "../../assets/javascripts/workers/search.720157f5.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.config.lang": "en", "search.config.pipeline": "stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version.title": "Select version"}}</script>
267267
<script src="../../assets/javascripts/bundle.5e3df397.min.js"></script>
268-
<script type="text/javascript">
269-
update_swagger_ui_iframe_height = function (id) {
270-
var iFrameID = document.getElementById(id);
271-
if (iFrameID) {
272-
full_height = (iFrameID.contentWindow.document.body.scrollHeight + 80) + "px";
273-
iFrameID.height = full_height;
274-
iFrameID.style.height = full_height;
275-
}
268+
<script>document$.subscribe(() => {
269+
window.update_swagger_ui_iframe_height = function (id) {
270+
var iFrameID = document.getElementById(id);
271+
if (iFrameID) {
272+
full_height = (iFrameID.contentWindow.document.body.scrollHeight + 80) + "px";
273+
iFrameID.height = full_height;
274+
iFrameID.style.height = full_height;
276275
}
277-
var scheme = document.body.getAttribute("data-md-color-scheme")
278-
const options = {
279-
childList: true,
280-
attributes: true,
281-
characterData: false,
282-
subtree: false,
283-
attributeFilter: ['data-md-color-scheme'],
284-
attributeOldValue: false,
285-
characterDataOldValue: false
286-
};
287-
288-
const iframe_id_list = ["908d8886", "c7184bba"]
289-
290-
function color_scheme_callback(mutations) {
291-
for (let mutation of mutations) {
292-
if (mutation.attributeName === "data-md-color-scheme") {
293-
scheme = document.body.getAttribute("data-md-color-scheme")
294-
iframe_id_list.forEach((id) => {
295-
var ele = document.getElementById(id);
296-
if (ele) {
297-
if (scheme === "slate") {
298-
ele.contentWindow.enable_dark_mode();
299-
} else {
300-
ele.contentWindow.disable_dark_mode();
301-
}
276+
}
277+
278+
window.scheme = document.body.getAttribute("data-md-color-scheme")
279+
const options = {
280+
childList: true,
281+
attributes: true,
282+
characterData: false,
283+
subtree: false,
284+
attributeFilter: ['data-md-color-scheme'],
285+
attributeOldValue: false,
286+
characterDataOldValue: false
287+
};
288+
function color_scheme_callback(mutations) {
289+
for (let mutation of mutations) {
290+
if (mutation.attributeName === "data-md-color-scheme") {
291+
scheme = document.body.getAttribute("data-md-color-scheme")
292+
var iframe_list = document.getElementsByClassName("swagger-ui-iframe")
293+
for(var i = 0; i < iframe_list.length; i++) {
294+
var ele = iframe_list.item(i);
295+
if (ele) {
296+
if (scheme === "slate") {
297+
ele.contentWindow.enable_dark_mode();
298+
} else {
299+
ele.contentWindow.disable_dark_mode();
302300
}
303-
})
301+
}
304302
}
305303
}
306304
}
307-
observer = new MutationObserver(color_scheme_callback);
308-
observer.observe(document.body, options);
309-
</script><script type="text/javascript">const lightbox = GLightbox({"touchNavigation": true, "loop": true});</script></body>
305+
}
306+
observer = new MutationObserver(color_scheme_callback);
307+
observer.observe(document.body, options);
308+
})</script><script>document$.subscribe(() => {
309+
const lightbox = GLightbox({"touchNavigation": true, "loop": true});
310+
})</script></body>
310311
</html>

docs/demo/build-in-multiple/swagger-908d8886.html renamed to docs/demo/build-in-multiple/swagger-0c50a7b3.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
}
4747
}
4848
const resize_ob = new ResizeObserver(function(entries) {
49-
parent.update_swagger_ui_iframe_height("908d8886");
49+
parent.update_swagger_ui_iframe_height("0c50a7b3");
5050
});
5151

5252
// start observing for resize

docs/demo/build-in-multiple/swagger-c7184bba.html renamed to docs/demo/build-in-multiple/swagger-8bb4c4ec.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
}
6060
}
6161
const resize_ob = new ResizeObserver(function(entries) {
62-
parent.update_swagger_ui_iframe_height("c7184bba");
62+
parent.update_swagger_ui_iframe_height("8bb4c4ec");
6363
});
6464

6565
// start observing for resize

docs/demo/multiple/index.html

Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<script>__md_scope=new URL("../..",location),__md_hash=e=>[...e].reduce((e,_)=>(e<<5)-e+_.charCodeAt(0),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
1818
<script id="__analytics">function __md_analytics(){function n(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],n("js",new Date),n("config","G-XYSWM3DNCQ"),document.addEventListener("DOMContentLoaded",function(){if(document.forms.search&&document.forms.search.query.addEventListener("blur",function(){this.value&&n("event","search",{search_term:this.value})}),document.forms.feedback){var e,a=document.forms.feedback;for(e of a.querySelectorAll("[type=submit]"))e.addEventListener("click",function(e){e.preventDefault();var t=document.location.pathname,e=this.getAttribute("data-md-value");n("event","feedback",{page:t,data:e}),a.firstElementChild.disabled=!0;e=a.querySelector(".md-feedback__note [data-md-value='"+e+"']");e&&(e.hidden=!1)}),a.hidden=!1}"undefined"!=typeof location$&&location$.subscribe(function(e){n("config","G-XYSWM3DNCQ",{page_path:e.pathname})})});var e=document.createElement("script");e.async=!0,e.src="https://www.googletagmanager.com/gtag/js?id=G-XYSWM3DNCQ",document.getElementById("__analytics").insertAdjacentElement("afterEnd",e)}</script>
1919
<script>"undefined"!=typeof __md_analytics&&__md_analytics()</script>
20-
<link href="../../assets/stylesheets/glightbox.min.css" rel="stylesheet"/><script src="../../assets/javascripts/glightbox.min.js"></script></head>
20+
<link href="../../assets/stylesheets/glightbox.min.css" rel="stylesheet"/><style>html.glightbox-open { overflow: initial; }</style><script src="../../assets/javascripts/glightbox.min.js"></script></head>
2121
<body data-md-color-accent="" data-md-color-primary="" data-md-color-scheme="" dir="ltr">
2222
<input autocomplete="off" class="md-toggle" data-md-toggle="drawer" id="__drawer" type="checkbox"/>
2323
<input autocomplete="off" class="md-toggle" data-md-toggle="search" id="__search" type="checkbox"/>
@@ -206,8 +206,8 @@ <h2 id="markdown">Markdown</h2>
206206
<a href="#__codelineno-0-2" id="__codelineno-0-2" name="__codelineno-0-2"></a>&lt;swagger-ui src="https://petstore.swagger.io/v2/swagger.json"/&gt;
207207
</code></pre></div>
208208
<h2 id="swagger-ui">Swagger UI</h2>
209-
<p><iframe frameborder="0" id="123cadff" src="swagger-123cadff.html" style="overflow:hidden;width:100%;" width="100%"></iframe>
210-
<iframe frameborder="0" id="a71e52cc" src="swagger-a71e52cc.html" style="overflow:hidden;width:100%;" width="100%"></iframe></p>
209+
<p><iframe class="swagger-ui-iframe" frameborder="0" id="c9ee033c" src="swagger-c9ee033c.html" style="overflow:hidden;width:100%;" width="100%"></iframe>
210+
<iframe class="swagger-ui-iframe" frameborder="0" id="bf664e9f" src="swagger-bf664e9f.html" style="overflow:hidden;width:100%;" width="100%"></iframe></p>
211211
</article>
212212
<script>var input,hash=location.hash.slice(1);hash.startsWith("__tabbed_")&&((input=document.getElementById(hash)).checked=!0)</script>
213213
</div>
@@ -261,46 +261,47 @@ <h2 id="swagger-ui">Swagger UI</h2>
261261
</div>
262262
<script id="__config" type="application/json">{"base": "../..", "features": ["toc.integrate"], "search": "../../assets/javascripts/workers/search.720157f5.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.config.lang": "en", "search.config.pipeline": "stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version.title": "Select version"}}</script>
263263
<script src="../../assets/javascripts/bundle.5e3df397.min.js"></script>
264-
<script type="text/javascript">
265-
update_swagger_ui_iframe_height = function (id) {
266-
var iFrameID = document.getElementById(id);
267-
if (iFrameID) {
268-
full_height = (iFrameID.contentWindow.document.body.scrollHeight + 80) + "px";
269-
iFrameID.height = full_height;
270-
iFrameID.style.height = full_height;
271-
}
264+
<script>document$.subscribe(() => {
265+
window.update_swagger_ui_iframe_height = function (id) {
266+
var iFrameID = document.getElementById(id);
267+
if (iFrameID) {
268+
full_height = (iFrameID.contentWindow.document.body.scrollHeight + 80) + "px";
269+
iFrameID.height = full_height;
270+
iFrameID.style.height = full_height;
272271
}
273-
var scheme = document.body.getAttribute("data-md-color-scheme")
274-
const options = {
275-
childList: true,
276-
attributes: true,
277-
characterData: false,
278-
subtree: false,
279-
attributeFilter: ['data-md-color-scheme'],
280-
attributeOldValue: false,
281-
characterDataOldValue: false
282-
};
283-
284-
const iframe_id_list = ["123cadff", "a71e52cc"]
285-
286-
function color_scheme_callback(mutations) {
287-
for (let mutation of mutations) {
288-
if (mutation.attributeName === "data-md-color-scheme") {
289-
scheme = document.body.getAttribute("data-md-color-scheme")
290-
iframe_id_list.forEach((id) => {
291-
var ele = document.getElementById(id);
292-
if (ele) {
293-
if (scheme === "slate") {
294-
ele.contentWindow.enable_dark_mode();
295-
} else {
296-
ele.contentWindow.disable_dark_mode();
297-
}
272+
}
273+
274+
window.scheme = document.body.getAttribute("data-md-color-scheme")
275+
const options = {
276+
childList: true,
277+
attributes: true,
278+
characterData: false,
279+
subtree: false,
280+
attributeFilter: ['data-md-color-scheme'],
281+
attributeOldValue: false,
282+
characterDataOldValue: false
283+
};
284+
function color_scheme_callback(mutations) {
285+
for (let mutation of mutations) {
286+
if (mutation.attributeName === "data-md-color-scheme") {
287+
scheme = document.body.getAttribute("data-md-color-scheme")
288+
var iframe_list = document.getElementsByClassName("swagger-ui-iframe")
289+
for(var i = 0; i < iframe_list.length; i++) {
290+
var ele = iframe_list.item(i);
291+
if (ele) {
292+
if (scheme === "slate") {
293+
ele.contentWindow.enable_dark_mode();
294+
} else {
295+
ele.contentWindow.disable_dark_mode();
298296
}
299-
})
297+
}
300298
}
301299
}
302300
}
303-
observer = new MutationObserver(color_scheme_callback);
304-
observer.observe(document.body, options);
305-
</script><script type="text/javascript">const lightbox = GLightbox({"touchNavigation": true, "loop": true});</script></body>
301+
}
302+
observer = new MutationObserver(color_scheme_callback);
303+
observer.observe(document.body, options);
304+
})</script><script>document$.subscribe(() => {
305+
const lightbox = GLightbox({"touchNavigation": true, "loop": true});
306+
})</script></body>
306307
</html>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
}
4747
}
4848
const resize_ob = new ResizeObserver(function(entries) {
49-
parent.update_swagger_ui_iframe_height("a71e52cc");
49+
parent.update_swagger_ui_iframe_height("bf664e9f");
5050
});
5151

5252
// start observing for resize

docs/demo/static-file/swagger-48438df1.html renamed to docs/demo/multiple/swagger-c9ee033c.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
}
4747
}
4848
const resize_ob = new ResizeObserver(function(entries) {
49-
parent.update_swagger_ui_iframe_height("48438df1");
49+
parent.update_swagger_ui_iframe_height("c9ee033c");
5050
});
5151

5252
// start observing for resize

0 commit comments

Comments
 (0)