Skip to content

Commit

Permalink
Merge pull request #131 from Bamdoliro/fix/#130
Browse files Browse the repository at this point in the history
[버그] 원서 전체 조회 API 문서 수정
  • Loading branch information
cabbage16 authored Sep 8, 2024
2 parents ee2ea32 + 0bcb0a1 commit 90201c8
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/docs/asciidoc/enum.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ include::{snippets}/enum-controller-test/enums/custom-response-fields-formStatus
[[form-type]]
include::{snippets}/enum-controller-test/enums/custom-response-fields-formType.adoc[]

[[form-category]]
include::{snippets}/enum-controller-test/enums/custom-response-fields-formCategory.adoc[]

[[gender]]
include::{snippets}/enum-controller-test/enums/custom-response-fields-gender.adoc[]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,7 @@ class FormControllerTest extends RestDocsTestSupport {
.description("<<form-status,원서 상태 (null인 경우 전체 조회)>>")
.optional(),
parameterWithName("type")
.description("<<form-type,원서 유형 (null인 경우 전체 조회)>>")
.description("<<form-category,원서 카테고리 (null인 경우 전체 조회)>>")
.optional(),
parameterWithName("sort")
.description("정렬 기준 (total-score-asc인 경우 최종 점수 오름차순, total-score-desc인 경우 최종 점수 내림차순, form-id인 경우 접수 번호순, null인 경우 수험번호 오름차순 조회)")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ void enums() throws Exception {
attributes(key("title").value("FormType")),
enumConvertFieldDescriptor((enumDocs.getFormType()))
),
customResponseFields("custom-response",
beneathPath("formCategory").withSubsectionId("formCategory"),
attributes(key("title").value("FormCategory")),
enumConvertFieldDescriptor((enumDocs.getFormCategory()))
),
customResponseFields("custom-response",
beneathPath("gender").withSubsectionId("gender"),
attributes(key("title").value("Gender")),
Expand Down Expand Up @@ -111,7 +116,7 @@ private static FieldDescriptor[] enumConvertFieldDescriptor(Map<String, String>
private EnumDocs getData(MvcResult result) throws IOException {
return objectMapper
.readValue(result.getResponse().getContentAsByteArray(),
new TypeReference<EnumDocs>() {
new TypeReference<>() {
}
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class EnumDocs {
Map<String, String> certificate;
Map<String, String> formStatus;
Map<String, String> formType;
Map<String, String> formCategory;
Map<String, String> gender;
Map<String, String> graduationType;
Map<String, String> fairStatus;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public EnumDocs findEnums() {
.certificate(getDocs(Certificate.values()))
.formStatus(getDocs(FormStatus.values()))
.formType(getDocs(FormType.values()))
.formCategory(getDocs(FormType.Category.values()))
.gender(getDocs(Gender.values()))
.graduationType(getDocs(GraduationType.values()))
.fairStatus(getDocs(FairStatus.values()))
Expand Down

0 comments on commit 90201c8

Please sign in to comment.