[#2746] Add required annotations to MgmtRolloutRestRequestBodyPost (#2818)

+ amountGroups made optional with default value 1 group

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2025-11-18 14:25:32 +02:00
committed by GitHub
parent fb69372ed5
commit 80165de06a
4 changed files with 10 additions and 9 deletions

View File

@@ -25,8 +25,8 @@ import lombok.experimental.Accessors;
@ToString(callSuper = true)
public abstract class MgmtNamedEntity extends MgmtBaseEntity {
@JsonProperty(required = true)
@Schema(example = "Name of entity")
@JsonProperty(required = true)
private String name;
@Schema(example = "Description of entity")

View File

@@ -14,6 +14,7 @@ import java.util.List;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -64,12 +65,14 @@ import org.eclipse.hawkbit.mgmt.json.model.rolloutgroup.MgmtRolloutGroup;
public class MgmtRolloutRestRequestBodyPost extends AbstractMgmtRolloutConditionsEntity {
@Schema(description = "Target filter query language expression", example = "id==targets-*")
@JsonProperty(required = true)
private String targetFilterQuery;
@Schema(description = "The ID of distribution set of this rollout", example = "6")
@JsonProperty(required = true)
private long distributionSetId;
@Schema(description = "The amount of groups the rollout should split targets into", example = "5")
@Schema(description = "The amount of groups the rollout should split targets into", example = "5", defaultValue = "1")
private Integer amountGroups;
@Schema(description = "Force time in milliseconds", example = "1691065781929")