-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from mju-facilty-organization/dev
[Feat] 스웨거의 요청값 예시를 위한 @Schema, @parameter 처리
- Loading branch information
Showing
7 changed files
with
49 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 9 additions & 7 deletions
16
...in/java/com/example/rentalSystem/domain/professor/controller/ProfessorControllerDocs.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
package com.example.rentalSystem.domain.professor.controller; | ||
|
||
import com.example.rentalSystem.domain.professor.controller.dto.response.ProfessorDetailResponse; | ||
import com.example.rentalSystem.global.response.ApiResponse; | ||
import com.example.rentalSystem.global.response.type.SuccessType; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.Parameter; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import org.springframework.data.domain.Page; | ||
import org.springframework.data.domain.Pageable; | ||
import org.springframework.data.web.PageableDefault; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
|
||
@Tag(name = "교수 관련 API", description = "교수 전체 조회 API") | ||
public interface ProfessorControllerDocs { | ||
|
||
@Operation(summary = "교수 전체 조회 API") | ||
ApiResponse<?> getAllProfessor(Pageable pageable, String campus, String college, | ||
String major); | ||
ApiResponse<?> getAllProfessor( | ||
@Parameter(example = "{\n" | ||
+ " \"page\": 0,\n" | ||
+ " \"size\": 10\n" | ||
+ "}") Pageable pageable, | ||
@Parameter(example = "서울") String campus, | ||
@Parameter(example = "ICT융합대학") String college, | ||
@Parameter(example = "응용소프트웨어전공") String major); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 7 additions & 1 deletion
8
.../com/example/rentalSystem/domain/student/controller/dto/request/StudentSignInRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
package com.example.rentalSystem.domain.student.controller.dto.request; | ||
|
||
|
||
public record StudentSignInRequest(String email, String password) { | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
|
||
public record StudentSignInRequest( | ||
@Schema(example = "[email protected]") | ||
String email, | ||
@Schema(example = "test1234") | ||
String password) { | ||
|
||
} |
7 changes: 7 additions & 0 deletions
7
.../com/example/rentalSystem/domain/student/controller/dto/request/StudentSignUpRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,20 @@ | ||
package com.example.rentalSystem.domain.student.controller.dto.request; | ||
|
||
import com.example.rentalSystem.domain.student.entity.Student; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
|
||
public record StudentSignUpRequest( | ||
@Schema(example = "아무개") | ||
String name, | ||
@Schema(example = "60200000") | ||
String studentNumber, | ||
@Schema(example = "test1234") | ||
String password, | ||
@Schema(example = "[email protected]") | ||
String email, | ||
@Schema(example = "응용소프트웨어전공") | ||
String major, | ||
@Schema(example = "010-0000-0000") | ||
String phoneNumber) { | ||
|
||
public Student toEntity(String encodePassword) { | ||
|