add openapi registers

This commit is contained in:
miloschwartz 2025-04-06 22:44:14 -04:00
parent a76e3e00f7
commit d260450a84
No known key found for this signature in database
50 changed files with 852 additions and 60 deletions

View file

@ -10,6 +10,7 @@ import logger from "@server/logger";
import { deletePeer } from "../gerbil/peers";
import { fromError } from "zod-validation-error";
import { sendToClient } from "../ws";
import { OpenAPITags, registry } from "@server/openApi";
const deleteSiteSchema = z
.object({
@ -17,6 +18,17 @@ const deleteSiteSchema = z
})
.strict();
registry.registerPath({
method: "delete",
path: "/site/{siteId}",
description: "Delete a site and all its associated data.",
tags: [OpenAPITags.Site],
request: {
params: deleteSiteSchema
},
responses: {}
});
export async function deleteSite(
req: Request,
res: Response,