Skip to content

Commit

Permalink
Merge pull request #113 from ghdcksgml1/chore(#111)-swagger-config-ex…
Browse files Browse the repository at this point in the history
…ample-data

chore(#111): Response List 타입의 예시 데이터 안되는 문제 해결
  • Loading branch information
ghdcksgml1 authored Nov 15, 2023
2 parents 320ddea + 14ede55 commit 186ec0a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.heachi.housework.api.service.auth.AuthExternalService;
import com.heachi.housework.api.service.group.member.GroupMemberService;
import com.heachi.redis.define.housework.todo.TodoList;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
Expand All @@ -22,7 +23,7 @@ public class GroupMemberController {
private final AuthExternalService authExternalService;
private final GroupMemberService groupMemberService;

@ApiResponse(responseCode = "200", description = "Group Member 리스트 조회 성공", content = @Content(schema = @Schema(implementation = GroupMemberResponse.class, type = "array")))
@ApiResponse(responseCode = "200", description = "Group Member 리스트 조회 성공", content = @Content(array = @ArraySchema(schema = @Schema(implementation = GroupMemberResponse.class))))
@GetMapping("/{groupId}")
public JsonResult<?> groupMemberList(@RequestHeader(name = "Authorization") String authorization,
@PathVariable(name = "groupId") Long groupId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.heachi.housework.api.controller.group.member.response.GroupMemberResponse;
import com.heachi.housework.api.service.housework.category.HouseworkCategoryService;
import com.heachi.housework.api.service.housework.category.response.HouseworkCategoryResponse;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
Expand All @@ -21,7 +22,7 @@ public class HouseworkCategoryController {

private final HouseworkCategoryService houseworkCategoryService;

@ApiResponse(responseCode = "200", description = "카테고리 리스트 조회 성공", content = @Content(schema = @Schema(implementation = HouseworkCategoryResponse.class, type = "array")))
@ApiResponse(responseCode = "200", description = "Group Member 리스트 조회 성공", content = @Content(array = @ArraySchema(schema = @Schema(implementation = HouseworkCategoryResponse.class))))
@GetMapping("/")
public JsonResult<?> selectCategory() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@
import com.heachi.housework.api.service.housework.todo.request.VerifyTodoServiceRequest;
import com.heachi.redis.define.housework.todo.TodoList;
import com.heachi.s3.api.service.AwsS3Service;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
Expand All @@ -32,7 +35,7 @@ public class TodoController {
private final AwsS3Service awsS3Service;

// Todo List 가져오기
@ApiResponse(responseCode = "200", description = "Todo List 조회 성공", content = @Content(schema = @Schema(implementation = TodoList.class)))
@ApiResponse(responseCode = "200", description = "성공적으로 Todo List를 조회함", content = @Content(schema = @Schema(implementation = TodoList.class)))
@GetMapping("/{groupId}")
public JsonResult<?> selectTodo(@RequestHeader(name = "Authorization") String authorization,
@PathVariable(name = "groupId") Long groupId,
Expand Down

0 comments on commit 186ec0a

Please sign in to comment.