Skip to content

Commit

Permalink
refactor: 변경된 요구사항에 맞게 API 전체 수정 (#558)
Browse files Browse the repository at this point in the history
* refactor: Member 엔티티 추가

Co-authored-by: Arachneee <[email protected]>

* refactor: MemberAction 삭제

* test: 테스트 제

* test: 지출 고정 금액 수정, 삭제, 행사 조회, 정산 조회 테스트 추가

* test: �MemberAction 제거로 인한 Bill 도메인의 테스트 변경사항 반영 to feature/#546 (#557)

* test: BillController, BillService 지출 전체 조회 테스트 작성

* test: 참여자별 지출 고정 금액 조회 테스트 추가

* test: 지출 내역 추가 테스트 작성

* test: 지출 수정 테스트 작성

* refactor: docsTest responseFields 추가 및 액션이름 제거

* refactor: docsTest responseFields 추가 및 액션이름 제거

* test: 행사 도메인 테스트 변경

* feat: 행사 정보 수정 API 구현

* test: 테스트에 필요한 의존성 주입

* test: 행사 정보 업데이트 컨트롤러 테스트

* test: 행사 정보 업데이트 서비스 테스트

* test: 이벤트 도메인에 계좌 정보 설정 테스트

* test: 행사 업데이트 API 레독 테스트

* test: 행사 전체 참여 인원 조회 컨트롤러 테스트

* test: 행사 전체 참여 인원 조회 서비스 테스트

* test: 행사 전체 참여 인원 조회 API 레독 테스트

* test: 현재 참여 인원 API 관련 메서드 이동

* test: 현재 참여 인원 컨트롤러 테스트

* refactor: '현재 참여 인원 조회' 서비스 메서드명 수정

* test: '현재 참여 인원 조회' 레독 테스트 작성

* test: '현재 참여 인원 조회' 서비스 테스트

* test: 레독 테스트 수정

* test: 레독 테스트에 필수가 아닌 필드 값에 optional 설정

* refactor: 의미가 명확한 DTO를 사용하게 수정

* test: 현재 멤버 조회 기능 서비스 테스트

* test: 은행 정보를 enum으로 분리

* test: 새로운 API 구현, 테스트 작성 - part3 (#561)

* refactor: 참여자 생성 시 예외 형식 문서에 맞게 수정

* test: 참여자 추가 기능 테스트

* docs: 멤버 추가 예외 메시지 수정

* refactor: 멤버 삭제 로직 수정

* test: 멤버 삭제 테스트

* docs: 멤버 삭제 예외 수정

* test: 행사 참여자 정보 수정 컨트롤러 테스트

* docs: 참여자 정보 수정

* refactor: 참여자 정보 수정 검증 로직 변경

* test: 참여자 정보 수정 서비스 테스트

* test: 참여자 추가 테스트 수정

* refactor: 멤버 삭제 로직 수정

* refactor: updateMembers 메서드 삭제

* test: MemberService 테스트 수정

* refactor: 토큰 불일치 시 예외 던지도록 수정

* refactor: BillDetail 삭제 쿼리 한 번만 날리도록 수정

* test: 프로덕션 동작에 맞게 테스트 코드 수정

* refactor: 테스트에서만 사용하는 메서드 삭제

* refactor: 이름 중복 확인 로직 메서드로 분리

* [BE] 새로운 API 구현, 테스트 작성 - part4 (#566)

* refactor: 불필요 메소드 클래스 제거 및 액션 삭제

* refactor: Step 생성 로직 도메인으로 위임

* style: 주석 제거

* refactor: api 수정

---------

Co-authored-by: juha <[email protected]>
Co-authored-by: Arachneee <[email protected]>
Co-authored-by: kunsanglee <[email protected]>
Co-authored-by: JUHA <[email protected]>
Co-authored-by: Arachne <[email protected]>
  • Loading branch information
6 people authored Sep 19, 2024
1 parent 8cd6fad commit ce74287
Show file tree
Hide file tree
Showing 146 changed files with 3,548 additions and 3,750 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
== 지출 액션
== 지출

=== 지출 액션 생성
=== 지출 생성

operation::createBillActions[snippets="path-parameters,http-request,request-body,request-fields,http-response,request-cookies"]
operation::createBills[snippets="path-parameters,http-request,request-body,request-fields,http-response,request-cookies"]

==== [.red]#Exceptions#

Expand All @@ -18,11 +18,11 @@ operation::createBillActions[snippets="path-parameters,http-request,request-body
"message":"지출 내역은 비어 있으면 안됩니다."
},
{
"code":"BILL_ACTION_TITLE_INVALID",
"code":"BILL_TITLE_INVALID",
"message":"앞뒤 공백을 제거한 지출 내역 제목은 %d ~ %d자여야 합니다."
},
{
"code":"BILL_ACTION_PRICE_INVALID",
"code":"BILL_PRICE_INVALID",
"message":"지출 금액은 10,000,000 이하의 자연수여야 합니다."
},
{
Expand All @@ -44,9 +44,9 @@ operation::createBillActions[snippets="path-parameters,http-request,request-body
]
----

=== 지출 액션 수정
=== 지출 수정

operation::updateBillAction[snippets="path-parameters,http-request,request-body,request-fields,http-response,request-cookies"]
operation::updateBill[snippets="path-parameters,http-request,request-body,request-fields,http-response,request-cookies"]

==== [.red]#Exceptions#

Expand All @@ -62,19 +62,19 @@ operation::updateBillAction[snippets="path-parameters,http-request,request-body,
"message":"지출 금액은 공백일 수 없습니다."
},
{
"code":"BILL_ACTION_TITLE_INVALID",
"code":"BILL_TITLE_INVALID",
"message":"앞뒤 공백을 제거한 지출 내역 제목은 %d ~ %d자여야 합니다."
},
{
"code":"BILL_ACTION_PRICE_INVALID",
"code":"BILL_PRICE_INVALID",
"message":"지출 금액은 %,d 이하의 자연수여야 합니다."
},
{
"code":"EVENT_NOT_FOUND",
"message":"존재하지 않는 행사입니다."
},
{
"code":"BILL_ACTION_NOT_FOUND",
"code":"BILL_NOT_FOUND",
"message":"존재하지 않는 지출 액션입니다."
},
{
Expand All @@ -92,9 +92,9 @@ operation::updateBillAction[snippets="path-parameters,http-request,request-body,
]
----

=== 지출 액션 삭제
=== 지출 삭제

operation::deleteBillAction[snippets="path-parameters,http-request,http-response,request-cookies"]
operation::deleteBill[snippets="path-parameters,http-request,http-response,request-cookies"]

==== [.red]#Exceptions#

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

=== 지출 상세 조회

operation::findBillActionDetailsTest[snippets="path-parameters,http-request,http-response,request-cookies"]
operation::findBillDetails[snippets="path-parameters,http-request,http-response,request-cookies"]

==== [.red]#Exceptions#

Expand All @@ -14,11 +14,11 @@ operation::findBillActionDetailsTest[snippets="path-parameters,http-request,http
"message": "존재하지 않는 행사입니다."
},
{
"code": "BILL_ACTION_NOT_FOUND",
"code": "BILL_NOT_FOUND",
"message": "존재하지 않는 지출 액션입니다."
},
{
"code": "BILL_ACTION_DETAIL_NOT_FOUND",
"code": "BILL_DETAIL_NOT_FOUND",
"message": "존재하지 않는 참여자 지출입니다."
},
{
Expand All @@ -42,7 +42,7 @@ operation::findBillActionDetailsTest[snippets="path-parameters,http-request,http

=== 지출 상세 수정

operation::updateBillActionDetailsTest[snippets="path-parameters,http-request,request-body,request-fields,http-response,request-cookies"]
operation::updateBillDetails[snippets="path-parameters,http-request,request-body,request-fields,http-response,request-cookies"]

==== [.red]#Exceptions#

Expand All @@ -62,15 +62,15 @@ operation::updateBillActionDetailsTest[snippets="path-parameters,http-request,re
"message": "존재하지 않는 행사입니다."
},
{
"code": "BILL_ACTION_NOT_FOUND",
"code": "BILL_NOT_FOUND",
"message": "존재하지 않는 지출 액션입니다."
},
{
"code": "BILL_ACTION_DETAIL_NOT_FOUND",
"code": "BILL_DETAIL_NOT_FOUND",
"message": "존재하지 않는 참여자 지출입니다."
},
{
"code": "BILL_ACTION_PRICE_NOT_MATCHED",
"code": "BILL_PRICE_NOT_MATCHED",
"message": "지출 총액이 일치하지 않습니다."
},
{
Expand Down
14 changes: 7 additions & 7 deletions server/src/docs/asciidoc/event.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ operation::getEvent[snippets="path-parameters,http-request,response-body,respons

=== 행사 전체 참여자 목록 조회

operation::findAllEventMember[snippets="path-parameters,http-request,response-body,response-fields,http-response,response-fields"]
operation::findAllMembers[snippets="path-parameters,http-request,response-body,response-fields,http-response,response-fields"]

==== [.red]#Exceptions#

Expand All @@ -82,9 +82,9 @@ operation::findAllEventMember[snippets="path-parameters,http-request,response-bo
]
----

=== 행사 전체 액션 이력 조회
=== 행사 전체 지출 이력 조회

operation::findActions[snippets="path-parameters,http-request,http-response,response-fields"]
operation::findBills[snippets="path-parameters,http-request,http-response,response-fields"]

==== [.red]#Exceptions#

Expand All @@ -98,9 +98,9 @@ operation::findActions[snippets="path-parameters,http-request,http-response,resp
]
----

=== 행사 참여자 이름 변경
=== 행사 참여자 정보 변경

operation::updateEventMemberName[snippets="path-parameters,http-request,request-body,request-fields,http-response,request-cookies"]
operation::updateMembers[snippets="path-parameters,http-request,request-body,request-fields,http-response,request-cookies"]
==== [.red]#Exceptions#

[source,json,options="nowrap"]
Expand Down Expand Up @@ -146,9 +146,9 @@ operation::updateEventMemberName[snippets="path-parameters,http-request,request-
]
----

=== 행사 참여자 삭제 (특정 참여자의 모든 참여자 액션 삭제)
=== 행사 참여자 삭제

operation::deleteAllMemberActionByName[snippets="path-parameters,http-request,http-response,request-cookies"]
operation::deleteMember[snippets="path-parameters,http-request,http-response,request-cookies"]
==== [.red]#Exceptions#

[source,json,options="nowrap"]
Expand Down
6 changes: 3 additions & 3 deletions server/src/docs/asciidoc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ endif::[]

include::{docdir}/event.adoc[]
include::{docdir}/memberBillReport.adoc[]
include::{docdir}/memberAction.adoc[]
include::{docdir}/billAction.adoc[]
include::{docdir}/billActionDetail.adoc[]
include::{docdir}/member.adoc[]
include::{docdir}/bill.adoc[]
include::{docdir}/billDetail.adoc[]
152 changes: 152 additions & 0 deletions server/src/docs/asciidoc/member.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
== 참여자

=== 행사 참여자 추가(멤버 추가)

operation::saveMembers[snippets="path-parameters,http-request,request-body,request-fields,http-response,request-cookies"]

==== [.red]#Exceptions#

[source,json,options="nowrap"]
----
[
{
"code":"REQUEST_EMPTY",
"message":"멤버 목록은 공백일 수 없습니다."
},
{
"code":"EVENT_NOT_FOUND",
"message":"존재하지 않는 행사입니다."
},
{
"code":"MEMBER_ALREADY_EXIST",
"message":"현재 참여하고 있는 인원이 존재합니다."
},
{
"code":"MEMBER_NAME_DUPLICATE",
"message":"중복된 이름이 존재합니다. 입력된 이름: [이상, 이상, 감자, 백호]"
},
{
"code":"TOKEN_NOT_FOUND",
"message":"토큰이 존재하지 않습니다."
},
{
"code":"TOKEN_EXPIRED",
"message":"만료된 토큰입니다."
},
{
"code":"TOKEN_INVALID",
"message":"유효하지 않은 토큰입니다."
},
{
"code":"FORBIDDEN",
"message":"접근할 수 없는 행사입니다."
}
]
----

=== 행사 참여 인원에서 삭제(멤버 삭제)

operation::deleteMember[snippets="path-parameters,http-request,http-response,request-cookies"]

==== [.red]#Exceptions#

[source,json,options="nowrap"]
----
[
{
"code":"EVENT_NOT_FOUND",
"message":"존재하지 않는 행사입니다."
},
{
"code":"TOKEN_NOT_FOUND",
"message":"토큰이 존재하지 않습니다."
},
{
"code":"TOKEN_EXPIRED",
"message":"만료된 토큰입니다."
},
{
"code":"TOKEN_INVALID",
"message":"유효하지 않은 토큰입니다."
},
{
"code":"FORBIDDEN",
"message":"접근할 수 없는 행사입니다."
}
]
----

=== 멤버 정보 수정

operation::updateMembers[snippets="path-parameters,http-request,request-body,request-fields,http-response,request-cookies"]

==== [.red]#Exceptions#

[source,json,options="nowrap"]
----
[
{
"code": "REQUEST_EMPTY",
"message": "멤버 ID는 공백일 수 없습니다."
},
{
"code": "REQUEST_EMPTY",
"message": "입금 여부는 공백일 수 없습니다."
},
{
"code": "REQUEST_EMPTY",
"message": "멤버 이름은 공백일 수 없습니다."
},
{
"code": "MEMBER_NAME_LENGTH_INVALID",
"message": "멤버 이름은 1자 이상 4자 이하만 입력 가능합니다."
},
{
"code":"EVENT_NOT_FOUND",
"message":"존재하지 않는 행사입니다."
},
{
"code": "MEMBER_NOT_FOUND",
"message": "존재하지 않는 참여자입니다."
},
{
"code": "MEMBER_NAME_DUPLICATE",
"message": "중복된 행사 참여 인원 이름이 존재합니다."
},
{
"code": "MEMBER_NAME_CHANGE_DUPLICATE",
"message": "중복된 참여 인원 이름 변경 요청이 존재합니다."
},
{
"code":"TOKEN_NOT_FOUND",
"message":"토큰이 존재하지 않습니다."
},
{
"code":"TOKEN_EXPIRED",
"message":"만료된 토큰입니다."
},
{
"code":"TOKEN_INVALID",
"message":"유효하지 않은 토큰입니다."
},
{
"code":"FORBIDDEN",
"message":"접근할 수 없는 행사입니다."
}
]
----

=== 현재 행사에 참여 중인 (탈주 가능한) 참여자 목록 조회

operation::getCurrentMembers[snippets="path-parameters,http-request,http-response,response-fields"]
==== [.red]#Exceptions#

[source,json,options="nowrap"]
----
[
{
"code":"EVENT_NOT_FOUND",
"message":"존재하지 않는 행사입니다."
}
]
----
Loading

0 comments on commit ce74287

Please sign in to comment.