Skip to content

Commit

Permalink
adding input length constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
LuciaM1 committed Sep 30, 2024
1 parent f946b4b commit 500aacf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ public class ResourceCreationDto {
@DefaultValue("")
@Schema(description = "Description of the path parameter: example/path",
pattern = "(^$)|(^(?!/)[a-zA-Z0-9/]+(?<!/)$)", maxLength = 255)
@Length(max = 150)
private String path;

@FormParam("description")
@Schema(format = "byte", maxLength = 255)
@Length(max = 255)
private String description;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import org.hibernate.validator.constraints.Length;

import java.util.List;

Expand All @@ -19,8 +20,8 @@ public class ResourceMultipleCreationDtoJSON {
private List<String> filenameList;
@NonNull
private NoDeployableResourceType resourceType;

@Length(max = 150)
private String path;

@Length(max = 255)
private String description;
}

0 comments on commit 500aacf

Please sign in to comment.