Skip to content

Commit

Permalink
[FIX] 테스트코드 누락 해결: 식별자 분리
Browse files Browse the repository at this point in the history
  • Loading branch information
thguss committed Jan 11, 2024
1 parent b5a2743 commit 68bd1e9
Show file tree
Hide file tree
Showing 4 changed files with 240 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public ResponseEntity<Response> achieveMemberDailyRoutine(Principal principal, @
}

@GetMapping
public ResponseEntity<Response> getMemberDailyRoutine(Principal principal) {
public ResponseEntity<Response> getMemberDailyRoutines(Principal principal) {
val memberId = Long.parseLong(principal.getName());
val response = memberDailyRoutineService.getMemberDailyRoutines(memberId);
return ResponseEntity.ok(success(SUCCESS_GET_ROUTINE.getMessage(), response));
Expand Down
247 changes: 231 additions & 16 deletions src/main/resources/static/docs/open-api-3.0.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"examples" : {
"post-token-docs" : {
"value" : "{\r\n \"socialType\" : \"KAKAO\"\r\n}"
"value" : "{\n \"socialType\" : \"KAKAO\"\n}"
}
}
}
Expand All @@ -50,7 +50,7 @@
},
"examples" : {
"post-token-docs" : {
"value" : "{\r\n \"success\" : true,\r\n \"message\" : \"소셜로그인 성공\",\r\n \"data\" : {\r\n \"accessToken\" : \"softie\",\r\n \"refreshToken\" : \"token\"\r\n }\r\n}"
"value" : "{\n \"success\" : true,\n \"message\" : \"소셜로그인 성공\",\n \"data\" : {\n \"accessToken\" : \"softie\",\n \"refreshToken\" : \"token\"\n }\n}"
}
}
}
Expand Down Expand Up @@ -84,6 +84,40 @@
}
}
},
"/api/v1/routines/daily" : {
"get" : {
"tags" : [ "DAILY ROUTINE" ],
"summary" : "테마 리스트 별 데일리 루틴 리스트 조회",
"description" : "테마 리스트 별 데일리 루틴 리스트 조회",
"operationId" : "get-themes-daily-routines-docs",
"parameters" : [ {
"name" : "themes",
"in" : "query",
"description" : "조회할 테마 id 정보",
"required" : true,
"schema" : {
"type" : "string"
}
} ],
"responses" : {
"200" : {
"description" : "200",
"content" : {
"application/json;charset=UTF-8" : {
"schema" : {
"$ref" : "#/components/schemas/api-v1-routines-daily-54531209"
},
"examples" : {
"get-themes-daily-routines-docs" : {
"value" : "{\n \"success\" : true,\n \"message\" : \"루틴 조회 성공\",\n \"data\" : {\n \"routines\" : [ {\n \"routineId\" : 0,\n \"content\" : \"content0\"\n }, {\n \"routineId\" : 1,\n \"content\" : \"content1\"\n }, {\n \"routineId\" : 2,\n \"content\" : \"content2\"\n }, {\n \"routineId\" : 3,\n \"content\" : \"content3\"\n }, {\n \"routineId\" : 4,\n \"content\" : \"content4\"\n } ]\n }\n}"
}
}
}
}
}
}
}
},
"/api/v1/dolls/image/{type}" : {
"get" : {
"tags" : [ "DOLL" ],
Expand All @@ -109,7 +143,7 @@
},
"examples" : {
"get-doll-image-docs" : {
"value" : "{\r\n \"success\" : true,\r\n \"message\" : \"인형 이미지 조회 성공\",\r\n \"data\" : {\r\n \"faceImageUrl\" : \"face-image-url\"\r\n }\r\n}"
"value" : "{\n \"success\" : true,\n \"message\" : \"인형 이미지 조회 성공\",\n \"data\" : {\n \"faceImageUrl\" : \"face-image-url\"\n }\n}"
}
}
}
Expand All @@ -119,20 +153,43 @@
}
},
"/api/v1/routines/daily/member" : {
"get" : {
"tags" : [ "MEMBER DAILY ROUTINE" ],
"summary" : "회원 별 데일리 루틴 리스트 조회",
"description" : "회원 별 데일리 루틴 리스트 조회",
"operationId" : "get-member-daily-routines-docs",
"responses" : {
"200" : {
"description" : "200",
"content" : {
"application/json;charset=UTF-8" : {
"schema" : {
"$ref" : "#/components/schemas/api-v1-routines-daily-member-336344243"
},
"examples" : {
"get-member-daily-routines-docs" : {
"value" : "{\n \"success\" : true,\n \"message\" : \"루틴 조회 성공\",\n \"data\" : {\n \"routines\" : [ {\n \"routineId\" : 1,\n \"content\" : \"content-test\",\n \"iconImageUrl\" : \"image-url\",\n \"achieveCount\" : 1,\n \"isAchieve\" : false\n }, {\n \"routineId\" : 2,\n \"content\" : \"content-test\",\n \"iconImageUrl\" : \"image-url\",\n \"achieveCount\" : 2,\n \"isAchieve\" : true\n }, {\n \"routineId\" : 3,\n \"content\" : \"content-test\",\n \"iconImageUrl\" : \"image-url\",\n \"achieveCount\" : 3,\n \"isAchieve\" : false\n }, {\n \"routineId\" : 4,\n \"content\" : \"content-test\",\n \"iconImageUrl\" : \"image-url\",\n \"achieveCount\" : 4,\n \"isAchieve\" : true\n }, {\n \"routineId\" : 5,\n \"content\" : \"content-test\",\n \"iconImageUrl\" : \"image-url\",\n \"achieveCount\" : 5,\n \"isAchieve\" : false\n } ]\n }\n}"
}
}
}
}
}
}
},
"post" : {
"tags" : [ "MEMBER DAILY ROUTINE" ],
"summary" : "회원 데일리 루틴 추가 성공",
"description" : "회원 데일리 루틴 추가 성공",
"operationId" : "post-routine-docs",
"operationId" : "post-member-daily-routine-docs",
"requestBody" : {
"content" : {
"application/json;charset=UTF-8" : {
"schema" : {
"$ref" : "#/components/schemas/api-v1-routines-daily-member1721287602"
},
"examples" : {
"post-routine-docs" : {
"value" : "{\r\n \"routineId\" : 1\r\n}"
"post-member-daily-routine-docs" : {
"value" : "{\n \"routineId\" : 1\n}"
}
}
}
Expand All @@ -155,8 +212,8 @@
"$ref" : "#/components/schemas/api-v1-routines-daily-member1327124516"
},
"examples" : {
"post-routine-docs" : {
"value" : "{\r\n \"success\" : true,\r\n \"message\" : \"루틴 추가 성공\",\r\n \"data\" : {\r\n \"routineId\" : 1\r\n }\r\n}"
"post-member-daily-routine-docs" : {
"value" : "{\n \"success\" : true,\n \"message\" : \"루틴 추가 성공\",\n \"data\" : {\n \"routineId\" : 1\n }\n}"
}
}
}
Expand All @@ -170,7 +227,7 @@
"tags" : [ "DAILY ROUTINE" ],
"summary" : "데일리 루틴 테마 리스트 조회",
"description" : "데일리 루틴 테마 리스트 조회",
"operationId" : "get-themes-docs",
"operationId" : "get-daily-themes-docs",
"responses" : {
"200" : {
"description" : "200",
Expand All @@ -180,8 +237,8 @@
"$ref" : "#/components/schemas/api-v1-routines-daily-themes1975236624"
},
"examples" : {
"get-themes-docs" : {
"value" : "{\r\n \"success\" : true,\r\n \"message\" : \"테마 조회 성공\",\r\n \"data\" : {\r\n \"themes\" : [ {\r\n \"themeId\" : 0,\r\n \"name\" : \"Daily routine Theme0\",\r\n \"iconImageUrl\" : \"icon_image_url0\",\r\n \"backgroundImageUrl\" : \"background_image_url0\"\r\n }, {\r\n \"themeId\" : 1,\r\n \"name\" : \"Daily routine Theme1\",\r\n \"iconImageUrl\" : \"icon_image_url1\",\r\n \"backgroundImageUrl\" : \"background_image_url1\"\r\n }, {\r\n \"themeId\" : 2,\r\n \"name\" : \"Daily routine Theme2\",\r\n \"iconImageUrl\" : \"icon_image_url2\",\r\n \"backgroundImageUrl\" : \"background_image_url2\"\r\n }, {\r\n \"themeId\" : 3,\r\n \"name\" : \"Daily routine Theme3\",\r\n \"iconImageUrl\" : \"icon_image_url3\",\r\n \"backgroundImageUrl\" : \"background_image_url3\"\r\n }, {\r\n \"themeId\" : 4,\r\n \"name\" : \"Daily routine Theme4\",\r\n \"iconImageUrl\" : \"icon_image_url4\",\r\n \"backgroundImageUrl\" : \"background_image_url4\"\r\n } ]\r\n }\r\n}"
"get-daily-themes-docs" : {
"value" : "{\n \"success\" : true,\n \"message\" : \"테마 조회 성공\",\n \"data\" : {\n \"themes\" : [ {\n \"themeId\" : 0,\n \"name\" : \"Daily routine Theme0\",\n \"iconImageUrl\" : \"icon_image_url0\",\n \"backgroundImageUrl\" : \"background_image_url0\"\n }, {\n \"themeId\" : 1,\n \"name\" : \"Daily routine Theme1\",\n \"iconImageUrl\" : \"icon_image_url1\",\n \"backgroundImageUrl\" : \"background_image_url1\"\n }, {\n \"themeId\" : 2,\n \"name\" : \"Daily routine Theme2\",\n \"iconImageUrl\" : \"icon_image_url2\",\n \"backgroundImageUrl\" : \"background_image_url2\"\n }, {\n \"themeId\" : 3,\n \"name\" : \"Daily routine Theme3\",\n \"iconImageUrl\" : \"icon_image_url3\",\n \"backgroundImageUrl\" : \"background_image_url3\"\n }, {\n \"themeId\" : 4,\n \"name\" : \"Daily routine Theme4\",\n \"iconImageUrl\" : \"icon_image_url4\",\n \"backgroundImageUrl\" : \"background_image_url4\"\n } ]\n }\n}"
}
}
}
Expand All @@ -195,7 +252,7 @@
"tags" : [ "DAILY ROUTINE" ],
"summary" : "테마 별 데일리 루틴 리스트 조회",
"description" : "테마 별 데일리 루틴 리스트 조회",
"operationId" : "get-routines-docs",
"operationId" : "get-theme-daily-routines-docs",
"parameters" : [ {
"name" : "themeId",
"in" : "path",
Expand All @@ -211,11 +268,77 @@
"content" : {
"application/json;charset=UTF-8" : {
"schema" : {
"$ref" : "#/components/schemas/api-v1-routines-daily-themeId-54531209"
"$ref" : "#/components/schemas/api-v1-routines-daily-54531209"
},
"examples" : {
"get-theme-daily-routines-docs" : {
"value" : "{\n \"success\" : true,\n \"message\" : \"루틴 조회 성공\",\n \"data\" : {\n \"routines\" : [ {\n \"routineId\" : 0,\n \"content\" : \"content0\"\n }, {\n \"routineId\" : 1,\n \"content\" : \"content1\"\n }, {\n \"routineId\" : 2,\n \"content\" : \"content2\"\n }, {\n \"routineId\" : 3,\n \"content\" : \"content3\"\n }, {\n \"routineId\" : 4,\n \"content\" : \"content4\"\n } ]\n }\n}"
}
}
}
}
}
}
}
},
"/api/v1/routines/daily/member/routine/{routineId}" : {
"delete" : {
"tags" : [ "MEMBER DAILY ROUTINE" ],
"summary" : "회원 데일리 루틴 삭제 성공",
"description" : "회원 데일리 루틴 삭제 성공",
"operationId" : "delete-member-daily-routine-docs",
"parameters" : [ {
"name" : "routineId",
"in" : "path",
"description" : "루틴 id",
"required" : true,
"schema" : {
"type" : "string"
}
} ],
"responses" : {
"200" : {
"description" : "200",
"content" : {
"application/json;charset=UTF-8" : {
"schema" : {
"$ref" : "#/components/schemas/api-v1-routines-daily-member-routine-routineId594740350"
},
"examples" : {
"delete-member-daily-routine-docs" : {
"value" : "{\n \"success\" : true,\n \"message\" : \"루틴 삭제 성공\",\n \"data\" : null\n}"
}
}
}
}
}
}
},
"patch" : {
"tags" : [ "MEMBER DAILY ROUTINE" ],
"summary" : "회원 데일리 루틴 달성 성공",
"description" : "회원 데일리 루틴 달성 성공",
"operationId" : "achieve-member-daily-routine-docs",
"parameters" : [ {
"name" : "routineId",
"in" : "path",
"description" : "루틴 id",
"required" : true,
"schema" : {
"type" : "string"
}
} ],
"responses" : {
"200" : {
"description" : "200",
"content" : {
"application/json;charset=UTF-8" : {
"schema" : {
"$ref" : "#/components/schemas/api-v1-routines-daily-member-routine-routineId-2021368021"
},
"examples" : {
"get-routines-docs" : {
"value" : "{\r\n \"success\" : true,\r\n \"message\" : \"루틴 조회 성공\",\r\n \"data\" : {\r\n \"routines\" : [ {\r\n \"routineId\" : 0,\r\n \"content\" : \"content0\"\r\n }, {\r\n \"routineId\" : 1,\r\n \"content\" : \"content1\"\r\n }, {\r\n \"routineId\" : 2,\r\n \"content\" : \"content2\"\r\n }, {\r\n \"routineId\" : 3,\r\n \"content\" : \"content3\"\r\n }, {\r\n \"routineId\" : 4,\r\n \"content\" : \"content4\"\r\n } ]\r\n }\r\n}"
"achieve-member-daily-routine-docs" : {
"value" : "{\n \"success\" : true,\n \"message\" : \"루틴 달성 성공\",\n \"data\" : {\n \"routineId\" : 1,\n \"isAchieve\" : true,\n \"achieveCount\" : 1\n }\n}"
}
}
}
Expand Down Expand Up @@ -254,7 +377,7 @@
}
}
},
"api-v1-routines-daily-themeId-54531209" : {
"api-v1-routines-daily-54531209" : {
"type" : "object",
"properties" : {
"data" : {
Expand Down Expand Up @@ -343,6 +466,19 @@
}
}
},
"api-v1-routines-daily-member-routine-routineId594740350" : {
"type" : "object",
"properties" : {
"success" : {
"type" : "boolean",
"description" : "응답 성공 여부"
},
"message" : {
"type" : "string",
"description" : "응답 메시지"
}
}
},
"api-v1-dolls-image-type-1785135499" : {
"type" : "object",
"properties" : {
Expand Down Expand Up @@ -389,6 +525,54 @@
}
}
},
"api-v1-routines-daily-member-336344243" : {
"type" : "object",
"properties" : {
"data" : {
"type" : "object",
"properties" : {
"routines" : {
"type" : "array",
"description" : "루틴 정보 리스트",
"items" : {
"type" : "object",
"properties" : {
"achieveCount" : {
"type" : "number",
"description" : "달성 횟수"
},
"iconImageUrl" : {
"type" : "string",
"description" : "아이콘 이미지 url"
},
"routineId" : {
"type" : "number",
"description" : "루틴 id"
},
"content" : {
"type" : "string",
"description" : "테마 내용"
},
"isAchieve" : {
"type" : "boolean",
"description" : "달성 여부"
}
}
}
}
},
"description" : "응답 데이터"
},
"success" : {
"type" : "boolean",
"description" : "응답 성공 여부"
},
"message" : {
"type" : "string",
"description" : "응답 메시지"
}
}
},
"api-v1-auth-1040425838" : {
"type" : "object",
"properties" : {
Expand All @@ -400,6 +584,37 @@
},
"api-v1-test486549215" : {
"type" : "object"
},
"api-v1-routines-daily-member-routine-routineId-2021368021" : {
"type" : "object",
"properties" : {
"data" : {
"type" : "object",
"properties" : {
"achieveCount" : {
"type" : "number",
"description" : "달성 횟수"
},
"routineId" : {
"type" : "number",
"description" : "루틴 id"
},
"isAchieve" : {
"type" : "boolean",
"description" : "달성 여부"
}
},
"description" : "응답 데이터"
},
"success" : {
"type" : "boolean",
"description" : "응답 성공 여부"
},
"message" : {
"type" : "string",
"description" : "응답 메시지"
}
}
}
}
}
Expand Down
Loading

0 comments on commit 68bd1e9

Please sign in to comment.