Document all registerPath responses and normalize OpenAPI parser schemas

Agent-Logs-Url: https://github.com/fosrl/pangolin/sessions/73990123-9c27-444b-bc6e-77e890a0d57c

Co-authored-by: oschwartz10612 <4999704+oschwartz10612@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-05-17 06:43:10 +00:00
committed by GitHub
parent 9cec711427
commit a0a093ed0b
160 changed files with 2661 additions and 182 deletions

View File

@@ -56,7 +56,22 @@ registry.registerPath({
}
}
},
responses: {}
responses: {
200: {
description: "Successful response",
content: {
"application/json": {
schema: z.object({
data: z.unknown().nullable(),
success: z.boolean(),
error: z.boolean(),
message: z.string(),
status: z.number()
})
}
}
}
}
});
export async function createRole(

View File

@@ -14,7 +14,7 @@ const deleteRoleSchema = z.strictObject({
roleId: z.coerce.number().int().positive()
});
const deelteRoleBodySchema = z.strictObject({
const deleteRoleBodySchema = z.strictObject({
roleId: z.coerce.number().int().positive()
});
@@ -28,12 +28,27 @@ registry.registerPath({
body: {
content: {
"application/json": {
schema: deelteRoleBodySchema
schema: deleteRoleBodySchema
}
}
}
},
responses: {}
responses: {
200: {
description: "Successful response",
content: {
"application/json": {
schema: z.object({
data: z.unknown().nullable(),
success: z.boolean(),
error: z.boolean(),
message: z.string(),
status: z.number()
})
}
}
}
}
});
export async function deleteRole(
@@ -52,7 +67,7 @@ export async function deleteRole(
);
}
const parsedBody = deelteRoleBodySchema.safeParse(req.body);
const parsedBody = deleteRoleBodySchema.safeParse(req.body);
if (!parsedBody.success) {
return next(
createHttpError(

View File

@@ -22,7 +22,22 @@ registry.registerPath({
request: {
params: getRoleSchema
},
responses: {}
responses: {
200: {
description: "Successful response",
content: {
"application/json": {
schema: z.object({
data: z.unknown().nullable(),
success: z.boolean(),
error: z.boolean(),
message: z.string(),
status: z.number()
})
}
}
}
}
});
export async function getRole(

View File

@@ -98,7 +98,22 @@ registry.registerPath({
params: listRolesParamsSchema,
query: listRolesSchema
},
responses: {}
responses: {
200: {
description: "Successful response",
content: {
"application/json": {
schema: z.object({
data: z.unknown().nullable(),
success: z.boolean(),
error: z.boolean(),
message: z.string(),
status: z.number()
})
}
}
}
}
});
export async function listRoles(

View File

@@ -53,7 +53,22 @@ registry.registerPath({
}
}
},
responses: {}
responses: {
200: {
description: "Successful response",
content: {
"application/json": {
schema: z.object({
data: z.unknown().nullable(),
success: z.boolean(),
error: z.boolean(),
message: z.string(),
status: z.number()
})
}
}
}
}
});
export async function updateRole(