Skip to content

Commit

Permalink
[DOCS] 대학교 목록 조회 API 스웨거 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekks committed Feb 22, 2024
1 parent 3660db2 commit 3c5c28e
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package synk.meeteam.domain.common.university.api;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
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 org.springframework.http.ResponseEntity;
import synk.meeteam.domain.common.university.dto.response.GetUniversityListDto;

@Tag(name = "university", description = "대학교 관련 API")
public interface UniversityApi {

@ApiResponses(
value = {
@ApiResponse(responseCode = "200", description = "대학교 목록 조회에 성공했습니다."),
@ApiResponse(responseCode = "500", description = "서버 에러입니다.", content = @Content)
}
)
@Operation(summary = "대학교 목록 조회", description = "대학교 목록이 조회된다.")
ResponseEntity<GetUniversityListDto> getUniversities();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package synk.meeteam.domain.common.university.api;

import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import synk.meeteam.domain.common.university.dto.response.GetUniversityListDto;

@RestController
@RequiredArgsConstructor
@RequestMapping("/university")
public class UniversityController implements UniversityApi {

@Override
@GetMapping
public ResponseEntity<GetUniversityListDto> getUniversities() {
return null;
}
}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package synk.meeteam.domain.common.university.dto.response;

import io.swagger.v3.oas.annotations.media.Schema;

public record GetUniversityDto(
@Schema(description = "대학교 id", example = "1")
Long universityId,
@Schema(description = "대학교 이름", example = "광운대학교")
String universityName,
@Schema(description = "대학교 이메일 도메인", example = "kw.ac.kr")
String universityRegex
) {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package synk.meeteam.domain.common.university.dto.response;

import io.swagger.v3.oas.annotations.media.Schema;
import java.util.List;

@Schema(name = "GetUniversityListDto", description = "대학교 목록 조회 응답 Dto")
public record GetUniversityListDto(
@Schema(description = "대학교 목록", example = "")
List<GetUniversityDto> universityList
) {
}

0 comments on commit 3c5c28e

Please sign in to comment.