Skip to content

Commit a57766d

Browse files
committed
Add Articles API with JWT authentication and update demo info
- Introduced a new Articles API for managing articles, including endpoints for creating, retrieving, updating, and deleting articles. - Implemented JWT authentication for secure access to the API. - Added pagination and filtering options for retrieving articles. - Included schemas for request and response models in the OpenAPI specification. - Updated demo-info.json to include the new Articles API. - Modified bundle.js to improve response handling for file downloads. - Created interactive-api.json for the new Articles API specifications.
1 parent 6c77033 commit a57766d

File tree

5 files changed

+1699
-13
lines changed

5 files changed

+1699
-13
lines changed

src/core/demo-dist/bundle.js

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13472,24 +13472,30 @@ function displayActualResponse(
1347213472
} else {
1347313473
copyActualResponseBtn.style.display = "flex";
1347413474
}
13475-
} if (downloadData) {
13475+
}
13476+
if (downloadData) {
1347613477
// Handle file download display
1347713478
if (responseBodyContainer) {
1347813479
// Hide Monaco editor container
1347913480
responseBodyContainer.style.display = "none";
1348013481
responseBodyContainer.classList.add("hidden");
1348113482

1348213483
// Check if download container already exists
13483-
let downloadContainer = document.getElementById("download-response-container");
13484+
let downloadContainer = document.getElementById(
13485+
"download-response-container"
13486+
);
1348413487
if (!downloadContainer) {
1348513488
// Create download interface container
1348613489
downloadContainer = document.createElement("div");
1348713490
downloadContainer.id = "download-response-container";
1348813491
downloadContainer.className =
1348913492
"flex flex-col items-center justify-center h-full p-8 bg-gray-800 border border-gray-600 rounded-md";
13490-
13493+
1349113494
// Insert after the response body container
13492-
responseBodyContainer.parentNode.insertBefore(downloadContainer, responseBodyContainer.nextSibling);
13495+
responseBodyContainer.parentNode.insertBefore(
13496+
downloadContainer,
13497+
responseBodyContainer.nextSibling
13498+
);
1349313499
}
1349413500

1349513501
downloadContainer.innerHTML = `
@@ -13540,12 +13546,14 @@ function displayActualResponse(
1354013546
return;
1354113547
} else {
1354213548
// Hide download container if it exists (for regular responses)
13543-
const downloadContainer = document.getElementById("download-response-container");
13549+
const downloadContainer = document.getElementById(
13550+
"download-response-container"
13551+
);
1354413552
if (downloadContainer) {
1354513553
downloadContainer.style.display = "none";
1354613554
downloadContainer.classList.add("hidden");
1354713555
}
13548-
13556+
1354913557
// Ensure response body container is visible for regular responses
1355013558
if (responseBodyContainer) {
1355113559
responseBodyContainer.style.display = "block";

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
"version": "1.0.0",
1616
"description": "An API for uploading and downloading files with validation rules."
1717
},
18+
{
19+
"file": "interactive-api.json",
20+
"title": "Articles API",
21+
"version": "v1",
22+
"description": "A sample API for managing articles with JWT authentication"
23+
},
1824
{
1925
"file": "sample-api.json",
2026
"title": "Demonstration API",
@@ -28,5 +34,5 @@
2834
"description": "A comprehensive test API demonstrating all supported OpenAPI security schemes"
2935
}
3036
],
31-
"buildDate": "2025-06-08T10:17:22.206Z"
37+
"buildDate": "2025-06-08T12:32:35.312Z"
3238
}

0 commit comments

Comments
 (0)