From baaa003d9a24102e5beb6a0d421adcc9491e2f24 Mon Sep 17 00:00:00 2001 From: sohot8653 Date: Thu, 21 Aug 2025 15:45:00 +0900 Subject: [PATCH] =?UTF-8?q?[README.md=20=EC=97=85=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=8A=B8]=20ApiResponseDto=20=EB=B0=8F=20ApiResponseCode?= =?UTF-8?q?=EC=9D=98=20=EB=A9=94=EC=8B=9C=EC=A7=80=EB=A5=BC=20=ED=95=9C?= =?UTF-8?q?=EA=B5=AD=EC=96=B4=EB=A1=9C=20=EB=B2=88=EC=97=AD=ED=95=98?= =?UTF-8?q?=EA=B3=A0,=20=EC=A4=91=EB=B3=B5=20=EC=82=AC=EC=9A=A9=EC=9E=90?= =?UTF-8?q?=20ID=20=EC=98=A4=EB=A5=98=20=EC=BD=94=EB=93=9C=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=EB=A1=9C=20=EC=9D=91=EB=8B=B5=20=EB=A9=94=EC=8B=9C?= =?UTF-8?q?=EC=A7=80=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 274482c..fec54ea 100644 --- a/README.md +++ b/README.md @@ -79,8 +79,7 @@ public class ApiResponseDto { { "code": 409, "message": "USER_ID_DUPLICATE", - "description": "User ID already exists", - "data": null + "description": "User ID already exists" } ``` @@ -107,17 +106,24 @@ public ResponseEntity> createMember(@Req // ApiResponseCode.java public enum ApiResponseCode { // 공용 성공 코드 - COMMON_SUCCESS_CREATED(HttpStatus.CREATED.value(), "Created successfully"), - COMMON_SUCCESS_UPDATED(HttpStatus.OK.value(), "Updated successfully"), - COMMON_SUCCESS_DELETED(HttpStatus.OK.value(), "Deleted successfully"), - COMMON_SUCCESS_RETRIEVED(HttpStatus.OK.value(), "Retrieved successfully"), + COMMON_SUCCESS(HttpStatus.OK.value(), "요청 성공"), + COMMON_SUCCESS_CREATED(HttpStatus.CREATED.value(), "성공적으로 생성되었습니다"), + COMMON_SUCCESS_UPDATED(HttpStatus.OK.value(), "성공적으로 수정되었습니다"), + COMMON_SUCCESS_DELETED(HttpStatus.OK.value(), "성공적으로 삭제되었습니다"), + COMMON_SUCCESS_RETRIEVED(HttpStatus.OK.value(), "성공적으로 조회되었습니다"), // 공용 오류 코드 - COMMON_BAD_REQUEST(HttpStatus.BAD_REQUEST.value(), "Required request body is missing or Error"), - COMMON_UNAUTHORIZED(HttpStatus.UNAUTHORIZED.value(), "Unauthorized"), - COMMON_FORBIDDEN(HttpStatus.FORBIDDEN.value(), "Access is denied"), - COMMON_NOT_FOUND(HttpStatus.NOT_FOUND.value(), "Resource is not found"), - COMMON_INTERNAL_SERVER_ERROR(HttpStatus.INTERNAL_SERVER_ERROR.value(), "An error occurred on the server") + COMMON_BAD_REQUEST(HttpStatus.BAD_REQUEST.value(), "필수 요청 본문이 누락되었거나 오류가 발생했습니다"), + COMMON_UNAUTHORIZED(HttpStatus.UNAUTHORIZED.value(), "인증에 실패했습니다"), + COMMON_FORBIDDEN(HttpStatus.FORBIDDEN.value(), "접근이 거부되었습니다"), + COMMON_NOT_FOUND(HttpStatus.NOT_FOUND.value(), "리소스를 찾을 수 없습니다"), + COMMON_CONFLICT(HttpStatus.CONFLICT.value(), "충돌이 발생했습니다"), + COMMON_INTERNAL_SERVER_ERROR(HttpStatus.INTERNAL_SERVER_ERROR.value(), "서버에서 오류가 발생했습니다"), + + // 사용자 관련 코드 + USER_ID_DUPLICATE(HttpStatus.CONFLICT.value(), "이미 존재하는 사용자 ID입니다"), + USER_NOT_FOUND(HttpStatus.UNAUTHORIZED.value(), "사용자를 찾을 수 없습니다. 인증에 실패했습니다"), + USER_PASSWORD_INVALID(HttpStatus.UNAUTHORIZED.value(), "비밀번호가 올바르지 않습니다") } ```