From 0f7088ebea0d00bc92986a63fa2d341e40386c45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=84=B8=EC=A4=80?= <74056843+sejoon00@users.noreply.github.com> Date: Fri, 9 Aug 2024 23:35:09 +0900 Subject: [PATCH 1/7] =?UTF-8?q?[fix]merge=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/static/docs/open-api-3.0.1.json | 1014 +++++++++++++++-- 1 file changed, 900 insertions(+), 114 deletions(-) diff --git a/src/main/resources/static/docs/open-api-3.0.1.json b/src/main/resources/static/docs/open-api-3.0.1.json index 071d0bd..df46f5f 100644 --- a/src/main/resources/static/docs/open-api-3.0.1.json +++ b/src/main/resources/static/docs/open-api-3.0.1.json @@ -15,16 +15,21 @@ "tags" : [ "Card" ], "summary" : "카드 신규 생성", "description" : "카드 신규 생성", - "operationId" : "[create] 카드_신규_생성", - "parameters" : [ { - "name" : "type", - "in" : "query", - "description" : "타입", - "required" : true, - "schema" : { - "type" : "string" + "operationId" : "[create] 카드 신규 생성", + "requestBody" : { + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/CardCreateRequest" + }, + "examples" : { + "[create] 카드 신규 생성" : { + "value" : "{\"cardTypeValueList\":[\"경험_정리\",\"자기소개서\"],\"tagIdList\":[1,2]}" + } + } + } } - } ], + }, "responses" : { "200" : { "description" : "200", @@ -34,8 +39,8 @@ "$ref" : "#/components/schemas/CardCreateResponse" }, "examples" : { - "[create] 카드_신규_생성" : { - "value" : "{\n \"cardId\" : 4,\n \"type\" : \"경험_정리\"\n}" + "[create] 카드 신규 생성" : { + "value" : "{\n \"cardId\" : 4\n}" } } } @@ -92,7 +97,7 @@ "tags" : [ "Card" ], "summary" : "카드 리스트 조회", "description" : "카드 리스트 조회", - "operationId" : "[select] 카드_리스트_조회", + "operationId" : "[select] 카드 리스트 조회", "parameters" : [ { "name" : "type", "in" : "query", @@ -108,11 +113,98 @@ "content" : { "application/json;charset=UTF-8" : { "schema" : { - "$ref" : "#/components/schemas/CardGetsResponse" + "$ref" : "#/components/schemas/CardListGetResponse" + }, + "examples" : { + "[select] 카드 리스트 조회" : { + "value" : "[ {\n \"id\" : 1,\n \"title\" : \"test_title\",\n \"updatedDate\" : \"2024-07-24 21:22:08\",\n \"tagList\" : [ {\n \"id\" : 1,\n \"name\" : \"스프링\",\n \"type\" : \"역량\"\n }, {\n \"id\" : 2,\n \"name\" : \"리액트\",\n \"type\" : \"역량\"\n } ]\n} ]" + } + } + } + } + } + } + } + }, + "/api/v1/recruits" : { + "get" : { + "tags" : [ "Recruit" ], + "summary" : "전체 공고 목록 조회", + "description" : "전체 공고 목록 조회", + "operationId" : "[GET] 전체 공고 목록 조회 성공", + "responses" : { + "200" : { + "description" : "200", + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/RecruitGetResponse" + }, + "examples" : { + "[GET] 전체 공고 목록 조회 성공" : { + "value" : "[ {\n \"id\" : 1,\n \"title\" : \"New Title\",\n \"season\" : \"2024 상반기\",\n \"siteUrl\" : \"https://example.com\",\n \"recruitStatus\" : \"지원 완료\",\n \"createdDate\" : \"2023-01-01T00:00:00\"\n} ]" + } + } + } + } + } + } + }, + "post" : { + "tags" : [ "Recruit" ], + "summary" : "공고 생성", + "description" : "공고 생성", + "operationId" : "[POST] 공고 생성 성공", + "requestBody" : { + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/RecruitCreateRequest" + }, + "examples" : { + "[POST] 공고 생성 성공" : { + "value" : "{\n \"season\" : \"2024 상반기\",\n \"title\" : \"New Recruit Title\",\n \"siteUrl\" : \"https://example.com\",\n \"recruitScheduleStage\" : \"CLOSING_DOCUMENT\",\n \"deadline\" : \"2024-12-31\"\n}" + } + } + } + } + }, + "responses" : { + "200" : { + "description" : "200", + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/RecruitGetResponse" + }, + "examples" : { + "[POST] 공고 생성 성공" : { + "value" : "{\n \"id\" : 1,\n \"title\" : \"New Title\",\n \"season\" : \"2024 상반기\",\n \"siteUrl\" : \"https://example.com\",\n \"recruitStatus\" : \"\",\n \"createdDate\" : \"2023-01-01T00:00:00\"\n}" + } + } + } + } + } + } + } + }, + "/api/v1/tags" : { + "get" : { + "tags" : [ "Tag" ], + "summary" : "전체 카드 태그 목록", + "description" : "전체 카드 태그 목록", + "operationId" : "[태그_전체_목록_조회] 성공", + "responses" : { + "200" : { + "description" : "200", + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/TagGetResponse" }, "examples" : { - "[select] 카드_리스트_조회" : { - "value" : "[ {\n \"id\" : 1,\n \"title\" : \"test_title\",\n \"updateDate\" : \"2024-07-24 21:22:08\",\n \"cardTagList\" : [ {\n \"id\" : 1,\n \"name\" : \"스프링\",\n \"type\" : \"역량\"\n }, {\n \"id\" : 2,\n \"name\" : \"리액트\",\n \"type\" : \"역량\"\n } ]\n}, {\n \"id\" : 2,\n \"title\" : \"testc\",\n \"updateDate\" : \"1970-01-01 00:00:00\",\n \"cardTagList\" : [ {\n \"id\" : 3,\n \"name\" : \"리액트\",\n \"type\" : \"역량\"\n } ]\n} ]" + "[태그_전체_목록_조회] 성공" : { + "value" : "[{\"id\":1,\"name\":\"스프링\",\"type\":\"역량\"},{\"id\":2,\"name\":\"리액트\",\"type\":\"역량\"},{\"id\":3,\"name\":\"봉사활동\",\"type\":\"인성\"}]" } } } @@ -126,7 +218,7 @@ "tags" : [ "Card" ], "summary" : "카드 타입 카운트 조회", "description" : "카드 타입 카운트 조회", - "operationId" : "[select] 카드_타입_카운트_조회", + "operationId" : "[select] 카드 타입 카운트 조회", "responses" : { "200" : { "description" : "200", @@ -136,7 +228,7 @@ "$ref" : "#/components/schemas/CardTypeCountGetResponse" }, "examples" : { - "[select] 카드_타입_카운트_조회" : { + "[select] 카드 타입 카운트 조회" : { "value" : "{\n \"경험_정리\" : 2,\n \"자기소개서\" : 1,\n \"면접_질문\" : 0\n}" } } @@ -151,7 +243,7 @@ "tags" : [ "Card" ], "summary" : "카드 단건 조회", "description" : "카드 단건 조회", - "operationId" : "[select] 카드_단건_조회", + "operationId" : "[select] 카드 ", "parameters" : [ { "name" : "card-id", "in" : "path", @@ -162,6 +254,21 @@ } } ], "responses" : { + "404" : { + "description" : "404", + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + }, + "examples" : { + "[select] 카드 찾기 실패" : { + "value" : "{\n \"message\" : \"해당 카드를 찾을 수 없습니다\",\n \"status\" : \"NOT_FOUND\"\n}" + } + } + } + } + }, "200" : { "description" : "200", "content" : { @@ -170,8 +277,8 @@ "$ref" : "#/components/schemas/CardGetResponse" }, "examples" : { - "[select] 카드_단건_조회" : { - "value" : "{\n \"title\" : \"test_title\",\n \"content\" : \"test_contents\",\n \"updateDate\" : \"2024-07-24 21:22:08\",\n \"type\" : \"경험_정리\",\n \"cardTagList\" : [ {\n \"id\" : 1,\n \"name\" : \"스프링\",\n \"type\" : \"역량\"\n }, {\n \"id\" : 2,\n \"name\" : \"리액트\",\n \"type\" : \"역량\"\n } ]\n}" + "[select] 카드 단건 조회" : { + "value" : "{\n \"title\" : \"test_title\",\n \"content\" : \"test_contents\",\n \"updatedDate\" : \"2024-07-24 21:22:08\",\n \"cardTypeValueList\" : [ \"경험_정리\", \"자기소개서\", \"면접_질문\" ],\n \"tagList\" : [ {\n \"id\" : 1,\n \"name\" : \"스프링\",\n \"type\" : \"역량\"\n }, {\n \"id\" : 2,\n \"name\" : \"리액트\",\n \"type\" : \"역량\"\n } ]\n}" } } } @@ -183,7 +290,7 @@ "tags" : [ "Card" ], "summary" : "카드 삭제", "description" : "카드 삭제", - "operationId" : "[delete] 카드_삭제", + "operationId" : "[카드_삭제] ", "parameters" : [ { "name" : "card-id", "in" : "path", @@ -194,6 +301,21 @@ } } ], "responses" : { + "404" : { + "description" : "404", + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + }, + "examples" : { + "[카드_삭제] 카드 찾기 실패" : { + "value" : "{\"message\":\"해당 카드를 찾을 수 없습니다\",\"status\":\"NOT_FOUND\"}" + } + } + } + } + }, "200" : { "description" : "200" } @@ -257,6 +379,93 @@ } } }, + "/api/v1/recruits/bySeason" : { + "get" : { + "tags" : [ "Recruit" ], + "summary" : "분기별 공고 목록 조회", + "description" : "분기별 공고 목록 조회", + "operationId" : "[GET] 분기별 공고 목록 조회 성공", + "responses" : { + "200" : { + "description" : "200", + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/RecruitGetResponse" + }, + "examples" : { + "[GET] 분기별 공고 목록 조회 성공" : { + "value" : "[ {\n \"id\" : 1,\n \"title\" : \"New Title\",\n \"season\" : \"2024 상반기\",\n \"siteUrl\" : \"https://example.com\",\n \"recruitStatus\" : \"지원 완료\",\n \"createdDate\" : \"2023-01-01T00:00:00\"\n} ]" + } + } + } + } + } + } + } + }, + "/api/v1/recruits/progressing" : { + "get" : { + "tags" : [ "Recruit" ], + "summary" : "진행중 공고 목록 조회", + "description" : "진행중 공고 목록 조회", + "operationId" : "[GET] 진행 중 공고 목록 조회 성공", + "responses" : { + "200" : { + "description" : "200", + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/RecruitGetResponse" + }, + "examples" : { + "[GET] 진행 중 공고 목록 조회 성공" : { + "value" : "[ {\n \"id\" : 1,\n \"title\" : \"New Title\",\n \"season\" : \"2024 상반기\",\n \"siteUrl\" : \"https://example.com\",\n \"recruitStatus\" : \"지원 완료\",\n \"createdDate\" : \"2023-01-01T00:00:00\"\n} ]" + } + } + } + } + } + } + } + }, + "/api/v1/recruits/{id}" : { + "delete" : { + "tags" : [ "Recruit" ], + "summary" : "공고 삭제", + "description" : "공고 삭제", + "operationId" : "[DELETE] 공고 삭제 ", + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "200" + }, + "404" : { + "description" : "404", + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/api-v1-card-images1501512887" + }, + "examples" : { + "[DELETE] 공고 삭제 실패" : { + "value" : "{\n \"message\" : \"해당 공고를 찾을 수 없습니다\",\n \"status\" : \"NOT_FOUND\"\n}" + } + } + } + } + } + } + } + }, "/api/v1/card-images/static-urls/{cardId}" : { "post" : { "tags" : [ "CardImage" ], @@ -334,7 +543,7 @@ "tags" : [ "Card" ], "summary" : "카드 본문 수정", "description" : "카드 본문 수정", - "operationId" : "[update] 카드_본문_수정", + "operationId" : "[카드 본문 수정] ", "parameters" : [ { "name" : "card-id", "in" : "path", @@ -351,7 +560,10 @@ "$ref" : "#/components/schemas/CardContentUpdateRequest" }, "examples" : { - "[update] 카드_본문_수정" : { + "[카드 본문 수정] 성공" : { + "value" : "{\n \"content\" : \"test content\"\n}" + }, + "[카드 본문 수정] 카드 찾기 실패" : { "value" : "{\n \"content\" : \"test content\"\n}" } } @@ -361,6 +573,70 @@ "responses" : { "200" : { "description" : "200" + }, + "404" : { + "description" : "404", + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + }, + "examples" : { + "[카드 본문 수정] 카드 찾기 실패" : { + "value" : "{\"message\":\"해당 카드를 찾을 수 없습니다\",\"status\":\"NOT_FOUND\"}" + } + } + } + } + } + } + } + }, + "/api/v1/cards/{card-id}/tags" : { + "get" : { + "tags" : [ "Tag" ], + "summary" : "카드 태그 목록", + "description" : "카드 태그 목록", + "operationId" : "[카드_태그_목록_조회] ", + "parameters" : [ { + "name" : "card-id", + "in" : "path", + "description" : "Card id", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "404" : { + "description" : "404", + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + }, + "examples" : { + "[카드_태그_목록_조회] 카드 찾기 실패" : { + "value" : "{\"message\":\"해당 카드를 찾을 수 없습니다\",\"status\":\"NOT_FOUND\"}" + } + } + } + } + }, + "200" : { + "description" : "200", + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/TagGetResponse" + }, + "examples" : { + "[카드_태그_목록_조회] 성공" : { + "value" : "[{\"id\":3,\"name\":\"봉사활동\",\"type\":\"인성\"}]" + } + } + } + } } } } @@ -370,7 +646,7 @@ "tags" : [ "Card" ], "summary" : "카드 제목 수정", "description" : "카드 제목 수정", - "operationId" : "[update] 카드_제목_수정", + "operationId" : "[update] 카드 ", "parameters" : [ { "name" : "card-id", "in" : "path", @@ -387,7 +663,10 @@ "$ref" : "#/components/schemas/CardTitleUpdateRequest" }, "examples" : { - "[update] 카드_제목_수정" : { + "[update] 카드 제목 수정" : { + "value" : "{\n \"title\" : \"test title\"\n}" + }, + "[update] 카드 찾기 실패" : { "value" : "{\n \"title\" : \"test title\"\n}" } } @@ -397,38 +676,317 @@ "responses" : { "200" : { "description" : "200" + }, + "404" : { + "description" : "404", + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + }, + "examples" : { + "[update] 카드 찾기 실패" : { + "value" : "{\"message\":\"해당 카드를 찾을 수 없습니다\",\"status\":\"NOT_FOUND\"}" + } + } + } + } } } } }, - "/api/v1/users/test/login" : { - "post" : { - "tags" : [ "auth" ], - "summary" : "jwt 토큰 생성", - "description" : "jwt 토큰 생성", - "operationId" : "[로그인] ", + "/api/v1/recruits/{id}/season" : { + "patch" : { + "tags" : [ "Recruit" ], + "summary" : "공고 분기 수정", + "description" : "공고 분기 수정", + "operationId" : "[PATCH] 분기 수정 ", + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "", + "required" : true, + "schema" : { + "type" : "string" + } + } ], "requestBody" : { "content" : { "application/json;charset=UTF-8" : { "schema" : { - "$ref" : "#/components/schemas/LoginRequest" + "$ref" : "#/components/schemas/RecruitUpdateSeasonRequest" }, "examples" : { - "[로그인] 아이디_없음" : { - "value" : "{\n \"loginId\" : \"wrong\",\n \"password\" : \"test123\"\n}" - }, - "[로그인] 성공" : { - "value" : "{\n \"loginId\" : \"test\",\n \"password\" : \"test123\"\n}" + "[PATCH] 분기 수정 성공" : { + "value" : "{\n \"season\" : \"2024 상반기\"\n}" }, - "[로그인] 비밀번호_실패" : { - "value" : "{\n \"loginId\" : \"test\",\n \"password\" : \"wrong\"\n}" + "[PATCH] 분기 수정 실패" : { + "value" : "{\n \"season\" : \"2024 상반기\"\n}" } } } } }, "responses" : { - "404" : { + "200" : { + "description" : "200", + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/RecruitGetResponse" + }, + "examples" : { + "[PATCH] 분기 수정 성공" : { + "value" : "{\n \"id\" : 1,\n \"title\" : \"New Title\",\n \"season\" : \"2024 상반기\",\n \"siteUrl\" : \"https://example.com\",\n \"recruitStatus\" : \"지원 완료\",\n \"createdDate\" : \"2023-01-01T00:00:00\"\n}" + } + } + } + } + }, + "404" : { + "description" : "404", + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/api-v1-card-images1501512887" + }, + "examples" : { + "[PATCH] 분기 수정 실패" : { + "value" : "{\n \"message\" : \"해당 공고를 찾을 수 없습니다\",\n \"status\" : \"NOT_FOUND\"\n}" + } + } + } + } + } + } + } + }, + "/api/v1/recruits/{id}/siteUrl" : { + "patch" : { + "tags" : [ "Recruit" ], + "summary" : "공고 사이트 URL 수정", + "description" : "공고 사이트 URL 수정", + "operationId" : "[PATCH] 사이트 URL 수정 ", + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/RecruitUpdateSiteUrlRequest" + }, + "examples" : { + "[PATCH] 사이트 URL 수정 실패" : { + "value" : "{\n \"siteUrl\" : \"https://example.com\"\n}" + }, + "[PATCH] 사이트 URL 수정 성공" : { + "value" : "{\n \"siteUrl\" : \"https://example.com\"\n}" + } + } + } + } + }, + "responses" : { + "404" : { + "description" : "404", + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/api-v1-card-images1501512887" + }, + "examples" : { + "[PATCH] 사이트 URL 수정 실패" : { + "value" : "{\n \"message\" : \"해당 공고를 찾을 수 없습니다\",\n \"status\" : \"NOT_FOUND\"\n}" + } + } + } + } + }, + "200" : { + "description" : "200", + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/RecruitGetResponse" + }, + "examples" : { + "[PATCH] 사이트 URL 수정 성공" : { + "value" : "{\n \"id\" : 1,\n \"title\" : \"New Title\",\n \"season\" : \"2024 상반기\",\n \"siteUrl\" : \"https://example.com\",\n \"recruitStatus\" : \"지원 완료\",\n \"createdDate\" : \"2023-01-01T00:00:00\"\n}" + } + } + } + } + } + } + } + }, + "/api/v1/recruits/{id}/status" : { + "patch" : { + "tags" : [ "Recruit" ], + "summary" : "공고 상태 수정", + "description" : "공고 상태 수정", + "operationId" : "[PATCH] 상태 수정 ", + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/RecruitUpdateStatusRequest" + }, + "examples" : { + "[PATCH] 상태 수정 실패" : { + "value" : "{\n \"recruitStatus\" : \"APPLICATION_COMPLETED\"\n}" + }, + "[PATCH] 상태 수정 성공" : { + "value" : "{\n \"recruitStatus\" : \"APPLICATION_COMPLETED\"\n}" + } + } + } + } + }, + "responses" : { + "404" : { + "description" : "404", + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/api-v1-card-images1501512887" + }, + "examples" : { + "[PATCH] 상태 수정 실패" : { + "value" : "{\n \"message\" : \"해당 공고를 찾을 수 없습니다\",\n \"status\" : \"NOT_FOUND\"\n}" + } + } + } + } + }, + "200" : { + "description" : "200", + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/RecruitGetResponse" + }, + "examples" : { + "[PATCH] 상태 수정 성공" : { + "value" : "{\n \"id\" : 1,\n \"title\" : \"New Title\",\n \"season\" : \"2024 상반기\",\n \"siteUrl\" : \"https://example.com\",\n \"recruitStatus\" : \"지원 완료\",\n \"createdDate\" : \"2023-01-01T00:00:00\"\n}" + } + } + } + } + } + } + } + }, + "/api/v1/recruits/{id}/title" : { + "patch" : { + "tags" : [ "Recruit" ], + "summary" : "공고 타이틀 수정", + "description" : "공고 타이틀 수정", + "operationId" : "[PATCH] 제목 수정 ", + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/RecruitUpdateTitleRequest" + }, + "examples" : { + "[PATCH] 제목 수정 성공" : { + "value" : "{\n \"title\" : \"New Title\"\n}" + }, + "[PATCH] 제목 수정 실패" : { + "value" : "{\n \"title\" : \"New Title\"\n}" + } + } + } + } + }, + "responses" : { + "200" : { + "description" : "200", + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/RecruitGetResponse" + }, + "examples" : { + "[PATCH] 제목 수정 성공" : { + "value" : "{\n \"id\" : 1,\n \"title\" : \"New Title\",\n \"season\" : \"2024 상반기\",\n \"siteUrl\" : \"https://example.com\",\n \"recruitStatus\" : \"지원 완료\",\n \"createdDate\" : \"2023-01-01T00:00:00\"\n}" + } + } + } + } + }, + "404" : { + "description" : "404", + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/api-v1-card-images1501512887" + }, + "examples" : { + "[PATCH] 제목 수정 실패" : { + "value" : "{\n \"message\" : \"해당 공고를 찾을 수 없습니다\",\n \"status\" : \"NOT_FOUND\"\n}" + } + } + } + } + } + } + } + }, + "/api/v1/users/test/login" : { + "post" : { + "tags" : [ "auth" ], + "summary" : "jwt 토큰 생성", + "description" : "jwt 토큰 생성", + "operationId" : "[로그인] ", + "requestBody" : { + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/LoginRequest" + }, + "examples" : { + "[로그인] 아이디_없음" : { + "value" : "{\n \"loginId\" : \"wrong\",\n \"password\" : \"test123\"\n}" + }, + "[로그인] 성공" : { + "value" : "{\n \"loginId\" : \"test\",\n \"password\" : \"test123\"\n}" + }, + "[로그인] 비밀번호_실패" : { + "value" : "{\n \"loginId\" : \"test\",\n \"password\" : \"wrong\"\n}" + } + } + } + } + }, + "responses" : { + "404" : { "description" : "404", "content" : { "application/json;charset=UTF-8" : { @@ -478,10 +1036,10 @@ }, "/api/v1/cards/{card-id}/tag/{tag-id}" : { "post" : { - "tags" : [ "Card" ], + "tags" : [ "Tag" ], "summary" : "카드 태그 추가", "description" : "카드 태그 추가", - "operationId" : "[create] 카드_태그_생성", + "operationId" : "[카드_", "parameters" : [ { "name" : "card-id", "in" : "path", @@ -502,14 +1060,47 @@ "responses" : { "200" : { "description" : "200" + }, + "404" : { + "description" : "404", + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + }, + "examples" : { + "[카드_태그_추가] 태그 찾기 실패" : { + "value" : "{\"message\":\"해당 태그를 찾을 수 없습니다\",\"status\":\"NOT_FOUND\"}" + }, + "[카드_찾기_실패] 카드 찾기 실패" : { + "value" : "{\"message\":\"해당 카드를 찾을 수 없습니다\",\"status\":\"NOT_FOUND\"}" + } + } + } + } + }, + "400" : { + "description" : "400", + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + }, + "examples" : { + "[카드_태그_추가] 태그 중복 추가" : { + "value" : "{\"message\":\"해당 태그가 이미 추가 돼있습니다.\",\"status\":\"BAD_REQUEST\"}" + } + } + } + } } } }, "delete" : { - "tags" : [ "Card" ], + "tags" : [ "Tag" ], "summary" : "카드 태그 삭제", "description" : "카드 태그 삭제", - "operationId" : "[delete] 카드_태그_삭제", + "operationId" : "[카드_태그_삭제] ", "parameters" : [ { "name" : "card-id", "in" : "path", @@ -530,6 +1121,27 @@ "responses" : { "200" : { "description" : "200" + }, + "404" : { + "description" : "404", + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + }, + "examples" : { + "[카드_태그_삭제] 카드 찾기 실패" : { + "value" : "{\"message\":\"해당 카드를 찾을 수 없습니다\",\"status\":\"NOT_FOUND\"}" + }, + "[카드_태그_삭제] 카드 태그 매핑 찾기 실패" : { + "value" : "{\"message\":\"해당 카드와 태그 매핑을 찾을 수 없습니다\",\"status\":\"NOT_FOUND\"}" + }, + "[카드_태그_삭제] 태그 찾기 실패" : { + "value" : "{\"message\":\"해당 태그를 찾을 수 없습니다\",\"status\":\"NOT_FOUND\"}" + } + } + } + } } } } @@ -537,6 +1149,36 @@ }, "components" : { "schemas" : { + "RecruitGetResponse" : { + "title" : "RecruitGetResponse", + "type" : "object", + "properties" : { + "createdDate" : { + "type" : "string", + "description" : "createdDate" + }, + "siteUrl" : { + "type" : "string", + "description" : "siteUrl" + }, + "season" : { + "type" : "string", + "description" : "season" + }, + "id" : { + "type" : "number", + "description" : "id" + }, + "recruitStatus" : { + "type" : "string", + "description" : "recruitStatus" + }, + "title" : { + "type" : "string", + "description" : "title" + } + } + }, "CardImageDeleteRequest" : { "title" : "CardImageDeleteRequest", "type" : "object", @@ -551,6 +1193,42 @@ } } }, + "CardCreateRequest" : { + "title" : "CardCreateRequest", + "type" : "object", + "properties" : { + "cardTypeValueList" : { + "type" : "array", + "description" : "카드 타입값", + "items" : { + "oneOf" : [ { + "type" : "object" + }, { + "type" : "boolean" + }, { + "type" : "string" + }, { + "type" : "number" + } ] + } + }, + "tagIdList" : { + "type" : "array", + "description" : "태그 ID", + "items" : { + "oneOf" : [ { + "type" : "object" + }, { + "type" : "boolean" + }, { + "type" : "string" + }, { + "type" : "number" + } ] + } + } + } + }, "ImageUploadResponse" : { "title" : "ImageUploadResponse", "type" : "array", @@ -568,6 +1246,27 @@ } } }, + "TagGetResponse" : { + "title" : "TagGetResponse", + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string", + "description" : "태그 이름" + }, + "id" : { + "type" : "number", + "description" : "태그 ID" + }, + "type" : { + "type" : "string", + "description" : "태그 타입" + } + } + } + }, "CardTitleUpdateRequest" : { "title" : "CardTitleUpdateRequest", "type" : "object", @@ -591,6 +1290,16 @@ } } }, + "RecruitUpdateStatusRequest" : { + "title" : "RecruitUpdateStatusRequest", + "type" : "object", + "properties" : { + "recruitStatus" : { + "type" : "string", + "description" : "recruitStatus" + } + } + }, "CardTypeCountGetResponse" : { "title" : "CardTypeCountGetResponse", "type" : "object", @@ -609,20 +1318,6 @@ } } }, - "CardCreateResponse" : { - "title" : "CardCreateResponse", - "type" : "object", - "properties" : { - "cardId" : { - "type" : "number", - "description" : "Card ID" - }, - "type" : { - "type" : "string", - "description" : "Card 타입" - } - } - }, "LoginRequest" : { "title" : "LoginRequest", "type" : "object", @@ -660,6 +1355,85 @@ } } }, + "CardGetResponse" : { + "title" : "CardGetResponse", + "type" : "object", + "properties" : { + "tagList" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string", + "description" : "태그 이름" + }, + "id" : { + "type" : "number", + "description" : "태그 ID" + }, + "type" : { + "type" : "string", + "description" : "태그 타입" + } + } + } + }, + "cardTypeValueList" : { + "type" : "array", + "description" : "Card 타입값 리스트", + "items" : { + "oneOf" : [ { + "type" : "object" + }, { + "type" : "boolean" + }, { + "type" : "string" + }, { + "type" : "number" + } ] + } + }, + "updatedDate" : { + "type" : "string", + "description" : "Card 수정일시" + }, + "title" : { + "type" : "string", + "description" : "Card 제목" + }, + "content" : { + "type" : "string", + "description" : "Card 내용" + } + } + }, + "RecruitCreateRequest" : { + "title" : "RecruitCreateRequest", + "type" : "object", + "properties" : { + "recruitScheduleStage" : { + "type" : "string", + "description" : "recruitScheduleStage" + }, + "siteUrl" : { + "type" : "string", + "description" : "siteUrl" + }, + "season" : { + "type" : "string", + "description" : "season" + }, + "deadline" : { + "type" : "string", + "description" : "deadline" + }, + "title" : { + "type" : "string", + "description" : "title" + } + } + }, "CardImageUploadCompleteRequest" : { "title" : "CardImageUploadCompleteRequest", "type" : "array", @@ -673,6 +1447,16 @@ } } }, + "CardCreateResponse" : { + "title" : "CardCreateResponse", + "type" : "object", + "properties" : { + "cardId" : { + "type" : "number", + "description" : "Card ID" + } + } + }, "CardImageUploadCompleteResponse" : { "title" : "CardImageUploadCompleteResponse", "type" : "array", @@ -686,99 +1470,101 @@ } } }, - "CardGetResponse" : { - "title" : "CardGetResponse", + "TokenDto" : { + "title" : "TokenDto", "type" : "object", "properties" : { - "updateDate" : { + "accessToken" : { "type" : "string", - "description" : "Card 수정일시" + "description" : "accessToken" }, - "type" : { + "refreshToken" : { "type" : "string", - "description" : "Card 타입" - }, - "title" : { + "description" : "refreshToken" + } + } + }, + "ErrorResponse" : { + "title" : "ErrorResponse", + "type" : "object", + "properties" : { + "message" : { "type" : "string", - "description" : "Card 제목" + "description" : "Error message" }, - "cardTagList" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "description" : "Card 태그 이름" - }, - "id" : { - "type" : "number", - "description" : "Card 태그 id" - }, - "type" : { - "type" : "string", - "description" : "Card 태그 타입" - } - } - } - }, - "content" : { + "status" : { "type" : "string", - "description" : "Card 내용" + "description" : "HTTP status code" } } }, - "TokenDto" : { - "title" : "TokenDto", + "RecruitUpdateSeasonRequest" : { + "title" : "RecruitUpdateSeasonRequest", "type" : "object", "properties" : { - "accessToken" : { + "season" : { "type" : "string", - "description" : "accessToken" - }, - "refreshToken" : { + "description" : "season" + } + } + }, + "RecruitUpdateSiteUrlRequest" : { + "title" : "RecruitUpdateSiteUrlRequest", + "type" : "object", + "properties" : { + "siteUrl" : { "type" : "string", - "description" : "refreshToken" + "description" : "siteUrl" } } }, - "CardGetsResponse" : { - "title" : "CardGetsResponse", + "RecruitUpdateTitleRequest" : { + "title" : "RecruitUpdateTitleRequest", + "type" : "object", + "properties" : { + "title" : { + "type" : "string", + "description" : "title" + } + } + }, + "CardListGetResponse" : { + "title" : "CardListGetResponse", "type" : "array", "items" : { "type" : "object", "properties" : { - "updateDate" : { - "type" : "string", - "description" : "Card 수정일시" - }, - "id" : { - "type" : "number", - "description" : "Card ID" - }, - "title" : { - "type" : "string", - "description" : "Card 제목" - }, - "cardTagList" : { + "tagList" : { "type" : "array", "items" : { "type" : "object", "properties" : { "name" : { "type" : "string", - "description" : "Card 태그 이름" + "description" : "태그 이름" }, "id" : { "type" : "number", - "description" : "Card 태그 id" + "description" : "태그 ID" }, "type" : { "type" : "string", - "description" : "Card 태그 타입" + "description" : "태그 타입" } } } + }, + "updatedDate" : { + "type" : "string", + "description" : "Card 수정일시" + }, + "id" : { + "type" : "number", + "description" : "Card ID" + }, + "title" : { + "type" : "string", + "description" : "Card 제목" } } } From 7576850f9f84c61302df14243a23b6ea62ebb93e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=84=B8=EC=A4=80?= <74056843+sejoon00@users.noreply.github.com> Date: Mon, 12 Aug 2024 21:43:33 +0900 Subject: [PATCH 2/7] =?UTF-8?q?[fix][#40]=20getRecruitListBySeason()=20que?= =?UTF-8?q?ryParam=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/recruit/entity/SeasonPeriod.java | 2 +- .../resources/static/docs/open-api-3.0.1.json | 494 +++++++++++++----- .../controller/RecruitControllerTest.java | 28 +- .../bbo_gak/global/RestDocsFactory.java | 25 +- 4 files changed, 391 insertions(+), 158 deletions(-) diff --git a/src/main/java/com/server/bbo_gak/domain/recruit/entity/SeasonPeriod.java b/src/main/java/com/server/bbo_gak/domain/recruit/entity/SeasonPeriod.java index 15ef7ae..81acd9e 100644 --- a/src/main/java/com/server/bbo_gak/domain/recruit/entity/SeasonPeriod.java +++ b/src/main/java/com/server/bbo_gak/domain/recruit/entity/SeasonPeriod.java @@ -21,6 +21,6 @@ public static SeasonPeriod fromMonth(int month) { } public String getSeasonName(int year) { - return year + " " + this.name; + return year + "_" + this.name; } } diff --git a/src/main/resources/static/docs/open-api-3.0.1.json b/src/main/resources/static/docs/open-api-3.0.1.json index df46f5f..ac9f54d 100644 --- a/src/main/resources/static/docs/open-api-3.0.1.json +++ b/src/main/resources/static/docs/open-api-3.0.1.json @@ -76,7 +76,7 @@ "content" : { "application/json;charset=UTF-8" : { "schema" : { - "$ref" : "#/components/schemas/api-v1-card-images1501512887" + "$ref" : "#/components/schemas/api-v1-recruits-id-season1501512887" }, "examples" : { "[delete] s3에서_삭제할_이미지_찾기_실패" : { @@ -366,7 +366,7 @@ "content" : { "application/json;charset=UTF-8" : { "schema" : { - "$ref" : "#/components/schemas/api-v1-card-images1501512887" + "$ref" : "#/components/schemas/api-v1-recruits-id-season1501512887" }, "examples" : { "[presigned-urls] 실패-유효하지않은파일이름" : { @@ -384,7 +384,16 @@ "tags" : [ "Recruit" ], "summary" : "분기별 공고 목록 조회", "description" : "분기별 공고 목록 조회", - "operationId" : "[GET] 분기별 공고 목록 조회 성공", + "operationId" : "[GET] 분기별 공고 리스트 조회 성공", + "parameters" : [ { + "name" : "season", + "in" : "query", + "description" : "2024 상반기", + "required" : true, + "schema" : { + "type" : "string" + } + } ], "responses" : { "200" : { "description" : "200", @@ -394,7 +403,7 @@ "$ref" : "#/components/schemas/RecruitGetResponse" }, "examples" : { - "[GET] 분기별 공고 목록 조회 성공" : { + "[GET] 분기별 공고 리스트 조회 성공" : { "value" : "[ {\n \"id\" : 1,\n \"title\" : \"New Title\",\n \"season\" : \"2024 상반기\",\n \"siteUrl\" : \"https://example.com\",\n \"recruitStatus\" : \"지원 완료\",\n \"createdDate\" : \"2023-01-01T00:00:00\"\n} ]" } } @@ -453,7 +462,7 @@ "content" : { "application/json;charset=UTF-8" : { "schema" : { - "$ref" : "#/components/schemas/api-v1-card-images1501512887" + "$ref" : "#/components/schemas/api-v1-recruits-id-season1501512887" }, "examples" : { "[DELETE] 공고 삭제 실패" : { @@ -507,7 +516,7 @@ "content" : { "application/json;charset=UTF-8" : { "schema" : { - "$ref" : "#/components/schemas/api-v1-card-images1501512887" + "$ref" : "#/components/schemas/api-v1-recruits-id-season1501512887" }, "examples" : { "[upload] S3에서_업로드된_이미지_찾기_실패" : { @@ -538,6 +547,104 @@ } } }, + "/api/v1/cards/{card-id}/card-memo" : { + "get" : { + "tags" : [ "CardMemo" ], + "summary" : "카드_메모_조회", + "description" : "카드_메모_조회", + "operationId" : "[카드_메모_조회] 성공", + "parameters" : [ { + "name" : "card-id", + "in" : "path", + "description" : "card-id", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "200", + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/com.server.bbo_gak.domain.card.dto.response.CardMemoCreateResponse" + }, + "examples" : { + "[카드_메모_조회] 성공" : { + "value" : "[{\"id\":1,\"content\":\"test contents 111\",\"updatedDate\":\"2024-07-24 21:26:42\"},{\"id\":2,\"content\":\"test contents 222\",\"updatedDate\":\"2024-07-24 21:26:42\"},{\"id\":3,\"content\":\"test contents 222\",\"updatedDate\":\"2024-07-24 21:26:42\"}]" + } + } + } + } + } + } + }, + "post" : { + "tags" : [ "CardMemo" ], + "summary" : "카드_메모_생성", + "description" : "카드_메모_생성", + "operationId" : "[카드_메모_생성] ", + "parameters" : [ { + "name" : "card-id", + "in" : "path", + "description" : "", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/CardMemoCreateRequest" + }, + "examples" : { + "[카드_메모_생성] 성공" : { + "value" : "{\n \"content\" : \"test content\"\n}" + }, + "[카드_메모_생성] 카드_찾기_실패" : { + "value" : "{\n \"content\" : \"test content\"\n}" + } + } + } + } + }, + "responses" : { + "200" : { + "description" : "200", + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/CardMemoCreateResponse" + }, + "examples" : { + "[카드_메모_생성] 성공" : { + "value" : "{\n \"cardMemoId\" : 7,\n \"content\" : \"test content\"\n}" + } + } + } + } + }, + "404" : { + "description" : "404", + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/api-v1-recruits-id-season1501512887" + }, + "examples" : { + "[카드_메모_생성] 카드_찾기_실패" : { + "value" : "{\n \"message\" : \"해당 카드를 찾을 수 없습니다\",\n \"status\" : \"NOT_FOUND\"\n}" + } + } + } + } + } + } + } + }, "/api/v1/cards/{card-id}/content" : { "put" : { "tags" : [ "Card" ], @@ -748,7 +855,7 @@ "content" : { "application/json;charset=UTF-8" : { "schema" : { - "$ref" : "#/components/schemas/api-v1-card-images1501512887" + "$ref" : "#/components/schemas/api-v1-recruits-id-season1501512887" }, "examples" : { "[PATCH] 분기 수정 실패" : { @@ -799,7 +906,7 @@ "content" : { "application/json;charset=UTF-8" : { "schema" : { - "$ref" : "#/components/schemas/api-v1-card-images1501512887" + "$ref" : "#/components/schemas/api-v1-recruits-id-season1501512887" }, "examples" : { "[PATCH] 사이트 URL 수정 실패" : { @@ -865,7 +972,7 @@ "content" : { "application/json;charset=UTF-8" : { "schema" : { - "$ref" : "#/components/schemas/api-v1-card-images1501512887" + "$ref" : "#/components/schemas/api-v1-recruits-id-season1501512887" }, "examples" : { "[PATCH] 상태 수정 실패" : { @@ -946,7 +1053,7 @@ "content" : { "application/json;charset=UTF-8" : { "schema" : { - "$ref" : "#/components/schemas/api-v1-card-images1501512887" + "$ref" : "#/components/schemas/api-v1-recruits-id-season1501512887" }, "examples" : { "[PATCH] 제목 수정 실패" : { @@ -991,7 +1098,7 @@ "content" : { "application/json;charset=UTF-8" : { "schema" : { - "$ref" : "#/components/schemas/api-v1-card-images1501512887" + "$ref" : "#/components/schemas/api-v1-recruits-id-season1501512887" }, "examples" : { "[로그인] 아이디_없음" : { @@ -1021,7 +1128,7 @@ "content" : { "application/json;charset=UTF-8" : { "schema" : { - "$ref" : "#/components/schemas/api-v1-card-images1501512887" + "$ref" : "#/components/schemas/api-v1-recruits-id-season1501512887" }, "examples" : { "[로그인] 비밀번호_실패" : { @@ -1034,6 +1141,36 @@ } } }, + "/api/v1/cards/{card-id}/card-memo/{card-memo-id}" : { + "delete" : { + "tags" : [ "CardMemo" ], + "summary" : "카드_메모_삭제", + "description" : "카드_메모_삭제", + "operationId" : "[카드_메모_삭제] 성공", + "parameters" : [ { + "name" : "card-id", + "in" : "path", + "description" : "card-id", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "card-memo-id", + "in" : "path", + "description" : "card-memo-id", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "200" + } + } + } + }, "/api/v1/cards/{card-id}/tag/{tag-id}" : { "post" : { "tags" : [ "Tag" ], @@ -1145,6 +1282,50 @@ } } } + }, + "/api/v1/cards/{card-id}/card-memo/{card-memo-id}/content" : { + "put" : { + "tags" : [ "CardMemo" ], + "summary" : "카드_메모_조회", + "description" : "카드_메모_조회", + "operationId" : "[카드_메모_내용_수정] 성공", + "parameters" : [ { + "name" : "card-id", + "in" : "path", + "description" : "card-id", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "card-memo-id", + "in" : "path", + "description" : "card-memo-id", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "application/json;charset=UTF-8" : { + "schema" : { + "$ref" : "#/components/schemas/api-v1-cards-card-id-card-memo-card-memo-id-content486549215" + }, + "examples" : { + "[카드_메모_내용_수정] 성공" : { + "value" : "{\"content\":\"updated contents\"}" + } + } + } + } + }, + "responses" : { + "200" : { + "description" : "200" + } + } + } } }, "components" : { @@ -1179,20 +1360,6 @@ } } }, - "CardImageDeleteRequest" : { - "title" : "CardImageDeleteRequest", - "type" : "object", - "properties" : { - "cardId" : { - "type" : "number", - "description" : "cardId" - }, - "staticUrl" : { - "type" : "string", - "description" : "staticUrl" - } - } - }, "CardCreateRequest" : { "title" : "CardCreateRequest", "type" : "object", @@ -1246,38 +1413,11 @@ } } }, - "TagGetResponse" : { - "title" : "TagGetResponse", - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "description" : "태그 이름" - }, - "id" : { - "type" : "number", - "description" : "태그 ID" - }, - "type" : { - "type" : "string", - "description" : "태그 타입" - } - } - } - }, - "CardTitleUpdateRequest" : { - "title" : "CardTitleUpdateRequest", - "type" : "object", - "properties" : { - "title" : { - "type" : "string", - "description" : "카드 제목" - } - } + "com.server.bbo_gak.domain.card.dto.response.CardMemoCreateResponse" : { + "title" : "com.server.bbo_gak.domain.card.dto.response.CardMemoCreateResponse", + "type" : "object" }, - "api-v1-card-images1501512887" : { + "api-v1-recruits-id-season1501512887" : { "type" : "object", "properties" : { "message" : { @@ -1355,6 +1495,151 @@ } } }, + "CardImageUploadCompleteResponse" : { + "title" : "CardImageUploadCompleteResponse", + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "staticUrl" : { + "type" : "string", + "description" : "staticUrl" + } + } + } + }, + "TokenDto" : { + "title" : "TokenDto", + "type" : "object", + "properties" : { + "accessToken" : { + "type" : "string", + "description" : "accessToken" + }, + "refreshToken" : { + "type" : "string", + "description" : "refreshToken" + } + } + }, + "ErrorResponse" : { + "title" : "ErrorResponse", + "type" : "object", + "properties" : { + "message" : { + "type" : "string", + "description" : "Error message" + }, + "status" : { + "type" : "string", + "description" : "HTTP status code" + } + } + }, + "RecruitUpdateSiteUrlRequest" : { + "title" : "RecruitUpdateSiteUrlRequest", + "type" : "object", + "properties" : { + "siteUrl" : { + "type" : "string", + "description" : "siteUrl" + } + } + }, + "RecruitUpdateTitleRequest" : { + "title" : "RecruitUpdateTitleRequest", + "type" : "object", + "properties" : { + "title" : { + "type" : "string", + "description" : "title" + } + } + }, + "api-v1-cards-card-id-card-memo-card-memo-id-content486549215" : { + "type" : "object" + }, + "CardImageDeleteRequest" : { + "title" : "CardImageDeleteRequest", + "type" : "object", + "properties" : { + "cardId" : { + "type" : "number", + "description" : "cardId" + }, + "staticUrl" : { + "type" : "string", + "description" : "staticUrl" + } + } + }, + "TagGetResponse" : { + "title" : "TagGetResponse", + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string", + "description" : "태그 이름" + }, + "id" : { + "type" : "number", + "description" : "태그 ID" + }, + "type" : { + "type" : "string", + "description" : "태그 타입" + } + } + } + }, + "CardTitleUpdateRequest" : { + "title" : "CardTitleUpdateRequest", + "type" : "object", + "properties" : { + "title" : { + "type" : "string", + "description" : "카드 제목" + } + } + }, + "CardMemoCreateRequest" : { + "title" : "CardMemoCreateRequest", + "type" : "object", + "properties" : { + "content" : { + "type" : "string", + "description" : "content" + } + } + }, + "RecruitCreateRequest" : { + "title" : "RecruitCreateRequest", + "type" : "object", + "properties" : { + "recruitScheduleStage" : { + "type" : "string", + "description" : "recruitScheduleStage" + }, + "siteUrl" : { + "type" : "string", + "description" : "siteUrl" + }, + "season" : { + "type" : "string", + "description" : "season" + }, + "deadline" : { + "type" : "string", + "description" : "deadline" + }, + "title" : { + "type" : "string", + "description" : "title" + } + } + }, "CardGetResponse" : { "title" : "CardGetResponse", "type" : "object", @@ -1408,45 +1693,6 @@ } } }, - "RecruitCreateRequest" : { - "title" : "RecruitCreateRequest", - "type" : "object", - "properties" : { - "recruitScheduleStage" : { - "type" : "string", - "description" : "recruitScheduleStage" - }, - "siteUrl" : { - "type" : "string", - "description" : "siteUrl" - }, - "season" : { - "type" : "string", - "description" : "season" - }, - "deadline" : { - "type" : "string", - "description" : "deadline" - }, - "title" : { - "type" : "string", - "description" : "title" - } - } - }, - "CardImageUploadCompleteRequest" : { - "title" : "CardImageUploadCompleteRequest", - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "fileName" : { - "type" : "string", - "description" : "fileName" - } - } - } - }, "CardCreateResponse" : { "title" : "CardCreateResponse", "type" : "object", @@ -1457,44 +1703,30 @@ } } }, - "CardImageUploadCompleteResponse" : { - "title" : "CardImageUploadCompleteResponse", + "CardImageUploadCompleteRequest" : { + "title" : "CardImageUploadCompleteRequest", "type" : "array", "items" : { "type" : "object", "properties" : { - "staticUrl" : { + "fileName" : { "type" : "string", - "description" : "staticUrl" + "description" : "fileName" } } } }, - "TokenDto" : { - "title" : "TokenDto", - "type" : "object", - "properties" : { - "accessToken" : { - "type" : "string", - "description" : "accessToken" - }, - "refreshToken" : { - "type" : "string", - "description" : "refreshToken" - } - } - }, - "ErrorResponse" : { - "title" : "ErrorResponse", + "CardMemoCreateResponse" : { + "title" : "CardMemoCreateResponse", "type" : "object", "properties" : { - "message" : { - "type" : "string", - "description" : "Error message" + "cardMemoId" : { + "type" : "number", + "description" : "cardMemoId" }, - "status" : { + "content" : { "type" : "string", - "description" : "HTTP status code" + "description" : "content" } } }, @@ -1508,26 +1740,6 @@ } } }, - "RecruitUpdateSiteUrlRequest" : { - "title" : "RecruitUpdateSiteUrlRequest", - "type" : "object", - "properties" : { - "siteUrl" : { - "type" : "string", - "description" : "siteUrl" - } - } - }, - "RecruitUpdateTitleRequest" : { - "title" : "RecruitUpdateTitleRequest", - "type" : "object", - "properties" : { - "title" : { - "type" : "string", - "description" : "title" - } - } - }, "CardListGetResponse" : { "title" : "CardListGetResponse", "type" : "array", diff --git a/src/test/java/com/server/bbo_gak/domain/recruit/controller/RecruitControllerTest.java b/src/test/java/com/server/bbo_gak/domain/recruit/controller/RecruitControllerTest.java index 6a2c2c9..4c6ae4d 100644 --- a/src/test/java/com/server/bbo_gak/domain/recruit/controller/RecruitControllerTest.java +++ b/src/test/java/com/server/bbo_gak/domain/recruit/controller/RecruitControllerTest.java @@ -1,11 +1,20 @@ package com.server.bbo_gak.domain.recruit.controller; +import static com.epages.restdocs.apispec.ResourceDocumentation.resource; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.when; +import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document; +import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.get; +import static org.springframework.restdocs.operation.preprocess.Preprocessors.preprocessResponse; +import static org.springframework.restdocs.operation.preprocess.Preprocessors.prettyPrint; +import static org.springframework.restdocs.payload.PayloadDocumentation.fieldWithPath; +import static org.springframework.restdocs.request.RequestDocumentation.parameterWithName; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +import com.epages.restdocs.apispec.ResourceSnippetParameters; +import com.epages.restdocs.apispec.Schema; import com.server.bbo_gak.domain.recruit.dto.request.RecruitCreateRequest; import com.server.bbo_gak.domain.recruit.dto.request.RecruitUpdateSeasonRequest; import com.server.bbo_gak.domain.recruit.dto.request.RecruitUpdateSiteUrlRequest; @@ -29,6 +38,8 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.http.HttpMethod; +import org.springframework.http.MediaType; +import org.springframework.restdocs.payload.JsonFieldType; import org.springframework.test.context.ActiveProfiles; @SpringBootTest @@ -254,11 +265,20 @@ class 공고_목록_조회 { when(recruitService.getRecruitListBySeason(any(), any())).thenReturn(List.of(response)); mockMvc.perform( - restDocsFactory.createRequest(DEFAULT_URL + "/bySeason?season={season}", null, HttpMethod.GET, - objectMapper, "2024 상반기")) + get(DEFAULT_URL + "/bySeason").contentType(MediaType.APPLICATION_JSON).queryParam("season", "2024_" + + "상반기").accept(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) - .andDo(restDocsFactory.getSuccessResourceList("[GET] 분기별 공고 목록 조회 성공", "분기별 공고 목록 조회", "Recruit", - List.of(), List.of(response))); + .andDo(document("[GET] 분기별 공고 리스트 조회 성공", preprocessResponse(prettyPrint()), resource( + ResourceSnippetParameters.builder().description("분기별 공고 목록 조회").tags("Recruit") + .queryParameters(parameterWithName("season").description("2024 상반기")) + .responseSchema(Schema.schema("RecruitGetResponse")) + .responseFields(fieldWithPath("[].id").type(JsonFieldType.NUMBER).description("ID"), + fieldWithPath("[].title").type(JsonFieldType.STRING).description("제목"), + fieldWithPath("[].season").type(JsonFieldType.STRING).description("분기"), + fieldWithPath("[].siteUrl").type(JsonFieldType.STRING).description("사이트 url"), + fieldWithPath("[].recruitStatus").type(JsonFieldType.STRING).description("지원 상태"), + fieldWithPath("[].createdDate").type(JsonFieldType.STRING).description("생성일")) + .build()))); } @Test diff --git a/src/test/java/com/server/bbo_gak/global/RestDocsFactory.java b/src/test/java/com/server/bbo_gak/global/RestDocsFactory.java index 99c337f..dac21dc 100644 --- a/src/test/java/com/server/bbo_gak/global/RestDocsFactory.java +++ b/src/test/java/com/server/bbo_gak/global/RestDocsFactory.java @@ -21,26 +21,26 @@ import org.springframework.restdocs.payload.JsonFieldType; import org.springframework.restdocs.snippet.Attributes; import org.springframework.stereotype.Component; -import org.springframework.test.web.servlet.RequestBuilder; +import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder; @Component public class RestDocsFactory { - public RequestBuilder createRequest( + public MockHttpServletRequestBuilder createRequest( String url, Object requestDto, HttpMethod method, ObjectMapper objectMapper ) throws Exception { String content = objectMapper.writeValueAsString(requestDto); return buildRequest(url, content, method); } - public RequestBuilder createRequest( + public MockHttpServletRequestBuilder createRequest( String url, Object requestDto, HttpMethod method, ObjectMapper objectMapper, Object... pathParams ) throws Exception { String content = objectMapper.writeValueAsString(requestDto); return buildRequest(url, content, method, pathParams); } - public RequestBuilder createRequestList( + public MockHttpServletRequestBuilder createRequestList( String url, List requestDtos, HttpMethod method, ObjectMapper objectMapper ) throws Exception { StringBuilder contentBuilder = new StringBuilder("["); @@ -55,7 +55,7 @@ public RequestBuilder createRequestList( return buildRequest(url, content, method); } - public RequestBuilder createRequestList( + public MockHttpServletRequestBuilder createRequestList( String url, List requestDtos, HttpMethod method, ObjectMapper objectMapper, Object... pathParams ) throws Exception { StringBuilder contentBuilder = new StringBuilder("["); @@ -232,7 +232,7 @@ private RestDocumentationResultHandler getRestDocumentationResultHandler(Str ); } - private RequestBuilder buildRequest(String url, String content, HttpMethod method) { + private MockHttpServletRequestBuilder buildRequest(String url, String content, HttpMethod method) { return switch (method.name()) { case "POST" -> RestDocumentationRequestBuilders.post(url) .contentType(MediaType.APPLICATION_JSON) @@ -256,7 +256,8 @@ private RequestBuilder buildRequest(String url, String content, HttpMethod metho }; } - public RequestBuilder buildRequest(String url, String content, HttpMethod method, Object... pathParams) { + public MockHttpServletRequestBuilder buildRequest(String url, String content, HttpMethod method, + Object... pathParams) { return switch (method.name()) { case "POST" -> createPostRequest(url, content, pathParams); case "GET" -> createGetRequest(url, content, pathParams); @@ -267,33 +268,33 @@ public RequestBuilder buildRequest(String url, String content, HttpMethod method }; } - private RequestBuilder createPostRequest(String url, String content, Object... pathParams) { + private MockHttpServletRequestBuilder createPostRequest(String url, String content, Object... pathParams) { return RestDocumentationRequestBuilders.post(url, pathParams) .contentType(MediaType.APPLICATION_JSON) .content(content) .accept(MediaType.APPLICATION_JSON); } - private RequestBuilder createPatchRequest(String url, String content, Object... pathParams) { + private MockHttpServletRequestBuilder createPatchRequest(String url, String content, Object... pathParams) { return RestDocumentationRequestBuilders.patch(url, pathParams) .contentType(MediaType.APPLICATION_JSON) .content(content) .accept(MediaType.APPLICATION_JSON); } - private RequestBuilder createGetRequest(String url, String content, Object... pathParams) { + private MockHttpServletRequestBuilder createGetRequest(String url, String content, Object... pathParams) { return RestDocumentationRequestBuilders.get(url, pathParams) .contentType(MediaType.APPLICATION_JSON); } - private RequestBuilder createPutRequest(String url, String content, Object... pathParams) { + private MockHttpServletRequestBuilder createPutRequest(String url, String content, Object... pathParams) { return RestDocumentationRequestBuilders.put(url, pathParams) .contentType(MediaType.APPLICATION_JSON) .content(content) .accept(MediaType.APPLICATION_JSON); } - private RequestBuilder createDeleteRequest(String url, String content, Object... pathParams) { + private MockHttpServletRequestBuilder createDeleteRequest(String url, String content, Object... pathParams) { if (content.equals("null")) { return RestDocumentationRequestBuilders.delete(url, pathParams) .contentType(MediaType.APPLICATION_JSON); From ef0d6fe51f7ab31c0d334d6da2c1fd40940dbc47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=84=B8=EC=A4=80?= <74056843+sejoon00@users.noreply.github.com> Date: Mon, 12 Aug 2024 21:47:02 +0900 Subject: [PATCH 3/7] Remove static resources from tracking --- .../resources/static/docs/open-api-3.0.1.json | 1786 ----------------- 1 file changed, 1786 deletions(-) delete mode 100644 src/main/resources/static/docs/open-api-3.0.1.json diff --git a/src/main/resources/static/docs/open-api-3.0.1.json b/src/main/resources/static/docs/open-api-3.0.1.json deleted file mode 100644 index ac9f54d..0000000 --- a/src/main/resources/static/docs/open-api-3.0.1.json +++ /dev/null @@ -1,1786 +0,0 @@ -{ - "openapi" : "3.0.1", - "info" : { - "title" : "뽀각 API 문서", - "description" : "뽀각 API 문서입니다.", - "version" : "0.0.1" - }, - "servers" : [ { - "url" : "http://114.70.23.79:8080" - } ], - "tags" : [ ], - "paths" : { - "/api/v1/card" : { - "post" : { - "tags" : [ "Card" ], - "summary" : "카드 신규 생성", - "description" : "카드 신규 생성", - "operationId" : "[create] 카드 신규 생성", - "requestBody" : { - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/CardCreateRequest" - }, - "examples" : { - "[create] 카드 신규 생성" : { - "value" : "{\"cardTypeValueList\":[\"경험_정리\",\"자기소개서\"],\"tagIdList\":[1,2]}" - } - } - } - } - }, - "responses" : { - "200" : { - "description" : "200", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/CardCreateResponse" - }, - "examples" : { - "[create] 카드 신규 생성" : { - "value" : "{\n \"cardId\" : 4\n}" - } - } - } - } - } - } - } - }, - "/api/v1/card-images" : { - "delete" : { - "tags" : [ "CardImage" ], - "operationId" : "[delete] ", - "requestBody" : { - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/CardImageDeleteRequest" - }, - "examples" : { - "[delete] s3에서_삭제할_이미지_찾기_실패" : { - "value" : "{\n \"cardId\" : 0,\n \"staticUrl\" : \"invalid-staticUrl\"\n}" - }, - "[delete] 카드 찾기 실패" : { - "value" : "{\n \"cardId\" : 0,\n \"staticUrl\" : \"invalid-staticUrl\"\n}" - } - } - } - } - }, - "responses" : { - "404" : { - "description" : "404", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/api-v1-recruits-id-season1501512887" - }, - "examples" : { - "[delete] s3에서_삭제할_이미지_찾기_실패" : { - "value" : "{\n \"message\" : \"해당 카드를 찾을 수 없습니다\",\n \"status\" : \"NOT_FOUND\"\n}" - }, - "[delete] 카드 찾기 실패" : { - "value" : "{\n \"message\" : \"해당 카드를 찾을 수 없습니다\",\n \"status\" : \"NOT_FOUND\"\n}" - } - } - } - } - } - } - } - }, - "/api/v1/cards" : { - "get" : { - "tags" : [ "Card" ], - "summary" : "카드 리스트 조회", - "description" : "카드 리스트 조회", - "operationId" : "[select] 카드 리스트 조회", - "parameters" : [ { - "name" : "type", - "in" : "query", - "description" : "타입", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "200", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/CardListGetResponse" - }, - "examples" : { - "[select] 카드 리스트 조회" : { - "value" : "[ {\n \"id\" : 1,\n \"title\" : \"test_title\",\n \"updatedDate\" : \"2024-07-24 21:22:08\",\n \"tagList\" : [ {\n \"id\" : 1,\n \"name\" : \"스프링\",\n \"type\" : \"역량\"\n }, {\n \"id\" : 2,\n \"name\" : \"리액트\",\n \"type\" : \"역량\"\n } ]\n} ]" - } - } - } - } - } - } - } - }, - "/api/v1/recruits" : { - "get" : { - "tags" : [ "Recruit" ], - "summary" : "전체 공고 목록 조회", - "description" : "전체 공고 목록 조회", - "operationId" : "[GET] 전체 공고 목록 조회 성공", - "responses" : { - "200" : { - "description" : "200", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/RecruitGetResponse" - }, - "examples" : { - "[GET] 전체 공고 목록 조회 성공" : { - "value" : "[ {\n \"id\" : 1,\n \"title\" : \"New Title\",\n \"season\" : \"2024 상반기\",\n \"siteUrl\" : \"https://example.com\",\n \"recruitStatus\" : \"지원 완료\",\n \"createdDate\" : \"2023-01-01T00:00:00\"\n} ]" - } - } - } - } - } - } - }, - "post" : { - "tags" : [ "Recruit" ], - "summary" : "공고 생성", - "description" : "공고 생성", - "operationId" : "[POST] 공고 생성 성공", - "requestBody" : { - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/RecruitCreateRequest" - }, - "examples" : { - "[POST] 공고 생성 성공" : { - "value" : "{\n \"season\" : \"2024 상반기\",\n \"title\" : \"New Recruit Title\",\n \"siteUrl\" : \"https://example.com\",\n \"recruitScheduleStage\" : \"CLOSING_DOCUMENT\",\n \"deadline\" : \"2024-12-31\"\n}" - } - } - } - } - }, - "responses" : { - "200" : { - "description" : "200", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/RecruitGetResponse" - }, - "examples" : { - "[POST] 공고 생성 성공" : { - "value" : "{\n \"id\" : 1,\n \"title\" : \"New Title\",\n \"season\" : \"2024 상반기\",\n \"siteUrl\" : \"https://example.com\",\n \"recruitStatus\" : \"\",\n \"createdDate\" : \"2023-01-01T00:00:00\"\n}" - } - } - } - } - } - } - } - }, - "/api/v1/tags" : { - "get" : { - "tags" : [ "Tag" ], - "summary" : "전체 카드 태그 목록", - "description" : "전체 카드 태그 목록", - "operationId" : "[태그_전체_목록_조회] 성공", - "responses" : { - "200" : { - "description" : "200", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/TagGetResponse" - }, - "examples" : { - "[태그_전체_목록_조회] 성공" : { - "value" : "[{\"id\":1,\"name\":\"스프링\",\"type\":\"역량\"},{\"id\":2,\"name\":\"리액트\",\"type\":\"역량\"},{\"id\":3,\"name\":\"봉사활동\",\"type\":\"인성\"}]" - } - } - } - } - } - } - } - }, - "/api/v1/cards/type-count" : { - "get" : { - "tags" : [ "Card" ], - "summary" : "카드 타입 카운트 조회", - "description" : "카드 타입 카운트 조회", - "operationId" : "[select] 카드 타입 카운트 조회", - "responses" : { - "200" : { - "description" : "200", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/CardTypeCountGetResponse" - }, - "examples" : { - "[select] 카드 타입 카운트 조회" : { - "value" : "{\n \"경험_정리\" : 2,\n \"자기소개서\" : 1,\n \"면접_질문\" : 0\n}" - } - } - } - } - } - } - } - }, - "/api/v1/cards/{card-id}" : { - "get" : { - "tags" : [ "Card" ], - "summary" : "카드 단건 조회", - "description" : "카드 단건 조회", - "operationId" : "[select] 카드 ", - "parameters" : [ { - "name" : "card-id", - "in" : "path", - "description" : "card-id", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "404" : { - "description" : "404", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - }, - "examples" : { - "[select] 카드 찾기 실패" : { - "value" : "{\n \"message\" : \"해당 카드를 찾을 수 없습니다\",\n \"status\" : \"NOT_FOUND\"\n}" - } - } - } - } - }, - "200" : { - "description" : "200", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/CardGetResponse" - }, - "examples" : { - "[select] 카드 단건 조회" : { - "value" : "{\n \"title\" : \"test_title\",\n \"content\" : \"test_contents\",\n \"updatedDate\" : \"2024-07-24 21:22:08\",\n \"cardTypeValueList\" : [ \"경험_정리\", \"자기소개서\", \"면접_질문\" ],\n \"tagList\" : [ {\n \"id\" : 1,\n \"name\" : \"스프링\",\n \"type\" : \"역량\"\n }, {\n \"id\" : 2,\n \"name\" : \"리액트\",\n \"type\" : \"역량\"\n } ]\n}" - } - } - } - } - } - } - }, - "delete" : { - "tags" : [ "Card" ], - "summary" : "카드 삭제", - "description" : "카드 삭제", - "operationId" : "[카드_삭제] ", - "parameters" : [ { - "name" : "card-id", - "in" : "path", - "description" : "Card id", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "404" : { - "description" : "404", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - }, - "examples" : { - "[카드_삭제] 카드 찾기 실패" : { - "value" : "{\"message\":\"해당 카드를 찾을 수 없습니다\",\"status\":\"NOT_FOUND\"}" - } - } - } - } - }, - "200" : { - "description" : "200" - } - } - } - }, - "/api/v1/images/presigned-urls" : { - "post" : { - "tags" : [ "image" ], - "summary" : "presigend url 생성", - "description" : "presigend url 생성", - "operationId" : "[presigned-urls] ", - "requestBody" : { - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/ImageUploadRequest" - }, - "examples" : { - "[presigned-urls] 성공" : { - "value" : "[ {\n \"fileExtension\" : \"PNG\"\n}, {\n \"fileExtension\" : \"PNG\"\n} ]" - }, - "[presigned-urls] 실패-유효하지않은파일이름" : { - "value" : "[ {\n \"fileExtension\" : \"PNG\"\n} ]" - } - } - } - } - }, - "responses" : { - "200" : { - "description" : "200", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/ImageUploadResponse" - }, - "examples" : { - "[presigned-urls] 성공" : { - "value" : "[ {\n \"filename\" : \"image1.jpg\",\n \"presignedUrl\" : \"https://example.com/image1.jpg\"\n}, {\n \"filename\" : \"image2.jpg\",\n \"presignedUrl\" : \"https://example.com/image2.jpg\"\n} ]" - } - } - } - } - }, - "400" : { - "description" : "400", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/api-v1-recruits-id-season1501512887" - }, - "examples" : { - "[presigned-urls] 실패-유효하지않은파일이름" : { - "value" : "{\n \"message\" : \"지원하지 않는 파일 확장자입니다.\",\n \"status\" : \"BAD_REQUEST\"\n}" - } - } - } - } - } - } - } - }, - "/api/v1/recruits/bySeason" : { - "get" : { - "tags" : [ "Recruit" ], - "summary" : "분기별 공고 목록 조회", - "description" : "분기별 공고 목록 조회", - "operationId" : "[GET] 분기별 공고 리스트 조회 성공", - "parameters" : [ { - "name" : "season", - "in" : "query", - "description" : "2024 상반기", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "200", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/RecruitGetResponse" - }, - "examples" : { - "[GET] 분기별 공고 리스트 조회 성공" : { - "value" : "[ {\n \"id\" : 1,\n \"title\" : \"New Title\",\n \"season\" : \"2024 상반기\",\n \"siteUrl\" : \"https://example.com\",\n \"recruitStatus\" : \"지원 완료\",\n \"createdDate\" : \"2023-01-01T00:00:00\"\n} ]" - } - } - } - } - } - } - } - }, - "/api/v1/recruits/progressing" : { - "get" : { - "tags" : [ "Recruit" ], - "summary" : "진행중 공고 목록 조회", - "description" : "진행중 공고 목록 조회", - "operationId" : "[GET] 진행 중 공고 목록 조회 성공", - "responses" : { - "200" : { - "description" : "200", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/RecruitGetResponse" - }, - "examples" : { - "[GET] 진행 중 공고 목록 조회 성공" : { - "value" : "[ {\n \"id\" : 1,\n \"title\" : \"New Title\",\n \"season\" : \"2024 상반기\",\n \"siteUrl\" : \"https://example.com\",\n \"recruitStatus\" : \"지원 완료\",\n \"createdDate\" : \"2023-01-01T00:00:00\"\n} ]" - } - } - } - } - } - } - } - }, - "/api/v1/recruits/{id}" : { - "delete" : { - "tags" : [ "Recruit" ], - "summary" : "공고 삭제", - "description" : "공고 삭제", - "operationId" : "[DELETE] 공고 삭제 ", - "parameters" : [ { - "name" : "id", - "in" : "path", - "description" : "", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "200" - }, - "404" : { - "description" : "404", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/api-v1-recruits-id-season1501512887" - }, - "examples" : { - "[DELETE] 공고 삭제 실패" : { - "value" : "{\n \"message\" : \"해당 공고를 찾을 수 없습니다\",\n \"status\" : \"NOT_FOUND\"\n}" - } - } - } - } - } - } - } - }, - "/api/v1/card-images/static-urls/{cardId}" : { - "post" : { - "tags" : [ "CardImage" ], - "summary" : "카드 이미지 압로드 완료", - "description" : "카드 이미지 압로드 완료", - "operationId" : "[upload] ", - "parameters" : [ { - "name" : "cardId", - "in" : "path", - "description" : "", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "requestBody" : { - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/CardImageUploadCompleteRequest" - }, - "examples" : { - "[upload] S3에서_업로드된_이미지_찾기_실패" : { - "value" : "[ {\n \"fileName\" : \"invalid-filename\"\n}, {\n \"fileName\" : \"invalid-filename\"\n} ]" - }, - "[upload] 성공" : { - "value" : "[ {\n \"fileName\" : \"file1.png\"\n}, {\n \"fileName\" : \"file2.png\"\n} ]" - }, - "[upload] 카드 찾기 실패" : { - "value" : "[ {\n \"fileName\" : \"invalid-filename\"\n}, {\n \"fileName\" : \"invalid-filename\"\n} ]" - } - } - } - } - }, - "responses" : { - "404" : { - "description" : "404", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/api-v1-recruits-id-season1501512887" - }, - "examples" : { - "[upload] S3에서_업로드된_이미지_찾기_실패" : { - "value" : "{\n \"message\" : \"해당 파일은 S3내에 존재하지 않습니다\",\n \"status\" : \"NOT_FOUND\"\n}" - }, - "[upload] 카드 찾기 실패" : { - "value" : "{\n \"message\" : \"해당 카드를 찾을 수 없습니다\",\n \"status\" : \"NOT_FOUND\"\n}" - } - } - } - } - }, - "200" : { - "description" : "200", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/CardImageUploadCompleteResponse" - }, - "examples" : { - "[upload] 성공" : { - "value" : "[ {\n \"staticUrl\" : \"https://example.com/file1.png\"\n}, {\n \"staticUrl\" : \"https://example.com/file2.png\"\n} ]" - } - } - } - } - } - } - } - }, - "/api/v1/cards/{card-id}/card-memo" : { - "get" : { - "tags" : [ "CardMemo" ], - "summary" : "카드_메모_조회", - "description" : "카드_메모_조회", - "operationId" : "[카드_메모_조회] 성공", - "parameters" : [ { - "name" : "card-id", - "in" : "path", - "description" : "card-id", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "200", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/com.server.bbo_gak.domain.card.dto.response.CardMemoCreateResponse" - }, - "examples" : { - "[카드_메모_조회] 성공" : { - "value" : "[{\"id\":1,\"content\":\"test contents 111\",\"updatedDate\":\"2024-07-24 21:26:42\"},{\"id\":2,\"content\":\"test contents 222\",\"updatedDate\":\"2024-07-24 21:26:42\"},{\"id\":3,\"content\":\"test contents 222\",\"updatedDate\":\"2024-07-24 21:26:42\"}]" - } - } - } - } - } - } - }, - "post" : { - "tags" : [ "CardMemo" ], - "summary" : "카드_메모_생성", - "description" : "카드_메모_생성", - "operationId" : "[카드_메모_생성] ", - "parameters" : [ { - "name" : "card-id", - "in" : "path", - "description" : "", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "requestBody" : { - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/CardMemoCreateRequest" - }, - "examples" : { - "[카드_메모_생성] 성공" : { - "value" : "{\n \"content\" : \"test content\"\n}" - }, - "[카드_메모_생성] 카드_찾기_실패" : { - "value" : "{\n \"content\" : \"test content\"\n}" - } - } - } - } - }, - "responses" : { - "200" : { - "description" : "200", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/CardMemoCreateResponse" - }, - "examples" : { - "[카드_메모_생성] 성공" : { - "value" : "{\n \"cardMemoId\" : 7,\n \"content\" : \"test content\"\n}" - } - } - } - } - }, - "404" : { - "description" : "404", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/api-v1-recruits-id-season1501512887" - }, - "examples" : { - "[카드_메모_생성] 카드_찾기_실패" : { - "value" : "{\n \"message\" : \"해당 카드를 찾을 수 없습니다\",\n \"status\" : \"NOT_FOUND\"\n}" - } - } - } - } - } - } - } - }, - "/api/v1/cards/{card-id}/content" : { - "put" : { - "tags" : [ "Card" ], - "summary" : "카드 본문 수정", - "description" : "카드 본문 수정", - "operationId" : "[카드 본문 수정] ", - "parameters" : [ { - "name" : "card-id", - "in" : "path", - "description" : "Card id", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "requestBody" : { - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/CardContentUpdateRequest" - }, - "examples" : { - "[카드 본문 수정] 성공" : { - "value" : "{\n \"content\" : \"test content\"\n}" - }, - "[카드 본문 수정] 카드 찾기 실패" : { - "value" : "{\n \"content\" : \"test content\"\n}" - } - } - } - } - }, - "responses" : { - "200" : { - "description" : "200" - }, - "404" : { - "description" : "404", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - }, - "examples" : { - "[카드 본문 수정] 카드 찾기 실패" : { - "value" : "{\"message\":\"해당 카드를 찾을 수 없습니다\",\"status\":\"NOT_FOUND\"}" - } - } - } - } - } - } - } - }, - "/api/v1/cards/{card-id}/tags" : { - "get" : { - "tags" : [ "Tag" ], - "summary" : "카드 태그 목록", - "description" : "카드 태그 목록", - "operationId" : "[카드_태그_목록_조회] ", - "parameters" : [ { - "name" : "card-id", - "in" : "path", - "description" : "Card id", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "404" : { - "description" : "404", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - }, - "examples" : { - "[카드_태그_목록_조회] 카드 찾기 실패" : { - "value" : "{\"message\":\"해당 카드를 찾을 수 없습니다\",\"status\":\"NOT_FOUND\"}" - } - } - } - } - }, - "200" : { - "description" : "200", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/TagGetResponse" - }, - "examples" : { - "[카드_태그_목록_조회] 성공" : { - "value" : "[{\"id\":3,\"name\":\"봉사활동\",\"type\":\"인성\"}]" - } - } - } - } - } - } - } - }, - "/api/v1/cards/{card-id}/title" : { - "put" : { - "tags" : [ "Card" ], - "summary" : "카드 제목 수정", - "description" : "카드 제목 수정", - "operationId" : "[update] 카드 ", - "parameters" : [ { - "name" : "card-id", - "in" : "path", - "description" : "Card id", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "requestBody" : { - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/CardTitleUpdateRequest" - }, - "examples" : { - "[update] 카드 제목 수정" : { - "value" : "{\n \"title\" : \"test title\"\n}" - }, - "[update] 카드 찾기 실패" : { - "value" : "{\n \"title\" : \"test title\"\n}" - } - } - } - } - }, - "responses" : { - "200" : { - "description" : "200" - }, - "404" : { - "description" : "404", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - }, - "examples" : { - "[update] 카드 찾기 실패" : { - "value" : "{\"message\":\"해당 카드를 찾을 수 없습니다\",\"status\":\"NOT_FOUND\"}" - } - } - } - } - } - } - } - }, - "/api/v1/recruits/{id}/season" : { - "patch" : { - "tags" : [ "Recruit" ], - "summary" : "공고 분기 수정", - "description" : "공고 분기 수정", - "operationId" : "[PATCH] 분기 수정 ", - "parameters" : [ { - "name" : "id", - "in" : "path", - "description" : "", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "requestBody" : { - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/RecruitUpdateSeasonRequest" - }, - "examples" : { - "[PATCH] 분기 수정 성공" : { - "value" : "{\n \"season\" : \"2024 상반기\"\n}" - }, - "[PATCH] 분기 수정 실패" : { - "value" : "{\n \"season\" : \"2024 상반기\"\n}" - } - } - } - } - }, - "responses" : { - "200" : { - "description" : "200", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/RecruitGetResponse" - }, - "examples" : { - "[PATCH] 분기 수정 성공" : { - "value" : "{\n \"id\" : 1,\n \"title\" : \"New Title\",\n \"season\" : \"2024 상반기\",\n \"siteUrl\" : \"https://example.com\",\n \"recruitStatus\" : \"지원 완료\",\n \"createdDate\" : \"2023-01-01T00:00:00\"\n}" - } - } - } - } - }, - "404" : { - "description" : "404", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/api-v1-recruits-id-season1501512887" - }, - "examples" : { - "[PATCH] 분기 수정 실패" : { - "value" : "{\n \"message\" : \"해당 공고를 찾을 수 없습니다\",\n \"status\" : \"NOT_FOUND\"\n}" - } - } - } - } - } - } - } - }, - "/api/v1/recruits/{id}/siteUrl" : { - "patch" : { - "tags" : [ "Recruit" ], - "summary" : "공고 사이트 URL 수정", - "description" : "공고 사이트 URL 수정", - "operationId" : "[PATCH] 사이트 URL 수정 ", - "parameters" : [ { - "name" : "id", - "in" : "path", - "description" : "", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "requestBody" : { - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/RecruitUpdateSiteUrlRequest" - }, - "examples" : { - "[PATCH] 사이트 URL 수정 실패" : { - "value" : "{\n \"siteUrl\" : \"https://example.com\"\n}" - }, - "[PATCH] 사이트 URL 수정 성공" : { - "value" : "{\n \"siteUrl\" : \"https://example.com\"\n}" - } - } - } - } - }, - "responses" : { - "404" : { - "description" : "404", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/api-v1-recruits-id-season1501512887" - }, - "examples" : { - "[PATCH] 사이트 URL 수정 실패" : { - "value" : "{\n \"message\" : \"해당 공고를 찾을 수 없습니다\",\n \"status\" : \"NOT_FOUND\"\n}" - } - } - } - } - }, - "200" : { - "description" : "200", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/RecruitGetResponse" - }, - "examples" : { - "[PATCH] 사이트 URL 수정 성공" : { - "value" : "{\n \"id\" : 1,\n \"title\" : \"New Title\",\n \"season\" : \"2024 상반기\",\n \"siteUrl\" : \"https://example.com\",\n \"recruitStatus\" : \"지원 완료\",\n \"createdDate\" : \"2023-01-01T00:00:00\"\n}" - } - } - } - } - } - } - } - }, - "/api/v1/recruits/{id}/status" : { - "patch" : { - "tags" : [ "Recruit" ], - "summary" : "공고 상태 수정", - "description" : "공고 상태 수정", - "operationId" : "[PATCH] 상태 수정 ", - "parameters" : [ { - "name" : "id", - "in" : "path", - "description" : "", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "requestBody" : { - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/RecruitUpdateStatusRequest" - }, - "examples" : { - "[PATCH] 상태 수정 실패" : { - "value" : "{\n \"recruitStatus\" : \"APPLICATION_COMPLETED\"\n}" - }, - "[PATCH] 상태 수정 성공" : { - "value" : "{\n \"recruitStatus\" : \"APPLICATION_COMPLETED\"\n}" - } - } - } - } - }, - "responses" : { - "404" : { - "description" : "404", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/api-v1-recruits-id-season1501512887" - }, - "examples" : { - "[PATCH] 상태 수정 실패" : { - "value" : "{\n \"message\" : \"해당 공고를 찾을 수 없습니다\",\n \"status\" : \"NOT_FOUND\"\n}" - } - } - } - } - }, - "200" : { - "description" : "200", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/RecruitGetResponse" - }, - "examples" : { - "[PATCH] 상태 수정 성공" : { - "value" : "{\n \"id\" : 1,\n \"title\" : \"New Title\",\n \"season\" : \"2024 상반기\",\n \"siteUrl\" : \"https://example.com\",\n \"recruitStatus\" : \"지원 완료\",\n \"createdDate\" : \"2023-01-01T00:00:00\"\n}" - } - } - } - } - } - } - } - }, - "/api/v1/recruits/{id}/title" : { - "patch" : { - "tags" : [ "Recruit" ], - "summary" : "공고 타이틀 수정", - "description" : "공고 타이틀 수정", - "operationId" : "[PATCH] 제목 수정 ", - "parameters" : [ { - "name" : "id", - "in" : "path", - "description" : "", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "requestBody" : { - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/RecruitUpdateTitleRequest" - }, - "examples" : { - "[PATCH] 제목 수정 성공" : { - "value" : "{\n \"title\" : \"New Title\"\n}" - }, - "[PATCH] 제목 수정 실패" : { - "value" : "{\n \"title\" : \"New Title\"\n}" - } - } - } - } - }, - "responses" : { - "200" : { - "description" : "200", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/RecruitGetResponse" - }, - "examples" : { - "[PATCH] 제목 수정 성공" : { - "value" : "{\n \"id\" : 1,\n \"title\" : \"New Title\",\n \"season\" : \"2024 상반기\",\n \"siteUrl\" : \"https://example.com\",\n \"recruitStatus\" : \"지원 완료\",\n \"createdDate\" : \"2023-01-01T00:00:00\"\n}" - } - } - } - } - }, - "404" : { - "description" : "404", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/api-v1-recruits-id-season1501512887" - }, - "examples" : { - "[PATCH] 제목 수정 실패" : { - "value" : "{\n \"message\" : \"해당 공고를 찾을 수 없습니다\",\n \"status\" : \"NOT_FOUND\"\n}" - } - } - } - } - } - } - } - }, - "/api/v1/users/test/login" : { - "post" : { - "tags" : [ "auth" ], - "summary" : "jwt 토큰 생성", - "description" : "jwt 토큰 생성", - "operationId" : "[로그인] ", - "requestBody" : { - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/LoginRequest" - }, - "examples" : { - "[로그인] 아이디_없음" : { - "value" : "{\n \"loginId\" : \"wrong\",\n \"password\" : \"test123\"\n}" - }, - "[로그인] 성공" : { - "value" : "{\n \"loginId\" : \"test\",\n \"password\" : \"test123\"\n}" - }, - "[로그인] 비밀번호_실패" : { - "value" : "{\n \"loginId\" : \"test\",\n \"password\" : \"wrong\"\n}" - } - } - } - } - }, - "responses" : { - "404" : { - "description" : "404", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/api-v1-recruits-id-season1501512887" - }, - "examples" : { - "[로그인] 아이디_없음" : { - "value" : "{\n \"message\" : \"해당 유저를 찾을 수 없습니다.\",\n \"status\" : \"NOT_FOUND\"\n}" - } - } - } - } - }, - "200" : { - "description" : "200", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/TokenDto" - }, - "examples" : { - "[로그인] 성공" : { - "value" : "{\n \"accessToken\" : \"accessToken\",\n \"refreshToken\" : \"refreshToken\"\n}" - } - } - } - } - }, - "400" : { - "description" : "400", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/api-v1-recruits-id-season1501512887" - }, - "examples" : { - "[로그인] 비밀번호_실패" : { - "value" : "{\n \"message\" : \"비밀번호를 잘못 입력하셨습니다.\",\n \"status\" : \"BAD_REQUEST\"\n}" - } - } - } - } - } - } - } - }, - "/api/v1/cards/{card-id}/card-memo/{card-memo-id}" : { - "delete" : { - "tags" : [ "CardMemo" ], - "summary" : "카드_메모_삭제", - "description" : "카드_메모_삭제", - "operationId" : "[카드_메모_삭제] 성공", - "parameters" : [ { - "name" : "card-id", - "in" : "path", - "description" : "card-id", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "card-memo-id", - "in" : "path", - "description" : "card-memo-id", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "200" - } - } - } - }, - "/api/v1/cards/{card-id}/tag/{tag-id}" : { - "post" : { - "tags" : [ "Tag" ], - "summary" : "카드 태그 추가", - "description" : "카드 태그 추가", - "operationId" : "[카드_", - "parameters" : [ { - "name" : "card-id", - "in" : "path", - "description" : "Card id", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "tag-id", - "in" : "path", - "description" : "Tag id", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "200" - }, - "404" : { - "description" : "404", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - }, - "examples" : { - "[카드_태그_추가] 태그 찾기 실패" : { - "value" : "{\"message\":\"해당 태그를 찾을 수 없습니다\",\"status\":\"NOT_FOUND\"}" - }, - "[카드_찾기_실패] 카드 찾기 실패" : { - "value" : "{\"message\":\"해당 카드를 찾을 수 없습니다\",\"status\":\"NOT_FOUND\"}" - } - } - } - } - }, - "400" : { - "description" : "400", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - }, - "examples" : { - "[카드_태그_추가] 태그 중복 추가" : { - "value" : "{\"message\":\"해당 태그가 이미 추가 돼있습니다.\",\"status\":\"BAD_REQUEST\"}" - } - } - } - } - } - } - }, - "delete" : { - "tags" : [ "Tag" ], - "summary" : "카드 태그 삭제", - "description" : "카드 태그 삭제", - "operationId" : "[카드_태그_삭제] ", - "parameters" : [ { - "name" : "card-id", - "in" : "path", - "description" : "Card id", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "tag-id", - "in" : "path", - "description" : "Tag id", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "200" - }, - "404" : { - "description" : "404", - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - }, - "examples" : { - "[카드_태그_삭제] 카드 찾기 실패" : { - "value" : "{\"message\":\"해당 카드를 찾을 수 없습니다\",\"status\":\"NOT_FOUND\"}" - }, - "[카드_태그_삭제] 카드 태그 매핑 찾기 실패" : { - "value" : "{\"message\":\"해당 카드와 태그 매핑을 찾을 수 없습니다\",\"status\":\"NOT_FOUND\"}" - }, - "[카드_태그_삭제] 태그 찾기 실패" : { - "value" : "{\"message\":\"해당 태그를 찾을 수 없습니다\",\"status\":\"NOT_FOUND\"}" - } - } - } - } - } - } - } - }, - "/api/v1/cards/{card-id}/card-memo/{card-memo-id}/content" : { - "put" : { - "tags" : [ "CardMemo" ], - "summary" : "카드_메모_조회", - "description" : "카드_메모_조회", - "operationId" : "[카드_메모_내용_수정] 성공", - "parameters" : [ { - "name" : "card-id", - "in" : "path", - "description" : "card-id", - "required" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "card-memo-id", - "in" : "path", - "description" : "card-memo-id", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "requestBody" : { - "content" : { - "application/json;charset=UTF-8" : { - "schema" : { - "$ref" : "#/components/schemas/api-v1-cards-card-id-card-memo-card-memo-id-content486549215" - }, - "examples" : { - "[카드_메모_내용_수정] 성공" : { - "value" : "{\"content\":\"updated contents\"}" - } - } - } - } - }, - "responses" : { - "200" : { - "description" : "200" - } - } - } - } - }, - "components" : { - "schemas" : { - "RecruitGetResponse" : { - "title" : "RecruitGetResponse", - "type" : "object", - "properties" : { - "createdDate" : { - "type" : "string", - "description" : "createdDate" - }, - "siteUrl" : { - "type" : "string", - "description" : "siteUrl" - }, - "season" : { - "type" : "string", - "description" : "season" - }, - "id" : { - "type" : "number", - "description" : "id" - }, - "recruitStatus" : { - "type" : "string", - "description" : "recruitStatus" - }, - "title" : { - "type" : "string", - "description" : "title" - } - } - }, - "CardCreateRequest" : { - "title" : "CardCreateRequest", - "type" : "object", - "properties" : { - "cardTypeValueList" : { - "type" : "array", - "description" : "카드 타입값", - "items" : { - "oneOf" : [ { - "type" : "object" - }, { - "type" : "boolean" - }, { - "type" : "string" - }, { - "type" : "number" - } ] - } - }, - "tagIdList" : { - "type" : "array", - "description" : "태그 ID", - "items" : { - "oneOf" : [ { - "type" : "object" - }, { - "type" : "boolean" - }, { - "type" : "string" - }, { - "type" : "number" - } ] - } - } - } - }, - "ImageUploadResponse" : { - "title" : "ImageUploadResponse", - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "filename" : { - "type" : "string", - "description" : "filename" - }, - "presignedUrl" : { - "type" : "string", - "description" : "presignedUrl" - } - } - } - }, - "com.server.bbo_gak.domain.card.dto.response.CardMemoCreateResponse" : { - "title" : "com.server.bbo_gak.domain.card.dto.response.CardMemoCreateResponse", - "type" : "object" - }, - "api-v1-recruits-id-season1501512887" : { - "type" : "object", - "properties" : { - "message" : { - "type" : "string", - "description" : "에러 메시지" - }, - "status" : { - "type" : "string", - "description" : "HTTP 상태 코드" - } - } - }, - "RecruitUpdateStatusRequest" : { - "title" : "RecruitUpdateStatusRequest", - "type" : "object", - "properties" : { - "recruitStatus" : { - "type" : "string", - "description" : "recruitStatus" - } - } - }, - "CardTypeCountGetResponse" : { - "title" : "CardTypeCountGetResponse", - "type" : "object", - "properties" : { - "면접_질문" : { - "type" : "number", - "description" : "면접_질문_개수" - }, - "자기소개서" : { - "type" : "number", - "description" : "자기소개서_개수" - }, - "경험_정리" : { - "type" : "number", - "description" : "면접_질문_개수" - } - } - }, - "LoginRequest" : { - "title" : "LoginRequest", - "type" : "object", - "properties" : { - "password" : { - "type" : "string", - "description" : "password" - }, - "loginId" : { - "type" : "string", - "description" : "loginId" - } - } - }, - "CardContentUpdateRequest" : { - "title" : "CardContentUpdateRequest", - "type" : "object", - "properties" : { - "content" : { - "type" : "string", - "description" : "카드 본문" - } - } - }, - "ImageUploadRequest" : { - "title" : "ImageUploadRequest", - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "fileExtension" : { - "type" : "string", - "description" : "fileExtension" - } - } - } - }, - "CardImageUploadCompleteResponse" : { - "title" : "CardImageUploadCompleteResponse", - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "staticUrl" : { - "type" : "string", - "description" : "staticUrl" - } - } - } - }, - "TokenDto" : { - "title" : "TokenDto", - "type" : "object", - "properties" : { - "accessToken" : { - "type" : "string", - "description" : "accessToken" - }, - "refreshToken" : { - "type" : "string", - "description" : "refreshToken" - } - } - }, - "ErrorResponse" : { - "title" : "ErrorResponse", - "type" : "object", - "properties" : { - "message" : { - "type" : "string", - "description" : "Error message" - }, - "status" : { - "type" : "string", - "description" : "HTTP status code" - } - } - }, - "RecruitUpdateSiteUrlRequest" : { - "title" : "RecruitUpdateSiteUrlRequest", - "type" : "object", - "properties" : { - "siteUrl" : { - "type" : "string", - "description" : "siteUrl" - } - } - }, - "RecruitUpdateTitleRequest" : { - "title" : "RecruitUpdateTitleRequest", - "type" : "object", - "properties" : { - "title" : { - "type" : "string", - "description" : "title" - } - } - }, - "api-v1-cards-card-id-card-memo-card-memo-id-content486549215" : { - "type" : "object" - }, - "CardImageDeleteRequest" : { - "title" : "CardImageDeleteRequest", - "type" : "object", - "properties" : { - "cardId" : { - "type" : "number", - "description" : "cardId" - }, - "staticUrl" : { - "type" : "string", - "description" : "staticUrl" - } - } - }, - "TagGetResponse" : { - "title" : "TagGetResponse", - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "description" : "태그 이름" - }, - "id" : { - "type" : "number", - "description" : "태그 ID" - }, - "type" : { - "type" : "string", - "description" : "태그 타입" - } - } - } - }, - "CardTitleUpdateRequest" : { - "title" : "CardTitleUpdateRequest", - "type" : "object", - "properties" : { - "title" : { - "type" : "string", - "description" : "카드 제목" - } - } - }, - "CardMemoCreateRequest" : { - "title" : "CardMemoCreateRequest", - "type" : "object", - "properties" : { - "content" : { - "type" : "string", - "description" : "content" - } - } - }, - "RecruitCreateRequest" : { - "title" : "RecruitCreateRequest", - "type" : "object", - "properties" : { - "recruitScheduleStage" : { - "type" : "string", - "description" : "recruitScheduleStage" - }, - "siteUrl" : { - "type" : "string", - "description" : "siteUrl" - }, - "season" : { - "type" : "string", - "description" : "season" - }, - "deadline" : { - "type" : "string", - "description" : "deadline" - }, - "title" : { - "type" : "string", - "description" : "title" - } - } - }, - "CardGetResponse" : { - "title" : "CardGetResponse", - "type" : "object", - "properties" : { - "tagList" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "description" : "태그 이름" - }, - "id" : { - "type" : "number", - "description" : "태그 ID" - }, - "type" : { - "type" : "string", - "description" : "태그 타입" - } - } - } - }, - "cardTypeValueList" : { - "type" : "array", - "description" : "Card 타입값 리스트", - "items" : { - "oneOf" : [ { - "type" : "object" - }, { - "type" : "boolean" - }, { - "type" : "string" - }, { - "type" : "number" - } ] - } - }, - "updatedDate" : { - "type" : "string", - "description" : "Card 수정일시" - }, - "title" : { - "type" : "string", - "description" : "Card 제목" - }, - "content" : { - "type" : "string", - "description" : "Card 내용" - } - } - }, - "CardCreateResponse" : { - "title" : "CardCreateResponse", - "type" : "object", - "properties" : { - "cardId" : { - "type" : "number", - "description" : "Card ID" - } - } - }, - "CardImageUploadCompleteRequest" : { - "title" : "CardImageUploadCompleteRequest", - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "fileName" : { - "type" : "string", - "description" : "fileName" - } - } - } - }, - "CardMemoCreateResponse" : { - "title" : "CardMemoCreateResponse", - "type" : "object", - "properties" : { - "cardMemoId" : { - "type" : "number", - "description" : "cardMemoId" - }, - "content" : { - "type" : "string", - "description" : "content" - } - } - }, - "RecruitUpdateSeasonRequest" : { - "title" : "RecruitUpdateSeasonRequest", - "type" : "object", - "properties" : { - "season" : { - "type" : "string", - "description" : "season" - } - } - }, - "CardListGetResponse" : { - "title" : "CardListGetResponse", - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "tagList" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "description" : "태그 이름" - }, - "id" : { - "type" : "number", - "description" : "태그 ID" - }, - "type" : { - "type" : "string", - "description" : "태그 타입" - } - } - } - }, - "updatedDate" : { - "type" : "string", - "description" : "Card 수정일시" - }, - "id" : { - "type" : "number", - "description" : "Card ID" - }, - "title" : { - "type" : "string", - "description" : "Card 제목" - } - } - } - } - } - } -} \ No newline at end of file From 009dabfe5909aff7a81ad20d0bc78077d3e9b1c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=84=B8=EC=A4=80?= <74056843+sejoon00@users.noreply.github.com> Date: Mon, 12 Aug 2024 21:52:04 +0900 Subject: [PATCH 4/7] =?UTF-8?q?[fix][#40]=20=EB=B6=84=EA=B8=B0=20=EC=9D=B4?= =?UTF-8?q?=EB=A6=84=20=EC=83=9D=EC=84=B1=20=EB=9D=84=EC=96=B4=EC=93=B0?= =?UTF-8?q?=EA=B8=B0=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/server/bbo_gak/domain/recruit/entity/SeasonPeriod.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/server/bbo_gak/domain/recruit/entity/SeasonPeriod.java b/src/main/java/com/server/bbo_gak/domain/recruit/entity/SeasonPeriod.java index 81acd9e..15ef7ae 100644 --- a/src/main/java/com/server/bbo_gak/domain/recruit/entity/SeasonPeriod.java +++ b/src/main/java/com/server/bbo_gak/domain/recruit/entity/SeasonPeriod.java @@ -21,6 +21,6 @@ public static SeasonPeriod fromMonth(int month) { } public String getSeasonName(int year) { - return year + "_" + this.name; + return year + " " + this.name; } } From 7414a4a99f4a7ec90c0a1faff7c5ad49b27504fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=84=B8=EC=A4=80?= <74056843+sejoon00@users.noreply.github.com> Date: Mon, 12 Aug 2024 21:57:51 +0900 Subject: [PATCH 5/7] =?UTF-8?q?[fix][#40]=20restDocsFactory=20builder=20re?= =?UTF-8?q?turn=EA=B0=92=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/recruit/controller/RecruitControllerTest.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/test/java/com/server/bbo_gak/domain/recruit/controller/RecruitControllerTest.java b/src/test/java/com/server/bbo_gak/domain/recruit/controller/RecruitControllerTest.java index 4c6ae4d..821ebdf 100644 --- a/src/test/java/com/server/bbo_gak/domain/recruit/controller/RecruitControllerTest.java +++ b/src/test/java/com/server/bbo_gak/domain/recruit/controller/RecruitControllerTest.java @@ -6,7 +6,6 @@ import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.when; import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document; -import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.get; import static org.springframework.restdocs.operation.preprocess.Preprocessors.preprocessResponse; import static org.springframework.restdocs.operation.preprocess.Preprocessors.prettyPrint; import static org.springframework.restdocs.payload.PayloadDocumentation.fieldWithPath; @@ -38,7 +37,6 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.http.HttpMethod; -import org.springframework.http.MediaType; import org.springframework.restdocs.payload.JsonFieldType; import org.springframework.test.context.ActiveProfiles; @@ -264,9 +262,8 @@ class 공고_목록_조회 { public void 시즌별_목록_조회_성공() throws Exception { when(recruitService.getRecruitListBySeason(any(), any())).thenReturn(List.of(response)); - mockMvc.perform( - get(DEFAULT_URL + "/bySeason").contentType(MediaType.APPLICATION_JSON).queryParam("season", "2024_" - + "상반기").accept(MediaType.APPLICATION_JSON)) + mockMvc.perform(restDocsFactory.createRequest(DEFAULT_URL + "/bySeason", null, HttpMethod.GET, objectMapper) + .queryParam("season", "2024 상반기")) .andExpect(status().isOk()) .andDo(document("[GET] 분기별 공고 리스트 조회 성공", preprocessResponse(prettyPrint()), resource( ResourceSnippetParameters.builder().description("분기별 공고 목록 조회").tags("Recruit") From 3aff4ec79b24d2577eb1977250b7c7b8eaa2861a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=84=B8=EC=A4=80?= <74056843+sejoon00@users.noreply.github.com> Date: Mon, 12 Aug 2024 22:05:17 +0900 Subject: [PATCH 6/7] =?UTF-8?q?[fix][#40]=20CI=20open-api=20=EC=97=86?= =?UTF-8?q?=EC=9D=8C=20=EC=8B=A4=ED=8C=A8=20=EB=A1=9C=EC=A7=81=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [fix][#40] CI open-api 없음 실패 로직 수정 [fix][#40] CI open-api 없음 실패 로직 수정 [fix][#40] CI open-api 없음 실패 로직 수정 [fix][#40] CI open-api 없음 실패 로직 수정 [fix][#40] open-api git 무시 [fix][#40] ci시 openapi 무시 --- ".github/workflows/\bCI.yml" | 4 +--- .gitignore | 2 +- .../java/com/server/bbo_gak/global/common/BaseEntity.java | 2 ++ 3 files changed, 4 insertions(+), 4 deletions(-) diff --git "a/.github/workflows/\bCI.yml" "b/.github/workflows/\bCI.yml" index 48b73a3..ba8ee54 100644 --- "a/.github/workflows/\bCI.yml" +++ "b/.github/workflows/\bCI.yml" @@ -33,6 +33,4 @@ jobs: - name: build run: | chmod +x gradlew - ./gradlew build -x test - ./gradlew openapi3 - + ./gradlew build -x test -x openapi3 diff --git a/.gitignore b/.gitignore index 4ad9f7f..552e8c4 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,7 @@ build/ !**/src/test/**/build/ /src/main/generated/ -/src/main/resources/static/ +/src/main/resources/static/docs/* ### STS ### .apt_generated diff --git a/src/main/java/com/server/bbo_gak/global/common/BaseEntity.java b/src/main/java/com/server/bbo_gak/global/common/BaseEntity.java index fb7c163..7cbfabc 100644 --- a/src/main/java/com/server/bbo_gak/global/common/BaseEntity.java +++ b/src/main/java/com/server/bbo_gak/global/common/BaseEntity.java @@ -4,6 +4,7 @@ import jakarta.persistence.EntityListeners; import jakarta.persistence.MappedSuperclass; import java.time.LocalDateTime; +import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; @@ -27,6 +28,7 @@ public abstract class BaseEntity { private LocalDateTime updatedDate; @Column(name = "deleted") + @Builder.Default private boolean deleted = false; } From 1842992755a5218192613676b0a15b1185eaf26a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=84=B8=EC=A4=80?= <74056843+sejoon00@users.noreply.github.com> Date: Mon, 12 Aug 2024 23:05:40 +0900 Subject: [PATCH 7/7] =?UTF-8?q?[fix][#40]=20AT=20=EB=A7=8C=EB=A3=8C=201000?= =?UTF-8?q?0=EC=8B=9C=EA=B0=84=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application-security.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/application-security.yml b/src/main/resources/application-security.yml index c7ce091..7f0256a 100644 --- a/src/main/resources/application-security.yml +++ b/src/main/resources/application-security.yml @@ -1,6 +1,6 @@ jwt: access-token-secret: ${JWT_ACCESS_TOKEN_SECRET:} refresh-token-secret: ${JWT_REFRESH_TOKEN_SECRET:} - access-token-expiration-time: ${JWT_ACCESS_TOKEN_EXPIRATION_TIME:7200} #2시간 + access-token-expiration-time: ${JWT_ACCESS_TOKEN_EXPIRATION_TIME:36000000} #10000시간 refresh-token-expiration-time: ${JWT_REFRESH_TOKEN_EXPIRATION_TIME:604800} #7일 issuer: ${JWT_ISSUER:} \ No newline at end of file