diff --git a/packages/kcms/src/team/adaptor/validator/team.ts b/packages/kcms/src/team/adaptor/validator/team.ts index bcc31ab4..e20eb4f9 100644 --- a/packages/kcms/src/team/adaptor/validator/team.ts +++ b/packages/kcms/src/team/adaptor/validator/team.ts @@ -35,3 +35,13 @@ export const PostTeamsRequestSchema = z.array( ); export const PostTeamsResponseSchema = z.array(TeamSchema).openapi('Teams'); + +export const TeamIdParamsSchema = z.object({ + teamid: z.string().openapi({ + param: { + name: 'teamid', + in: 'path', + }, + example: '7549586', + }), +}); diff --git a/packages/kcms/src/team/routing.ts b/packages/kcms/src/team/routing.ts index d55fe469..9cbc982e 100644 --- a/packages/kcms/src/team/routing.ts +++ b/packages/kcms/src/team/routing.ts @@ -4,6 +4,7 @@ import { CommonErrorSchema, PostTeamsRequestSchema, PostTeamsResponseSchema, + TeamIdParamsSchema, } from './adaptor/validator/team'; export const GetTeamsRoute = createRoute({ @@ -61,3 +62,24 @@ export const PostTeamsRoute = createRoute({ }, }, }); + +export const DeleteTeamRoute = createRoute({ + method: 'delete', + path: '/team/{teamid}', + request: { + params: TeamIdParamsSchema, + }, + responses: { + 204: { + description: 'Delete Team', + }, + 400: { + content: { + 'application/json': { + schema: CommonErrorSchema, + }, + }, + description: 'Common Error', + }, + }, +});