add clients openapi registries

This commit is contained in:
miloschwartz 2025-04-20 17:00:45 -04:00
parent fa6fc9e80d
commit 490ddfcd88
No known key found for this signature in database
6 changed files with 90 additions and 18 deletions

View file

@ -8,6 +8,7 @@ import HttpCode from "@server/types/HttpCode";
import createHttpError from "http-errors";
import logger from "@server/logger";
import { fromError } from "zod-validation-error";
import { OpenAPITags, registry } from "@server/openApi";
const deleteClientSchema = z
.object({
@ -15,6 +16,17 @@ const deleteClientSchema = z
})
.strict();
registry.registerPath({
method: "delete",
path: "/client/{clientId}",
description: "Delete a client by its client ID.",
tags: [OpenAPITags.Client],
request: {
params: deleteClientSchema
},
responses: {}
});
export async function deleteClient(
req: Request,
res: Response,
@ -73,4 +85,4 @@ export async function deleteClient(
createHttpError(HttpCode.INTERNAL_SERVER_ERROR, "An error occurred")
);
}
}
}