Notices removed from project
This commit is contained in:
parent
33d15c1a51
commit
f481ca00d2
2 changed files with 14 additions and 15 deletions
|
|
@ -3,9 +3,7 @@ package br.com.rayankonecny.hdcommoslib.models.requests;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import br.com.rayankonecny.hdcommoslib.models.enums.ProfileEnum;
|
import br.com.rayankonecny.hdcommoslib.models.enums.ProfileEnum;
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
|
||||||
import jakarta.validation.constraints.Email;
|
import jakarta.validation.constraints.Email;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
|
||||||
import jakarta.validation.constraints.Size;
|
import jakarta.validation.constraints.Size;
|
||||||
import lombok.With;
|
import lombok.With;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
@ -13,19 +11,19 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
@With
|
@With
|
||||||
@Schema(description = "Request to update user")
|
@Schema(description = "Request to update user")
|
||||||
public record UpdateUserRequest(
|
public record UpdateUserRequest(
|
||||||
@Schema(description = "Name of the user", example = "John Doe", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "Name of the user", example = "John Doe", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@Size(min = 3, max = 50, message = "Name must contain between 3 and 50 characters")
|
@Size(min = 3, max = 50, message = "Name must contain between 3 and 50 characters")
|
||||||
String name,
|
String name,
|
||||||
|
|
||||||
@Schema(description = "Email of the user", example = "rayanvix@gmail.com")
|
@Schema(description = "Email of the user", example = "rayanvix@gmail.com")
|
||||||
@Email(message = "Invalid email format")
|
@Email(message = "Invalid email format")
|
||||||
@Size(min = 6, max = 50, message = "Email must contain between 6 and 50 characters")
|
@Size(min = 6, max = 50, message = "Email must contain between 6 and 50 characters")
|
||||||
String email,
|
String email,
|
||||||
|
|
||||||
@Schema(description = "Password of the user", example = "P@ssw0rd!", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "Password of the user", example = "P@ssw0rd!", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@Size(min = 6, max = 20, message = "Password must contain between 6 and 20 characters")
|
@Size(min = 6, max = 20, message = "Password must contain between 6 and 20 characters")
|
||||||
String password,
|
String password,
|
||||||
|
|
||||||
@Schema(description = "Profiles assigned to the user", example = "[\" ROLE_ADMIN \", \"ROLE_CUSTOMER \" ]", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "Profiles assigned to the user", example = "[\" ROLE_ADMIN \", \"ROLE_CUSTOMER \" ]", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
Set<ProfileEnum> profiles) {
|
Set<ProfileEnum> profiles) {
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package br.com.rayankonecny.userserviceapi.mapper;
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.Mapping;
|
import org.mapstruct.Mapping;
|
||||||
import org.mapstruct.MappingTarget;
|
import org.mapstruct.MappingTarget;
|
||||||
|
import org.mapstruct.ReportingPolicy;
|
||||||
|
|
||||||
import br.com.rayankonecny.userserviceapi.entity.User;
|
import br.com.rayankonecny.userserviceapi.entity.User;
|
||||||
import br.com.rayankonecny.hdcommoslib.models.requests.CreateUserRequest;
|
import br.com.rayankonecny.hdcommoslib.models.requests.CreateUserRequest;
|
||||||
|
|
@ -12,7 +13,7 @@ import br.com.rayankonecny.hdcommoslib.models.responses.UserResponse;
|
||||||
import static org.mapstruct.NullValuePropertyMappingStrategy.IGNORE;
|
import static org.mapstruct.NullValuePropertyMappingStrategy.IGNORE;
|
||||||
import static org.mapstruct.NullValueCheckStrategy.ALWAYS;
|
import static org.mapstruct.NullValueCheckStrategy.ALWAYS;
|
||||||
|
|
||||||
@Mapper(componentModel = "spring", nullValuePropertyMappingStrategy = IGNORE, nullValueCheckStrategy = ALWAYS)
|
@Mapper(componentModel = "spring", nullValuePropertyMappingStrategy = IGNORE, nullValueCheckStrategy = ALWAYS, unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||||
public interface UserMapper {
|
public interface UserMapper {
|
||||||
|
|
||||||
UserResponse fromEntity(final User entity);
|
UserResponse fromEntity(final User entity);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue