Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: ignore null response #132

Merged
merged 2 commits into from
Mar 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.BDDMockito.given;
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document;
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.get;
Expand Down Expand Up @@ -187,12 +186,7 @@ void savePreChecklistItems() throws Exception {
fieldWithPath("id").description("등록된 체크리스트 아이템 아이디").type(
JsonFieldType.NUMBER),
fieldWithPath("title").description("등록된 체크리스트 아이템 제목").type(
JsonFieldType.STRING),
fieldWithPath("checkDate").ignored(),
fieldWithPath("startTime").ignored(),
fieldWithPath("endTime").ignored(),
fieldWithPath("place").ignored(),
fieldWithPath("memo").ignored()
JsonFieldType.STRING)
)
));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ void refresh() throws Exception {
requestHeaders(headerWithName(HttpHeaders.AUTHORIZATION).description("재발급할 액세스 토큰")),
responseFields(
fieldWithPath("status").description("응답 상태 코드"),
fieldWithPath("message").description("응답 메시지"),
fieldWithPath("data").description("응답 데이터"),
fieldWithPath("data.accessToken").description("재발급한 액세스 토큰")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ void modifyName() throws Exception {
),
responseFields(
fieldWithPath("status").description("응답 상태 코드"),
fieldWithPath("message").description("응답 메시지"),
fieldWithPath("data").description("응답 데이터").ignored()
fieldWithPath("message").description("응답 메시지")
)
));
}
Expand All @@ -112,7 +111,6 @@ void getGender() throws Exception {
),
responseFields(
fieldWithPath("status").description("응답 상태 코드"),
fieldWithPath("message").description("응답 메시지"),
fieldWithPath("data.gender").description("성별 정보")
)
));
Expand Down Expand Up @@ -146,8 +144,7 @@ void postGender() throws Exception {
),
responseFields(
fieldWithPath("status").description("응답 상태 코드"),
fieldWithPath("message").description("응답 메시지"),
fieldWithPath("data").description("응답 데이터")
fieldWithPath("message").description("응답 메시지")
)
));
}
Expand All @@ -173,7 +170,6 @@ void getProfileImage() throws Exception {
),
responseFields(
fieldWithPath("status").description("응답 상태 코드"),
fieldWithPath("message").description("응답 메시지"),
fieldWithPath("data.url").description("프로필 이미지 URL")
)
));
Expand Down Expand Up @@ -209,7 +205,6 @@ void postProfile() throws Exception {
),
responseFields(
fieldWithPath("status").description("응답 상태 코드"),
fieldWithPath("message").description("응답 메시지"),
fieldWithPath("data.url").description("사용자 프로필 이미지 URL")
)
));
Expand All @@ -235,8 +230,7 @@ void deleteMember() throws Exception {
),
responseFields(
fieldWithPath("status").description("응답 상태 코드"),
fieldWithPath("message").description("응답 메시지"),
fieldWithPath("data").description("응답 데이터")
fieldWithPath("message").description("응답 메시지")
)
));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ void registerWedding() throws Exception {
fieldWithPath("weddingDay").description("결혼일"),
fieldWithPath("preparing").description("결혼 준비중 여부")),
responseFields(fieldWithPath("status").description("응답 상태 코드"),
fieldWithPath("message").description("응답 메시지"),
fieldWithPath("data").description("데이터").ignored())
fieldWithPath("message").description("응답 메시지")
)
));
}

Expand Down Expand Up @@ -124,8 +124,8 @@ void modifyWeddingDay() throws Exception {
fieldWithPath("weddingDay").description("결혼일"),
fieldWithPath("preparing").description("결혼 준비중 여부")),
responseFields(fieldWithPath("status").description("응답 상태 코드"),
fieldWithPath("message").description("응답 메시지"),
fieldWithPath("data").description("데이터").ignored())
fieldWithPath("message").description("응답 메시지")
)
));
}

Expand Down Expand Up @@ -167,7 +167,8 @@ void modifyBudget() throws Exception {
requestHeaders(headerWithName(HttpHeaders.AUTHORIZATION).description("액세스 토큰")),
requestFields(fieldWithPath("budget").description("결혼 예산")),
responseFields(fieldWithPath("status").description("응답 상태 코드"),
fieldWithPath("message").description("응답 메시지"),
fieldWithPath("data").description("데이터").ignored())));
fieldWithPath("message").description("응답 메시지")
)
));
}
}
2 changes: 2 additions & 0 deletions src/test/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
spring:
jackson:
default-property-inclusion: non_null
flyway:
enabled: false