From 31345651dbbebf0babe33667a37a297f731d24dc Mon Sep 17 00:00:00 2001 From: Rory& Date: Thu, 22 Jan 2026 21:34:01 +0100 Subject: Make openapi.js work offline - still needs conditionals fixed though --- scripts/openapi.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'scripts/openapi.js') diff --git a/scripts/openapi.js b/scripts/openapi.js index 5afee152a..86d502e24 100644 --- a/scripts/openapi.js +++ b/scripts/openapi.js @@ -213,7 +213,7 @@ function apiRoutes(missingRoutes) { obj.tags = [...new Set([...(obj.tags || []), getTag(p)])]; - if (missingRoutes.additional.includes(path.replace(/\/$/, ""))) { + if (route.spacebarOnly === true || missingRoutes?.additional.includes(path.replace(/\/$/, ""))) { obj["x-badges"] = [ { label: "Spacebar-only", @@ -231,12 +231,13 @@ function apiRoutes(missingRoutes) { async function main() { console.log("Generating OpenAPI Specification..."); - const routesRes = await fetch("https://github.com/spacebarchat/missing-routes/raw/main/missing.json", { - headers: { - Accept: "application/json", - }, - }); - const missingRoutes = await routesRes.json(); + // const routesRes = await fetch("https://github.com/spacebarchat/missing-routes/raw/main/missing.json", { + // headers: { + // Accept: "application/json", + // }, + // }); + // const missingRoutes = await routesRes.json(); + let missingRoutes = undefined; combineSchemas(schemas); apiRoutes(missingRoutes); -- cgit 1.5.1