Skip to content

Commit 0d5c2c6

Browse files
committed
feat: clear authentication section content and remove unused sample API specification
1 parent 81d7716 commit 0d5c2c6

File tree

5 files changed

+26
-650
lines changed

5 files changed

+26
-650
lines changed

src/core/demo-dist/bundle.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18771,7 +18771,6 @@ class DemoMode {
1877118771
window.utils.showToast("Error applying specification", "error");
1877218772
}
1877318773
}
18774-
1877518774
clearCurrentState() {
1877618775
// Clear main content
1877718776
const mainContent = document.getElementById("api-main-content");
@@ -18791,6 +18790,18 @@ class DemoMode {
1879118790
rightPanel.innerHTML = "";
1879218791
}
1879318792

18793+
// Clear auth section content
18794+
const authSectionContent = document.querySelector("#auth-section .p-6");
18795+
if (authSectionContent) {
18796+
// Keep the title but remove all dynamically generated content
18797+
authSectionContent.innerHTML = `
18798+
<div class="flex items-center justify-between mb-4">
18799+
<h2 class="font-semibold text-lg">Authentication</h2>
18800+
</div>
18801+
<!-- Security scheme content will be dynamically inserted here -->
18802+
`;
18803+
}
18804+
1879418805
// Reset any active states
1879518806
document.querySelectorAll(".endpoint-link.active").forEach((el) => {
1879618807
el.classList.remove("active");

src/core/demo-dist/demo-info.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,12 @@
1515
"version": "v1",
1616
"description": "A sample API for managing articles with JWT authentication"
1717
},
18-
{
19-
"file": "sample-api.json",
20-
"title": "Demonstration API",
21-
"version": "1.0.0",
22-
"description": "A comprehensive API specification to demonstrate various OpenAPI 3.0.0 features for UI rendering testing."
23-
},
2418
{
2519
"file": "test-security-swagger.json",
2620
"title": "Comprehensive Security Test API",
2721
"version": "2.0.0",
2822
"description": "A comprehensive test API demonstrating all supported OpenAPI security schemes"
2923
}
3024
],
31-
"buildDate": "2025-06-08T12:32:35.312Z"
32-
}
25+
"buildDate": "2025-06-11T14:04:43.171Z"
26+
}

src/core/js/demoMode.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,6 @@ class DemoMode {
444444
window.utils.showToast("Error applying specification", "error");
445445
}
446446
}
447-
448447
clearCurrentState() {
449448
// Clear main content
450449
const mainContent = document.getElementById("api-main-content");
@@ -464,6 +463,18 @@ class DemoMode {
464463
rightPanel.innerHTML = "";
465464
}
466465

466+
// Clear auth section content
467+
const authSectionContent = document.querySelector("#auth-section .p-6");
468+
if (authSectionContent) {
469+
// Keep the title but remove all dynamically generated content
470+
authSectionContent.innerHTML = `
471+
<div class="flex items-center justify-between mb-4">
472+
<h2 class="font-semibold text-lg">Authentication</h2>
473+
</div>
474+
<!-- Security scheme content will be dynamically inserted here -->
475+
`;
476+
}
477+
467478
// Reset any active states
468479
document.querySelectorAll(".endpoint-link.active").forEach((el) => {
469480
el.classList.remove("active");

0 commit comments

Comments
 (0)