Skip to content

Commit ed62b1a

Browse files
committed
feat: enhance subscription info endpoint with response documentation
- Added ApiResponse decorator to the getSubscriptionInfoByShortUuid method to document successful response with status 200 and description for better API clarity.
1 parent e43eb92 commit ed62b1a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/modules/subscription/subscription.controller.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Request, Response } from 'express';
22

33
import { Controller, Get, Param, Req, Res, UseFilters } from '@nestjs/common';
4-
import { ApiParam, ApiTags } from '@nestjs/swagger';
4+
import { ApiParam, ApiResponse, ApiTags } from '@nestjs/swagger';
55

66
import { HttpExceptionFilter } from '@common/exception/httpException.filter';
77
import { errorHandler } from '@common/helpers/error-handler.helper';
@@ -30,6 +30,11 @@ export class SubscriptionController {
3030
description: 'Short UUID of the user',
3131
required: true,
3232
})
33+
@ApiResponse({
34+
status: 200,
35+
description: 'Subscription info fetched successfully',
36+
type: GetSubscriptionInfoResponseDto,
37+
})
3338
@Get('/:shortUuid' + SUBSCRIPTION_ROUTES.GET_INFO)
3439
async getSubscriptionInfoByShortUuid(
3540
@Param() { shortUuid }: GetSubscriptionInfoRequestDto,

0 commit comments

Comments
 (0)