File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
src/main/java/dmu/dasom/api/domain/recruit/controller Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 22
33import dmu .dasom .api .domain .applicant .dto .ApplicantCreateRequestDto ;
44import dmu .dasom .api .domain .applicant .service .ApplicantService ;
5+ import dmu .dasom .api .domain .common .exception .ErrorResponse ;
56import io .swagger .v3 .oas .annotations .Operation ;
7+ import io .swagger .v3 .oas .annotations .media .Content ;
8+ import io .swagger .v3 .oas .annotations .media .ExampleObject ;
9+ import io .swagger .v3 .oas .annotations .media .Schema ;
610import io .swagger .v3 .oas .annotations .responses .ApiResponse ;
711import io .swagger .v3 .oas .annotations .responses .ApiResponses ;
812import jakarta .validation .Valid ;
@@ -23,8 +27,15 @@ public class RecruitController {
2327 // 지원하기
2428 @ Operation (summary = "부원 지원하기" )
2529 @ ApiResponses (value = {
26- @ ApiResponse (responseCode = "200" , description = "지원 성공" )
27- })
30+ @ ApiResponse (responseCode = "200" , description = "지원 성공" ),
31+ @ ApiResponse (responseCode = "400" , description = "실패 케이스" ,
32+ content = @ Content (
33+ mediaType = "application/json" ,
34+ schema = @ Schema (implementation = ErrorResponse .class ),
35+ examples = {
36+ @ ExampleObject (
37+ name = "학번 중복" ,
38+ value = "{ \" code\" : \" C013\" , \" message\" : \" 이미 등록된 학번입니다.\" }" )}))})
2839 @ PostMapping ("/apply" )
2940 public ResponseEntity <Void > apply (@ Valid @ RequestBody final ApplicantCreateRequestDto request ) {
3041 applicantService .apply (request );
You can’t perform that action at this time.
0 commit comments