Skip to content

Commit

Permalink
Merge pull request #121 from work-at/feature/#119
Browse files Browse the repository at this point in the history
스웨거 변경 사항 반영
  • Loading branch information
sypark9646 authored Aug 21, 2022
2 parents 1d91a29 + dab992d commit 57a0b37
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class ChatController {

@ApiOperation("채팅방을 생성하는 api")
@ApiImplicitParams(value = {
@ApiImplicitParam(name = "otherUserId", value = "1", required = true, dataType = "long", example = "1"),
@ApiImplicitParam(name = "ownerUserId", value = "1", required = true, dataType = "long", example = "1"),
})
@ApiResponses(value = {
@ApiResponse(code = 200, message = "success", response = Long.class)
Expand Down
9 changes: 6 additions & 3 deletions src/main/java/com/workat/api/map/dto/WorkerDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class WorkerDto {
@ApiModelProperty(name = "imageUrl", notes = "워케이셔너 사진 이미지 주소", example = "https://avatars.githubusercontent.com/u/46469385?v=4")
private String imageUrl;

@ApiModelProperty(name = "position", notes = "워케이셔너 직무", example = "{\"name\":\"IT_ENGINEER\",\"content\":\"IT 엔지니어 및 보안\"}")
@ApiModelProperty(name = "position", notes = "워케이셔너 직무", example = "{\"name\":\"ENGINEER\",\"content\":\"IT 엔지니어 및 보안\"}")
private DepartmentTypeDto position;

@ApiModelProperty(name = "workingYear", notes = "워케이셔너 연차", example = "{\"name\":\"JUNIOR\",\"content\":\"주니어(1~4년)\"}")
Expand All @@ -45,7 +45,8 @@ public class WorkerDto {
@ApiModelProperty(name = "activities", notes = "희망 활동")
private List<ActivityTypeDto> activities;

private WorkerDto(long id, String nickname, String imageUrl, DepartmentType position, DurationType workingYear, String company, String story, int workchats, List<ActivityTypeDto> activities) {
private WorkerDto(long id, String nickname, String imageUrl, DepartmentType position, DurationType workingYear,
String company, String story, int workchats, List<ActivityTypeDto> activities) {
this.id = id;
this.nickname = nickname;
this.imageUrl = imageUrl;
Expand All @@ -58,7 +59,9 @@ private WorkerDto(long id, String nickname, String imageUrl, DepartmentType posi
}

public static WorkerDto of(UserProfile userProfile, int workchats, List<ActivityTypeDto> activities) {
return new WorkerDto(userProfile.getId(), userProfile.getNickname(), userProfile.getImageUrl(), userProfile.getPosition(), userProfile.getWorkingYear(), userProfile.getCompany(), userProfile.getStory(), workchats, activities);
return new WorkerDto(userProfile.getId(), userProfile.getNickname(), userProfile.getImageUrl(),
userProfile.getPosition(), userProfile.getWorkingYear(), userProfile.getCompany(), userProfile.getStory(),
workchats, activities);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class SignUpRequest {
@ApiModelProperty(name = "nickname", notes = "유저 닉네임", example = "\"나는스벅라떼좋아\"")
private String nickname;

@ApiModelProperty(name = "position", notes = "직무 타입", example = "\"IT_ENGINEER\"")
@ApiModelProperty(name = "position", notes = "직무 타입")
private DepartmentType position;

@ApiModelProperty(name = "workingYear", notes = "연차 타입", example = "\"JUNIOR\"")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.workat.common.annotation.IsValidListSize;
import com.workat.domain.user.job.DepartmentType;
import com.workat.domain.user.job.DurationType;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand All @@ -21,7 +22,7 @@ public class UserUpdateRequest {
@ApiModelProperty(name = "nickname", notes = "유저 닉네임", example = "\"나는스벅라떼좋아\"")
private String nickname;

@ApiModelProperty(name = "position", notes = "직무 타입", example = "\"IT_ENGINEER\"")
@ApiModelProperty(name = "position", notes = "직무 타입")
private DepartmentType position;

@ApiModelProperty(name = "workingYear", notes = "연차 타입", example = "\"JUNIOR\"")
Expand All @@ -34,7 +35,8 @@ public class UserUpdateRequest {
@IsValidListSize(max = 3, message = "1개 이상 3개 이하의 리스트가 인풋으로 들어와야합니다")
private List<String> activities;

private UserUpdateRequest(String nickname, DepartmentType position, DurationType workingYear, String story, List<String> activities) {
private UserUpdateRequest(String nickname, DepartmentType position, DurationType workingYear, String story,
List<String> activities) {
this.nickname = nickname;
this.position = position;
this.workingYear = workingYear;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.workat.domain.user.entity.UserProfile;
import com.workat.domain.user.job.DepartmentType;
import com.workat.domain.user.job.DurationType;

import io.swagger.annotations.ApiModelProperty;
import lombok.AccessLevel;
import lombok.Getter;
Expand All @@ -26,7 +27,7 @@ public class MyProfileResponse {
@ApiModelProperty(name = "imageUrl", notes = "워케이셔너 사진 이미지 주소", example = "https://avatars.githubusercontent.com/u/46469385?v=4")
private String imageUrl;

@ApiModelProperty(name = "position", notes = "워케이셔너 직무", example = "{\"name\":\"IT_ENGINEER\",\"content\":\"IT 엔지니어 및 보안\"}")
@ApiModelProperty(name = "position", notes = "워케이셔너 직무", example = "{\"name\":\"ENGINEER\",\"content\":\"IT 엔지니어 및 보안\"}")
private DepartmentTypeDto position;

@ApiModelProperty(name = "workingYear", notes = "워케이셔너 연차", example = "{\"name\":\"JUNIOR\",\"content\":\"주니어(1~4년)\"}")
Expand All @@ -49,7 +50,9 @@ public class MyProfileResponse {

// TODO: 내 소식 - 새 댓글 알람 수 추가 필요

private MyProfileResponse(long id, String nickname, String imageUrl, DepartmentType position, DurationType workingYear, String company, String story, boolean certified, int workchats, List<ActivityTypeDto> activities) {
private MyProfileResponse(long id, String nickname, String imageUrl, DepartmentType position,
DurationType workingYear, String company, String story, boolean certified, int workchats,
List<ActivityTypeDto> activities) {
this.id = id;
this.nickname = nickname;
this.imageUrl = imageUrl;
Expand All @@ -63,7 +66,9 @@ private MyProfileResponse(long id, String nickname, String imageUrl, DepartmentT
}

public static MyProfileResponse of(UserProfile userProfile, int workchats, List<ActivityTypeDto> activities) {
return new MyProfileResponse(userProfile.getId(), userProfile.getNickname(), userProfile.getImageUrl(), userProfile.getPosition(), userProfile.getWorkingYear(), userProfile.getCompany(), userProfile.getStory(), userProfile.isCertified(), workchats, activities);
return new MyProfileResponse(userProfile.getId(), userProfile.getNickname(), userProfile.getImageUrl(),
userProfile.getPosition(), userProfile.getWorkingYear(), userProfile.getCompany(), userProfile.getStory(),
userProfile.isCertified(), workchats, activities);
}

}

0 comments on commit 57a0b37

Please sign in to comment.