Skip to content

Commit

Permalink
[BE] 학교 정보 API에 Swagger Annotation을 추가 (#597) (#598)
Browse files Browse the repository at this point in the history
feat: SchoolController에 Swagger 정보 추가

Co-authored-by: hyunseo <>
  • Loading branch information
carsago authored Nov 16, 2023
1 parent 5bf0d29 commit 797fdf8
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import com.festago.school.application.SchoolService;
import com.festago.school.dto.SchoolResponse;
import com.festago.school.dto.SchoolsResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
Expand All @@ -12,18 +14,21 @@

@RestController
@RequestMapping("/schools")
@Tag(name = "학교 정보 요청")
@RequiredArgsConstructor
public class SchoolController {

private final SchoolService schoolService;

@GetMapping
@Operation(description = "모든 학교 정보를 조회한다.", summary = "전체 학교 조회")
public ResponseEntity<SchoolsResponse> findAll() {
return ResponseEntity.ok()
.body(schoolService.findAll());
}

@GetMapping("/{schoolId}")
@Operation(description = "단일 학교 정보를 조회한다.", summary = "단일 학교 조회")
public ResponseEntity<SchoolResponse> findById(@PathVariable Long schoolId) {
return ResponseEntity.ok()
.body(schoolService.findById(schoolId));
Expand Down

0 comments on commit 797fdf8

Please sign in to comment.