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

feat: 시간표 POST, PUT 예시 #373

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

kwoo28
Copy link
Contributor

@kwoo28 kwoo28 commented Mar 30, 2024

▶ Request

Content

Timetables API의 POST, PUT 입력 JSON예시를 추가하였습니다.

✅ Check List

  • 의도치 않은 변경이 일어나지 않았는지.
    • 실수로 라이브러리(pom.xml) 변경이 일어나지 않았는지
    • 병합시 컴파일 & 런타임 에러가 발생하지 않는지
    • 기존 클라이언트와의 호환성 고려가 잘 이루어졌는지
  • 작성한 코드가 프로젝트에 반영됨을 명심하였는지
    • 타인도 알아보고 변경할 수 있는 코드를 작성하였는지
    • 코드 & 커밋 컨벤션을 준수하였는지
    • (필요한) 문서화가 진행되었는지
  • (기능 추가의 경우) 클라이언트의 입장에 대한 충분한 고려가 이루어졌는지
    • 클라이언트 측과 협의가 된 내용인 경우
    • 클라이언트의 요구사항을 잘 반영하는지
    • API 문서에 논리적인 오류 & 가시성이 떨어지는 내용이 없는지

📸 API Document ScreenShot

image

🧪 Test

Copy link

@seongjae6751 seongjae6751 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다!

@kwoo28 kwoo28 changed the base branch from production to develop March 30, 2024 08:36
Copy link
Contributor

@daheeParkk daheeParkk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다!

Comment on lines 52 to 79
@ApiOperation(value = "", authorizations = {@Authorization(value="Authorization")})
@RequestMapping(value = "/timetables", method = RequestMethod.POST)
public @ResponseBody
ResponseEntity createTimeTables(@ApiParam(value = "json value (예시: {\"timetable\":[...], \"semester\":\"20191\"}" +
" Timetable REQUIRED class_time, class_title, grades", required = true) @RequestBody String timetable_log) throws Exception {
ResponseEntity createTimeTables(@ApiParam(value = "json value (예시:\n" +
"{\n" +
" \"timetable\": [\n" +
" {\n" +
" \"code\": \"CPC490\",\n" +
" \"class_title\": null,\n" +
" \"class_time\": [\n" +
" 210,\n" +
" 211\n" +
" ],\n" +
" \"class_place\": null,\n" +
" \"professor\": null,\n" +
" \"grades\": null,\n" +
" \"lecture_class\": \"01\",\n" +
" \"target\": \"디자 1 건축\",\n" +
" \"regular_number\": \"25\",\n" +
" \"design_score\": \"0\",\n" +
" \"department\": \"디자인ㆍ건축공학부\",\n" +
" \"memo\": null\n" +
" }\n" +
" ],\n" +
" \"semester\": \"20192\"\n" +
"}", required = true) @RequestBody String timetable_log) throws Exception {
return new ResponseEntity<Map<String, Object>>(timeTableService.createTimeTables(timetable_log), HttpStatus.CREATED);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C

코드 보기가 너무 안 좋은데 timetable_log를 DTO로 바꿔서 그 안에 넣는건 어려울까요?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

알겠습니다...!

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A

예시에 대한 클라이언트 요청 잘 받아주신 거 같네요!!

Copy link

@duehee duehee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다~!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants