From cb4cf01c4f4c6376429d1b340af71eb90a3622a1 Mon Sep 17 00:00:00 2001 From: SEAN Date: Sun, 1 Mar 2026 01:51:32 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20Stats=20Controller=20Swagger=20?= =?UTF-8?q?=EC=9D=91=EB=8B=B5=20=EC=8A=A4=ED=82=A4=EB=A7=88=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20(#265)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - StatsController 10개 메서드에 [ProducesResponseType] 어노테이션 추가 - Swagger 문서에서 Stats API 응답 스키마(DashboardResponseDto 등) 노출 Closes #265 --- SPMS.API/Controllers/StatsController.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/SPMS.API/Controllers/StatsController.cs b/SPMS.API/Controllers/StatsController.cs index 821f552..967afaa 100644 --- a/SPMS.API/Controllers/StatsController.cs +++ b/SPMS.API/Controllers/StatsController.cs @@ -22,6 +22,7 @@ public class StatsController : ControllerBase [HttpPost("daily")] [SwaggerOperation(Summary = "일별 통계 조회", Description = "기간별 일별 발송/성공/실패/열람 통계를 조회합니다. X-Service-Code 헤더 미지정 시 전체 서비스 통계를 조회합니다.")] + [ProducesResponseType(typeof(ApiResponse), 200)] public async Task GetDailyAsync([FromBody] DailyStatRequestDto request) { var serviceId = GetOptionalServiceId(); @@ -31,6 +32,7 @@ public class StatsController : ControllerBase [HttpPost("summary")] [SwaggerOperation(Summary = "요약 통계 조회", Description = "대시보드 요약 통계를 조회합니다. X-Service-Code 헤더 미지정 시 전체 서비스 통계를 조회합니다.")] + [ProducesResponseType(typeof(ApiResponse), 200)] public async Task GetSummaryAsync() { var serviceId = GetOptionalServiceId(); @@ -40,6 +42,7 @@ public class StatsController : ControllerBase [HttpPost("message")] [SwaggerOperation(Summary = "메시지별 통계 조회", Description = "특정 메시지의 발송 통계를 조회합니다. X-Service-Code 헤더 미지정 시 전체 서비스 통계를 조회합니다.")] + [ProducesResponseType(typeof(ApiResponse), 200)] public async Task GetMessageStatAsync([FromBody] MessageStatRequestDto request) { var serviceId = GetOptionalServiceId(); @@ -49,6 +52,7 @@ public class StatsController : ControllerBase [HttpPost("hourly")] [SwaggerOperation(Summary = "시간대별 통계 조회", Description = "시간대별 발송 추이를 조회합니다. X-Service-Code 헤더 미지정 시 전체 서비스 통계를 조회합니다.")] + [ProducesResponseType(typeof(ApiResponse), 200)] public async Task GetHourlyAsync([FromBody] HourlyStatRequestDto request) { var serviceId = GetOptionalServiceId(); @@ -58,6 +62,7 @@ public class StatsController : ControllerBase [HttpPost("device")] [SwaggerOperation(Summary = "디바이스 통계 조회", Description = "플랫폼/모델별 디바이스 분포를 조회합니다. X-Service-Code 헤더 미지정 시 전체 서비스 통계를 조회합니다.")] + [ProducesResponseType(typeof(ApiResponse), 200)] public async Task GetDeviceStatAsync() { var serviceId = GetOptionalServiceId(); @@ -77,6 +82,7 @@ public class StatsController : ControllerBase [HttpPost("failure")] [SwaggerOperation(Summary = "실패원인 통계 조회", Description = "실패 원인별 집계를 상위 N개로 조회합니다. X-Service-Code 헤더 미지정 시 전체 서비스 통계를 조회합니다.")] + [ProducesResponseType(typeof(ApiResponse), 200)] public async Task GetFailureStatAsync([FromBody] FailureStatRequestDto request) { var serviceId = GetOptionalServiceId(); @@ -86,6 +92,7 @@ public class StatsController : ControllerBase [HttpPost("dashboard")] [SwaggerOperation(Summary = "대시보드 통합 조회", Description = "KPI, 일별 추이, 시간대별 분포, 플랫폼 비율, 상위 메시지를 한번에 조회합니다. X-Service-Code 헤더 미지정 시 전체 서비스 통계를 조회합니다.")] + [ProducesResponseType(typeof(ApiResponse), 200)] public async Task GetDashboardAsync([FromBody] DashboardRequestDto request) { var serviceId = GetOptionalServiceId(); @@ -95,6 +102,7 @@ public class StatsController : ControllerBase [HttpPost("history/list")] [SwaggerOperation(Summary = "이력 목록 조회", Description = "메시지별 발송 이력 목록을 조회합니다. keyword/status/date 필터를 지원합니다. X-Service-Code 헤더 미지정 시 전체 서비스 이력을 조회합니다.")] + [ProducesResponseType(typeof(ApiResponse), 200)] public async Task GetHistoryListAsync([FromBody] HistoryListRequestDto request) { var serviceId = GetOptionalServiceId(); @@ -104,6 +112,7 @@ public class StatsController : ControllerBase [HttpPost("history/detail")] [SwaggerOperation(Summary = "이력 상세 조회", Description = "특정 메시지의 발송 이력 상세(기본정보+집계+실패사유+본문)를 조회합니다. X-Service-Code 헤더 미지정 시 전체 서비스에서 검색합니다.")] + [ProducesResponseType(typeof(ApiResponse), 200)] public async Task GetHistoryDetailAsync([FromBody] HistoryDetailRequestDto request) { var serviceId = GetOptionalServiceId(); @@ -123,6 +132,7 @@ public class StatsController : ControllerBase [HttpPost("send-log")] [SwaggerOperation(Summary = "발송 상세 로그 조회", Description = "특정 메시지의 개별 디바이스별 발송 상세 로그를 조회합니다. X-Service-Code 헤더 미지정 시 전체 서비스 통계를 조회합니다.")] + [ProducesResponseType(typeof(ApiResponse), 200)] public async Task GetSendLogDetailAsync([FromBody] SendLogDetailRequestDto request) { var serviceId = GetOptionalServiceId(); -- 2.45.1