Skip to content

Commit

Permalink
docs: request dto 문서화
Browse files Browse the repository at this point in the history
  • Loading branch information
Sangwook02 committed Feb 11, 2024
1 parent db6d3f9 commit 3f89046
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
package com.gdschongik.gdsc.domain.member.dto.request;

import static com.gdschongik.gdsc.global.common.constant.RegexConstant.*;

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

public record MemberQueryRequest(
String studentId,
String name,
String phone,
String department,
String email,
String discordUsername,
String discordNickname) {}
@Schema(description = "학번", pattern = STUDENT_ID) String studentId,
@Schema(description = "이름") String name,
@Schema(description = "전화번호", pattern = PHONE) String phone,
@Schema(description = "학과") String department,
@Schema(description = "이메일") String email,
@Schema(description = "discord username") String discordUsername,
@Schema(description = "커뮤니티 닉네임", pattern = NICKNAME) String discordNickname) {}
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,25 @@

import static com.gdschongik.gdsc.global.common.constant.RegexConstant.*;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;

public record MemberUpdateRequest(
@NotBlank @Pattern(regexp = STUDENT_ID, message = "학번은 " + STUDENT_ID + " 형식이어야 합니다.") String studentId,
@NotBlank String name,
@NotBlank @Pattern(regexp = PHONE, message = "전화번호는 " + PHONE + " 형식이어야 합니다.") String phone,
@NotBlank String department,
@NotBlank @Email String email,
@NotBlank String discordUsername,
@NotBlank @Pattern(regexp = NICKNAME, message = "닉네임은 " + NICKNAME + " 형식이어야 합니다.") String nickname) {}
@NotBlank
@Pattern(regexp = STUDENT_ID, message = "학번은 " + STUDENT_ID + " 형식이어야 합니다.")
@Schema(description = "학번", pattern = STUDENT_ID)
String studentId,
@NotBlank @Schema(description = "이름") String name,
@NotBlank
@Pattern(regexp = PHONE, message = "전화번호는 " + PHONE + " 형식이어야 합니다.")
@Schema(description = "전화번호", pattern = PHONE)
String phone,
@NotBlank @Schema(description = "학과") String department,
@NotBlank @Email @Schema(description = "이메일") String email,
@NotBlank @Schema(description = "discord username") String discordUsername,
@NotBlank
@Pattern(regexp = NICKNAME, message = "닉네임은 " + NICKNAME + " 형식이어야 합니다.")
@Schema(description = "커뮤니티 닉네임", pattern = NICKNAME)
String nickname) {}

0 comments on commit 3f89046

Please sign in to comment.