66import hs .kr .backend .devpals .domain .Inquiry .service .InquiryAdminService ;
77import hs .kr .backend .devpals .global .common .ApiResponse ;
88import io .swagger .v3 .oas .annotations .Operation ;
9+ import io .swagger .v3 .oas .annotations .media .Content ;
10+ import io .swagger .v3 .oas .annotations .media .ExampleObject ;
11+ import io .swagger .v3 .oas .annotations .media .Schema ;
912import io .swagger .v3 .oas .annotations .tags .Tag ;
1013import lombok .RequiredArgsConstructor ;
1114import org .springframework .format .annotation .DateTimeFormat ;
@@ -27,9 +30,21 @@ public class InquiryAdminController {
2730 summary = "문의 답변 등록" ,
2831 description = "특정 문의에 대해 관리자가 최초 답변을 등록합니다." ,
2932 responses = {
30- @ io .swagger .v3 .oas .annotations .responses .ApiResponse (responseCode = "200" , description = "답변 등록 성공" ),
31- @ io .swagger .v3 .oas .annotations .responses .ApiResponse (responseCode = "400" , description = "잘못된 요청 - 이미 답변됨" ),
32- @ io .swagger .v3 .oas .annotations .responses .ApiResponse (responseCode = "404" , description = "해당 문의 없음" )
33+ @ io .swagger .v3 .oas .annotations .responses .ApiResponse (
34+ responseCode = "200" , description = "답변 등록 성공" ,
35+ content = @ Content (schema = @ Schema (implementation = ApiResponse .class ),
36+ examples = @ ExampleObject (value = "{\" success\" : true, \" message\" : \" 답변 등록 성공\" , \" data\" : null}" ))
37+ ),
38+ @ io .swagger .v3 .oas .annotations .responses .ApiResponse (
39+ responseCode = "400" , description = "잘못된 요청 - 이미 답변됨" ,
40+ content = @ Content (schema = @ Schema (implementation = ApiResponse .class ),
41+ examples = @ ExampleObject (value = "{\" success\" : false, \" message\" : \" 이미 답변이 등록된 문의입니다.\" , \" data\" : null}" ))
42+ ),
43+ @ io .swagger .v3 .oas .annotations .responses .ApiResponse (
44+ responseCode = "404" , description = "해당 문의 없음" ,
45+ content = @ Content (schema = @ Schema (implementation = ApiResponse .class ),
46+ examples = @ ExampleObject (value = "{\" success\" : false, \" message\" : \" 해당 문의를 찾을 수 없습니다.\" , \" data\" : null}" ))
47+ )
3348 }
3449 )
3550 public ResponseEntity <ApiResponse <String >> registerAnswer (
@@ -45,9 +60,21 @@ public ResponseEntity<ApiResponse<String>> registerAnswer(
4560 summary = "문의 답변 수정" ,
4661 description = "이미 등록된 문의 답변을 수정합니다. (관리자 전용)" ,
4762 responses = {
48- @ io .swagger .v3 .oas .annotations .responses .ApiResponse (responseCode = "200" , description = "답변 수정 성공" ),
49- @ io .swagger .v3 .oas .annotations .responses .ApiResponse (responseCode = "400" , description = "답변이 존재하지 않음" ),
50- @ io .swagger .v3 .oas .annotations .responses .ApiResponse (responseCode = "404" , description = "해당 문의 없음" )
63+ @ io .swagger .v3 .oas .annotations .responses .ApiResponse (
64+ responseCode = "200" , description = "답변 수정 성공" ,
65+ content = @ Content (schema = @ Schema (implementation = ApiResponse .class ),
66+ examples = @ ExampleObject (value = "{\" success\" : true, \" message\" : \" 답변 수정 성공\" , \" data\" : null}" ))
67+ ),
68+ @ io .swagger .v3 .oas .annotations .responses .ApiResponse (
69+ responseCode = "400" , description = "답변이 존재하지 않음" ,
70+ content = @ Content (schema = @ Schema (implementation = ApiResponse .class ),
71+ examples = @ ExampleObject (value = "{\" success\" : false, \" message\" : \" 답변이 존재하지 않아 수정할 수 없습니다.\" , \" data\" : null}" ))
72+ ),
73+ @ io .swagger .v3 .oas .annotations .responses .ApiResponse (
74+ responseCode = "404" , description = "해당 문의 없음" ,
75+ content = @ Content (schema = @ Schema (implementation = ApiResponse .class ),
76+ examples = @ ExampleObject (value = "{\" success\" : false, \" message\" : \" 해당 문의를 찾을 수 없습니다.\" , \" data\" : null}" ))
77+ )
5178 }
5279 )
5380 public ResponseEntity <ApiResponse <String >> updateAnswer (
@@ -63,8 +90,16 @@ public ResponseEntity<ApiResponse<String>> updateAnswer(
6390 summary = "모든 문의글 조회" ,
6491 description = "유저 ID와 기간으로 필터링된 문의글 목록을 최신순으로 조회합니다." ,
6592 responses = {
66- @ io .swagger .v3 .oas .annotations .responses .ApiResponse (responseCode = "200" , description = "문의글 조회 성공" ),
67- @ io .swagger .v3 .oas .annotations .responses .ApiResponse (responseCode = "400" , description = "잘못된 요청" )
93+ @ io .swagger .v3 .oas .annotations .responses .ApiResponse (
94+ responseCode = "200" , description = "문의글 조회 성공" ,
95+ content = @ Content (schema = @ Schema (implementation = ApiResponse .class ),
96+ examples = @ ExampleObject (value = "{\" success\" : true, \" message\" : \" 문의글 조회 성공\" , \" data\" : [...]}" ))
97+ ),
98+ @ io .swagger .v3 .oas .annotations .responses .ApiResponse (
99+ responseCode = "400" , description = "잘못된 요청" ,
100+ content = @ Content (schema = @ Schema (implementation = ApiResponse .class ),
101+ examples = @ ExampleObject (value = "{\" success\" : false, \" message\" : \" 요청 파라미터가 잘못되었습니다.\" , \" data\" : null}" ))
102+ )
68103 }
69104 )
70105 public ResponseEntity <ApiResponse <List <InquiryPreviewResponse >>> getAllInquiries (
@@ -80,8 +115,16 @@ public ResponseEntity<ApiResponse<List<InquiryPreviewResponse>>> getAllInquiries
80115 summary = "문의 상세 조회" ,
81116 description = "문의의 상세 내용을 조회합니다." ,
82117 responses = {
83- @ io .swagger .v3 .oas .annotations .responses .ApiResponse (responseCode = "200" , description = "문의 상세 조회 성공" ),
84- @ io .swagger .v3 .oas .annotations .responses .ApiResponse (responseCode = "400" , description = "잘못된 요청 - 토큰 오류 등 발생" )
118+ @ io .swagger .v3 .oas .annotations .responses .ApiResponse (
119+ responseCode = "200" , description = "문의 상세 조회 성공" ,
120+ content = @ Content (schema = @ Schema (implementation = ApiResponse .class ),
121+ examples = @ ExampleObject (value = "{\" success\" : true, \" message\" : \" 문의 상세 조회 성공\" , \" data\" : {...}}" ))
122+ ),
123+ @ io .swagger .v3 .oas .annotations .responses .ApiResponse (
124+ responseCode = "400" , description = "잘못된 요청 - 토큰 오류 등 발생" ,
125+ content = @ Content (schema = @ Schema (implementation = ApiResponse .class ),
126+ examples = @ ExampleObject (value = "{\" success\" : false, \" message\" : \" 잘못된 요청입니다.\" , \" data\" : null}" ))
127+ )
85128 }
86129 )
87130 public ResponseEntity <ApiResponse <InquiryResponse >> getInquiryDetail (@ PathVariable Long inquiryId ) {
@@ -93,12 +136,19 @@ public ResponseEntity<ApiResponse<InquiryResponse>> getInquiryDetail(@PathVariab
93136 summary = "미리보기용 문의글 10개 조회" ,
94137 description = "최근 문의글을 10개 미리보기 형태로 조회합니다." ,
95138 responses = {
96- @ io .swagger .v3 .oas .annotations .responses .ApiResponse (responseCode = "200" , description = "문의 미리보기 조회 성공" ),
97- @ io .swagger .v3 .oas .annotations .responses .ApiResponse (responseCode = "400" , description = "잘못된 요청 - 토큰 오류 등 발생" )
139+ @ io .swagger .v3 .oas .annotations .responses .ApiResponse (
140+ responseCode = "200" , description = "문의 미리보기 조회 성공" ,
141+ content = @ Content (schema = @ Schema (implementation = ApiResponse .class ),
142+ examples = @ ExampleObject (value = "{\" success\" : true, \" message\" : \" 미리보기 조회 성공\" , \" data\" : [...]}" ))
143+ ),
144+ @ io .swagger .v3 .oas .annotations .responses .ApiResponse (
145+ responseCode = "400" , description = "잘못된 요청 - 토큰 오류 등 발생" ,
146+ content = @ Content (schema = @ Schema (implementation = ApiResponse .class ),
147+ examples = @ ExampleObject (value = "{\" success\" : false, \" message\" : \" 잘못된 요청입니다.\" , \" data\" : null}" ))
148+ )
98149 }
99150 )
100151 public ResponseEntity <ApiResponse <List <InquiryPreviewResponse >>> getInquiryPreviewList () {
101152 return inquiryAdminService .getInquiryPreviews ();
102153 }
103-
104154}
0 commit comments