Add example values for request/response examples in swagger (#1441)
* Swagger support initial concept Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * Add descriptions for Target tags Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * Add target filter queries descriptions Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * Add target api descriptions Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * Add software modules API descriptions Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * Add descriptions for DS, DSTags and SMTypes Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * Add DistributionSetType API descriptions Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * Add Rollout API descriptions Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * Bring back test scope to mariaDb Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * Add tags and descriptions to System config API Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * Move away OpenAPI config from Start.java Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * provide license header and project version for openapi Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * Fix error responses with example error body Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * Add DDI API to swagger and make proper API grouping Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * Revert changes from not merging before commit Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * Remove more changes Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * fix circle ci build Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * Add missing descriptions for downloadArtifact methods in DDI Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * Make configuration for openApi conditional for flexibility in transitive dependencies Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * Make beans conditional not config Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * Remove oAuth and switch to more general description Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * remove comment Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> * Add example schema values for request responses examples Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io> --------- Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io>
This commit is contained in:
committed by
GitHub
parent
5eb84cba4e
commit
60f14691fc
@@ -15,6 +15,7 @@ import javax.validation.constraints.NotNull;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -39,6 +40,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class DdiActionFeedback {
|
||||
|
||||
@Schema(example = "2023-08-03T12:31:41.890992967Z")
|
||||
private final String time;
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -11,6 +11,7 @@ package org.eclipse.hawkbit.ddi.json.model;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.eclipse.hawkbit.ddi.rest.api.DdiRootControllerRestApi;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -32,6 +33,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
public class DdiActionHistory {
|
||||
|
||||
@JsonProperty("status")
|
||||
@Schema(example = "RUNNING")
|
||||
private final String actionStatus;
|
||||
|
||||
@JsonProperty("messages")
|
||||
|
||||
@@ -12,14 +12,17 @@ package org.eclipse.hawkbit.ddi.json.model;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class DdiActivateAutoConfirmation {
|
||||
|
||||
@JsonProperty(required = false)
|
||||
@Schema(example = "exampleUser")
|
||||
private final String initiator;
|
||||
|
||||
@JsonProperty(required = false)
|
||||
@Schema(example = "exampleRemark")
|
||||
private final String remark;
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,6 +11,7 @@ package org.eclipse.hawkbit.ddi.json.model;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.springframework.hateoas.RepresentationModel;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
@@ -25,12 +26,14 @@ public class DdiArtifact extends RepresentationModel<DdiArtifact> {
|
||||
|
||||
@NotNull
|
||||
@JsonProperty
|
||||
@Schema(example = "binary.tgz")
|
||||
private String filename;
|
||||
|
||||
@JsonProperty
|
||||
private DdiArtifactHash hashes;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "3")
|
||||
private Long size;
|
||||
|
||||
public DdiArtifactHash getHashes() {
|
||||
|
||||
@@ -13,6 +13,7 @@ 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;
|
||||
|
||||
/**
|
||||
* Hashes for given Artifact.
|
||||
@@ -21,13 +22,16 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class DdiArtifactHash {
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "2d86c2a659e364e9abba49ea6ffcd53dd5559f05")
|
||||
private String sha1;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "0d1b08c34858921bc7c662b228acb7ba")
|
||||
private String md5;
|
||||
|
||||
@JsonProperty
|
||||
@JsonInclude(Include.NON_NULL)
|
||||
@Schema(example = "a03b221c6c6eae7122ca51695d456d5222e524889136394944b2f9763b483615")
|
||||
private String sha256;
|
||||
|
||||
/**
|
||||
|
||||
@@ -14,6 +14,7 @@ import javax.validation.constraints.NotNull;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.springframework.hateoas.RepresentationModel;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@@ -22,10 +23,14 @@ import org.springframework.hateoas.RepresentationModel;
|
||||
public class DdiAutoConfirmationState extends RepresentationModel<DdiAutoConfirmationState> {
|
||||
|
||||
@NotNull
|
||||
@Schema(example = "true")
|
||||
private boolean active;
|
||||
@Schema(example = "exampleUserId")
|
||||
private String initiator;
|
||||
@Schema(example = "exampleRemark")
|
||||
private String remark;
|
||||
|
||||
@Schema(example = "1691065895439")
|
||||
private Long activatedAt;
|
||||
|
||||
/**
|
||||
|
||||
@@ -14,6 +14,7 @@ import javax.validation.constraints.NotNull;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* Cancel action to be provided to the target.
|
||||
@@ -21,6 +22,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class DdiCancel {
|
||||
|
||||
@Schema(example = "11")
|
||||
private final String id;
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -14,6 +14,7 @@ import javax.validation.constraints.NotNull;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* The action that has to be stopped by the target.
|
||||
@@ -22,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class DdiCancelActionToStop {
|
||||
|
||||
@NotNull
|
||||
@Schema(example = "11")
|
||||
private final String stopId;
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,6 +17,7 @@ import javax.validation.constraints.NotNull;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* Deployment chunks.
|
||||
@@ -26,14 +27,17 @@ public class DdiChunk {
|
||||
|
||||
@JsonProperty("part")
|
||||
@NotNull
|
||||
@Schema(example = "bApp")
|
||||
private String part;
|
||||
|
||||
@JsonProperty("version")
|
||||
@NotNull
|
||||
@Schema(example = "1.2.0")
|
||||
private String version;
|
||||
|
||||
@JsonProperty("name")
|
||||
@NotNull
|
||||
@Schema(example = "oneApp")
|
||||
private String name;
|
||||
|
||||
@JsonProperty("encrypted")
|
||||
|
||||
@@ -7,8 +7,9 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.eclipse.hawkbit.ddi.json.model;
|
||||
package org.eclipse.hawkbit.ddi.json.model;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
@@ -16,6 +17,7 @@ import javax.validation.constraints.NotEmpty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* Feedback channel for ConfigData action.
|
||||
@@ -26,6 +28,7 @@ public class DdiConfigData {
|
||||
@NotEmpty
|
||||
private final Map<String, String> data;
|
||||
|
||||
@Schema(example = "merge")
|
||||
private final DdiUpdateMode mode;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.springframework.hateoas.RepresentationModel;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
@@ -27,6 +28,7 @@ public class DdiConfirmationBaseAction extends RepresentationModel<DdiConfirmati
|
||||
|
||||
@JsonProperty("id")
|
||||
@NotNull
|
||||
@Schema(example = "6")
|
||||
private String id;
|
||||
|
||||
@JsonProperty("confirmation")
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotNull;
|
||||
@@ -32,6 +33,7 @@ public class DdiConfirmationFeedback {
|
||||
@Valid
|
||||
private final Confirmation confirmation;
|
||||
|
||||
@Schema(example = "200")
|
||||
private final Integer code;
|
||||
|
||||
private final List<String> details;
|
||||
|
||||
@@ -11,6 +11,7 @@ package org.eclipse.hawkbit.ddi.json.model;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.springframework.hateoas.RepresentationModel;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
@@ -27,6 +28,7 @@ public class DdiDeploymentBase extends RepresentationModel<DdiDeploymentBase> {
|
||||
|
||||
@JsonProperty("id")
|
||||
@NotNull
|
||||
@Schema(example = "8")
|
||||
private String id;
|
||||
|
||||
@JsonProperty("deployment")
|
||||
|
||||
@@ -14,6 +14,7 @@ import javax.validation.constraints.NotNull;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* Additional metadata to be provided for the target/device.
|
||||
@@ -23,10 +24,12 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class DdiMetadata {
|
||||
@JsonProperty
|
||||
@NotNull
|
||||
@Schema(example = "aMetadataKey")
|
||||
private final String key;
|
||||
|
||||
@JsonProperty
|
||||
@NotNull
|
||||
@Schema(example = "Metadata value as defined in software module")
|
||||
private final String value;
|
||||
|
||||
@JsonCreator
|
||||
|
||||
@@ -13,6 +13,10 @@ 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 com.fasterxml.jackson.annotation.JsonPropertyDescription;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.v3.oas.annotations.media.ExampleObject;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* Polling interval for the SP target.
|
||||
@@ -22,6 +26,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class DdiPolling {
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "12:00:00")
|
||||
private String sleep;
|
||||
|
||||
/**
|
||||
|
||||
@@ -14,6 +14,7 @@ import javax.validation.constraints.NotNull;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* Action fulfillment progress by means of gives the achieved amount of maximal
|
||||
@@ -23,8 +24,10 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class DdiProgress {
|
||||
|
||||
@NotNull
|
||||
@Schema(example = "2")
|
||||
private final Integer cnt;
|
||||
|
||||
@Schema(example = "5")
|
||||
private final Integer of;
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* Result information of the action progress which can by an intermediate or
|
||||
|
||||
@@ -19,6 +19,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* Details status information concerning the action processing.
|
||||
@@ -34,6 +35,7 @@ public class DdiStatus {
|
||||
@Valid
|
||||
private final DdiResult result;
|
||||
|
||||
@Schema(example = "200")
|
||||
private final Integer code;
|
||||
|
||||
private final List<String> details;
|
||||
|
||||
@@ -449,8 +449,9 @@ public interface DdiRootControllerRestApi {
|
||||
""")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = """
|
||||
|
||||
""", content = @Content(schema = @Schema(oneOf = {}))), //TODO: 2 RESPONSES WHEN AUTO CONFIRMATION IS ACTIVE OR NOT
|
||||
The response body in case auto-confirmation is active is richer - it contains additional information
|
||||
such as initiator, remark and when the auto-confirmation had been activated.
|
||||
"""),
|
||||
@ApiResponse(responseCode = "400", description = "Bad Request - e.g. invalid parameters", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionInfo.class))),
|
||||
@ApiResponse(responseCode = "401", description = "The request requires user authentication.", content = @Content(mediaType = "application/json", schema = @Schema(hidden = true))),
|
||||
@ApiResponse(responseCode = "403", description = "Insufficient permissions, entity is not allowed to be changed (i.e. read-only) or data volume restriction applies.", content = @Content(mediaType = "application/json", schema = @Schema(hidden = true))),
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.mgmt.json.model;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.springframework.hateoas.Link;
|
||||
import org.springframework.hateoas.RepresentationModel;
|
||||
|
||||
@@ -22,15 +23,19 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public abstract class MgmtBaseEntity extends RepresentationModel<MgmtBaseEntity> {
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "bumlux")
|
||||
private String createdBy;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "1691065905897")
|
||||
private Long createdAt;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "bumlux")
|
||||
private String lastModifiedBy;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "1691065906407")
|
||||
private Long lastModifiedAt;
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,6 +11,7 @@ package org.eclipse.hawkbit.mgmt.json.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* A generic abstract rest model which contains only a ID for use-case e.g.
|
||||
@@ -20,6 +21,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
*/
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class MgmtId {
|
||||
@Schema(example = "108")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@ 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;
|
||||
|
||||
/**
|
||||
* Request body for maintenance window PUT/POST commands, based on a schedule
|
||||
@@ -24,12 +25,15 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class MgmtMaintenanceWindowRequestBody {
|
||||
@JsonProperty
|
||||
@Schema(example = "10 12 14 3 8 ? 2023")
|
||||
private String schedule;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "00:10:00")
|
||||
private String duration;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "+00:00")
|
||||
private String timezone;
|
||||
|
||||
public String getSchedule() {
|
||||
|
||||
@@ -13,6 +13,7 @@ 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;
|
||||
|
||||
/**
|
||||
* The representation of an meta data in the REST API for POST/Create.
|
||||
@@ -23,8 +24,10 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtMetadata {
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "someKnownKey")
|
||||
private String key;
|
||||
@JsonProperty
|
||||
@Schema(example = "someKnownKeyValue")
|
||||
private String value;
|
||||
|
||||
public String getKey() {
|
||||
|
||||
@@ -13,6 +13,7 @@ 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;
|
||||
|
||||
/**
|
||||
* The representation of an meta data in the REST API for PUT/Update.
|
||||
@@ -23,6 +24,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtMetadataBodyPut {
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "someValue")
|
||||
private String value;
|
||||
|
||||
public String getValue() {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
package org.eclipse.hawkbit.mgmt.json.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* A json annotated rest model for NamedEntity to RESTful API representation.
|
||||
@@ -18,9 +19,11 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public abstract class MgmtNamedEntity extends MgmtBaseEntity {
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "Name of entity")
|
||||
private String name;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "Description of entity")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,9 @@ 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 static org.checkerframework.checker.units.qual.Prefix.exa;
|
||||
|
||||
/**
|
||||
* A json annotated rest model for PollStatus to RESTful API representation.
|
||||
@@ -26,12 +29,15 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtPollStatus {
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "1691065941102")
|
||||
private Long lastRequestAt;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "1691109141102")
|
||||
private Long nextExpectedRequestAt;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "false")
|
||||
private boolean overdue;
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.mgmt.json.model.action;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtBaseEntity;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtMaintenanceWindow;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
|
||||
@@ -47,36 +48,46 @@ public class MgmtAction extends MgmtBaseEntity {
|
||||
public static final String ACTION_PENDING = "pending";
|
||||
|
||||
@JsonProperty("id")
|
||||
@Schema(example = "7")
|
||||
private Long actionId;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "update")
|
||||
private String type;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "finished")
|
||||
private String status;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "finished")
|
||||
private String detailStatus;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "1691065903238")
|
||||
private Long forceTime;
|
||||
|
||||
@JsonProperty(value = "forceType")
|
||||
private MgmtActionType actionType;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "600")
|
||||
private Integer weight;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(hidden = true)
|
||||
private MgmtMaintenanceWindow maintenanceWindow;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "1")
|
||||
private Long rollout;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "rollout")
|
||||
private String rolloutName;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "200")
|
||||
private Integer lastStatusCode;
|
||||
|
||||
public MgmtMaintenanceWindow getMaintenanceWindow() {
|
||||
|
||||
@@ -15,6 +15,7 @@ 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;
|
||||
|
||||
/**
|
||||
* A json annotated rest model for ActionStatus to RESTful API representation.
|
||||
@@ -25,18 +26,22 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtActionStatus {
|
||||
|
||||
@JsonProperty("id")
|
||||
@Schema(example = "21")
|
||||
private Long statusId;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "running")
|
||||
private String type;
|
||||
|
||||
@JsonProperty
|
||||
private List<String> messages;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "1691065929524")
|
||||
private Long reportedAt;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "200")
|
||||
private Integer code;
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.mgmt.json.model.artifact;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtBaseEntity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
@@ -25,15 +26,18 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtArtifact extends MgmtBaseEntity {
|
||||
|
||||
@JsonProperty("id")
|
||||
@Schema(example = "3")
|
||||
private Long artifactId;
|
||||
|
||||
@JsonProperty
|
||||
private MgmtArtifactHash hashes;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "file1")
|
||||
private String providedFilename;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "3")
|
||||
private Long size;
|
||||
|
||||
public MgmtArtifact() {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
package org.eclipse.hawkbit.mgmt.json.model.artifact;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* Hashes for given Artifact.
|
||||
@@ -19,12 +20,15 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtArtifactHash {
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "2d86c2a659e364e9abba49ea6ffcd53dd5559f05")
|
||||
private String sha1;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "0d1b08c34858921bc7c662b228acb7ba")
|
||||
private String md5;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "a03b221c6c6eae7122ca51695d456d5222e524889136394944b2f9763b483615")
|
||||
private String sha256;
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,6 +12,7 @@ package org.eclipse.hawkbit.mgmt.json.model.distributionset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModule;
|
||||
|
||||
@@ -30,30 +31,38 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtDistributionSet extends MgmtNamedEntity {
|
||||
|
||||
@JsonProperty(value = "id", required = true)
|
||||
@Schema(example = "51")
|
||||
private Long dsId;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "1.4.2")
|
||||
private String version;
|
||||
|
||||
@JsonProperty
|
||||
private List<MgmtSoftwareModule> modules = new ArrayList<>();
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "false")
|
||||
private boolean requiredMigrationStep;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "test_default_ds_type")
|
||||
private String type;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "OS (FW) mandatory, runtime (FW) and app (SW) optional")
|
||||
private String typeName;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "true")
|
||||
private Boolean complete;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "false")
|
||||
private boolean deleted;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "true")
|
||||
private boolean valid;
|
||||
|
||||
public boolean isValid() {
|
||||
|
||||
@@ -11,6 +11,7 @@ package org.eclipse.hawkbit.mgmt.json.model.distributionset;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.softwaremodule.MgmtSoftwareModuleAssigment;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
@@ -29,12 +30,15 @@ public class MgmtDistributionSetRequestBodyPost extends MgmtDistributionSetReque
|
||||
// deprecated format from the time where os, application and runtime where
|
||||
// statically defined
|
||||
@JsonProperty
|
||||
@Schema(hidden = true)
|
||||
private MgmtSoftwareModuleAssigment os;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(hidden = true)
|
||||
private MgmtSoftwareModuleAssigment runtime;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(hidden = true)
|
||||
private MgmtSoftwareModuleAssigment application;
|
||||
// deprecated format - END
|
||||
|
||||
@@ -42,6 +46,7 @@ public class MgmtDistributionSetRequestBodyPost extends MgmtDistributionSetReque
|
||||
private List<MgmtSoftwareModuleAssigment> modules;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "test_default_ds_type")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@ 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;
|
||||
|
||||
/**
|
||||
* A json annotated rest model for DistributionSet for PUT/POST.
|
||||
@@ -23,15 +24,19 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtDistributionSetRequestBodyPut {
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "dsOne")
|
||||
private String name;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "Description of the distribution set.")
|
||||
private String description;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "1.0.0")
|
||||
private String version;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "false")
|
||||
private Boolean requiredMigrationStep;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@ package org.eclipse.hawkbit.mgmt.json.model.distributionset;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -12,6 +12,7 @@ package org.eclipse.hawkbit.mgmt.json.model.distributionset;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* A json annotated rest model for invalidate DistributionSet requests.
|
||||
@@ -23,6 +24,7 @@ public class MgmtInvalidateDistributionSetRequestBody {
|
||||
@JsonProperty
|
||||
private MgmtCancelationType actionCancelationType;
|
||||
@JsonProperty
|
||||
@Schema(example = "true")
|
||||
private boolean cancelRollouts;
|
||||
|
||||
public MgmtCancelationType getActionCancelationType() {
|
||||
|
||||
@@ -12,6 +12,7 @@ package org.eclipse.hawkbit.mgmt.json.model.distributionset;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.springframework.hateoas.RepresentationModel;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.mgmt.json.model.distributionsettype;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
@@ -29,15 +30,19 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtDistributionSetType extends MgmtNamedEntity {
|
||||
|
||||
@JsonProperty(value = "id", required = true)
|
||||
@Schema(example = "99")
|
||||
private Long moduleId;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "os_app")
|
||||
private String key;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "false")
|
||||
private boolean deleted;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "black")
|
||||
private String colour;
|
||||
|
||||
public boolean isDeleted() {
|
||||
|
||||
@@ -11,6 +11,7 @@ package org.eclipse.hawkbit.mgmt.json.model.distributionsettype;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype.MgmtSoftwareModuleTypeAssigment;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
@@ -22,9 +23,11 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtDistributionSetTypeRequestBodyPost extends MgmtDistributionSetTypeRequestBodyPut {
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "Example type name")
|
||||
private String name;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "Example key")
|
||||
private String key;
|
||||
|
||||
@JsonProperty
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
package org.eclipse.hawkbit.mgmt.json.model.distributionsettype;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* Request Body for DistributionSetType PUT, i.e. update.
|
||||
@@ -18,9 +19,11 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtDistributionSetTypeRequestBodyPut {
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "Example description")
|
||||
private String description;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "rgb(86,37,99)")
|
||||
private String colour;
|
||||
|
||||
public String getDescription() {
|
||||
|
||||
@@ -12,6 +12,7 @@ package org.eclipse.hawkbit.mgmt.json.model.rollout;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -21,6 +22,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
public class MgmtRolloutCondition {
|
||||
|
||||
private Condition condition = Condition.THRESHOLD;
|
||||
@Schema(example = "50")
|
||||
private String expression = "100";
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,6 +12,7 @@ package org.eclipse.hawkbit.mgmt.json.model.rollout;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* An action that runs when the error condition is met
|
||||
@@ -21,6 +22,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
public class MgmtRolloutErrorAction {
|
||||
|
||||
private ErrorAction action = ErrorAction.PAUSE;
|
||||
@Schema(example = "80")
|
||||
private String expression;
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,6 +12,7 @@ package org.eclipse.hawkbit.mgmt.json.model.rollout;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
|
||||
|
||||
@@ -27,43 +28,55 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class MgmtRolloutResponseBody extends MgmtNamedEntity {
|
||||
|
||||
@Schema(example = "controllerId==exampleTarget*")
|
||||
private String targetFilterQuery;
|
||||
@Schema(example = "2")
|
||||
private Long distributionSetId;
|
||||
|
||||
@JsonProperty(value = "id", required = true)
|
||||
@Schema(example = "2")
|
||||
private Long rolloutId;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "ready")
|
||||
private String status;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "20")
|
||||
private Long totalTargets;
|
||||
|
||||
@JsonProperty
|
||||
private Map<String, Long> totalTargetsPerStatus;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "5")
|
||||
private Integer totalGroups;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "1691065753136")
|
||||
private Long startAt;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "1691065762496")
|
||||
private Long forcetime;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "false")
|
||||
private boolean deleted;
|
||||
|
||||
@JsonProperty
|
||||
private MgmtActionType type;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "400")
|
||||
private Integer weight;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "Approved remark.")
|
||||
private String approvalRemark;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "exampleUsername")
|
||||
private String approveDecidedBy;
|
||||
|
||||
public boolean isDeleted() {
|
||||
|
||||
@@ -12,6 +12,7 @@ package org.eclipse.hawkbit.mgmt.json.model.rollout;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.rolloutgroup.MgmtRolloutGroup;
|
||||
|
||||
@@ -28,19 +29,26 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class MgmtRolloutRestRequestBody extends AbstractMgmtRolloutConditionsEntity {
|
||||
|
||||
@Schema(example = "id==targets-*")
|
||||
private String targetFilterQuery;
|
||||
@Schema(example = "6")
|
||||
private long distributionSetId;
|
||||
|
||||
@Schema(example = "5")
|
||||
private Integer amountGroups;
|
||||
|
||||
@Schema(example = "1691065781929")
|
||||
private Long forcetime;
|
||||
|
||||
@Schema(example = "1691065780929")
|
||||
private Long startAt;
|
||||
|
||||
@JsonProperty(required = false)
|
||||
@Schema(example = "400")
|
||||
private Integer weight;
|
||||
|
||||
@JsonProperty(required = false)
|
||||
@Schema(example = "false")
|
||||
private Boolean confirmationRequired;
|
||||
|
||||
private MgmtActionType type;
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.mgmt.json.model.rolloutgroup;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.rollout.AbstractMgmtRolloutConditionsEntity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
@@ -21,8 +22,11 @@ import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class MgmtRolloutGroup extends AbstractMgmtRolloutConditionsEntity {
|
||||
|
||||
@Schema(example = "controllerId==exampleTarget*")
|
||||
private String targetFilterQuery;
|
||||
@Schema(example = "20.0")
|
||||
private Float targetPercentage;
|
||||
@Schema(example = "false")
|
||||
private Boolean confirmationRequired;
|
||||
|
||||
public String getTargetFilterQuery() {
|
||||
|
||||
@@ -16,6 +16,7 @@ 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;
|
||||
|
||||
/**
|
||||
* Model for the rollout group annotated with json-annotations for easier
|
||||
@@ -26,11 +27,14 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtRolloutGroupResponseBody extends MgmtRolloutGroup {
|
||||
|
||||
@JsonProperty(value = "id", required = true)
|
||||
@Schema(example = "63")
|
||||
private Long rolloutGroupId;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "ready")
|
||||
private String status;
|
||||
|
||||
@Schema(example = "4")
|
||||
private int totalTargets;
|
||||
|
||||
private Map<String, Long> totalTargetsPerStatus;
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.mgmt.json.model.softwaremodule;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
@@ -25,23 +26,30 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class MgmtSoftwareModule extends MgmtNamedEntity {
|
||||
@JsonProperty(value = "id", required = true)
|
||||
@Schema(example = "6")
|
||||
private Long moduleId;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "1.0.0")
|
||||
private String version;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "os")
|
||||
private String type;
|
||||
|
||||
@Schema(example = "OS")
|
||||
private String typeName;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "Vendor Limited, California")
|
||||
private String vendor;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "false")
|
||||
private boolean deleted;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "false")
|
||||
private boolean encrypted;
|
||||
|
||||
public void setDeleted(final boolean deleted) {
|
||||
|
||||
@@ -13,6 +13,7 @@ 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;
|
||||
|
||||
/**
|
||||
* The representation of SoftwareModuleMetadata in the REST API for POST/Create.
|
||||
@@ -23,10 +24,13 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtSoftwareModuleMetadata {
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "someKnownKey")
|
||||
private String key;
|
||||
@JsonProperty
|
||||
@Schema(example = "someKnownValue")
|
||||
private String value;
|
||||
@JsonProperty
|
||||
@Schema(example = "false")
|
||||
private boolean targetVisible;
|
||||
|
||||
public String getKey() {
|
||||
|
||||
@@ -13,6 +13,7 @@ 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;
|
||||
|
||||
/**
|
||||
* The representation of an meta data in the REST API for PUT/Update.
|
||||
@@ -23,8 +24,10 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtSoftwareModuleMetadataBodyPut {
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "newValue")
|
||||
private String value;
|
||||
@JsonProperty
|
||||
@Schema(example = "true")
|
||||
private Boolean targetVisible;
|
||||
|
||||
public String getValue() {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
package org.eclipse.hawkbit.mgmt.json.model.softwaremodule;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* Request Body for SoftwareModule POST.
|
||||
@@ -18,21 +19,27 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtSoftwareModuleRequestBodyPost {
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "SM Name")
|
||||
private String name;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "1.0.0")
|
||||
private String version;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "os")
|
||||
private String type;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "SM Description")
|
||||
private String description;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "Vendor Limited, California")
|
||||
private String vendor;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "false")
|
||||
private boolean encrypted;
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
package org.eclipse.hawkbit.mgmt.json.model.softwaremodule;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* Request Body for SoftwareModule PUT.
|
||||
@@ -18,9 +19,11 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtSoftwareModuleRequestBodyPut {
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "SM Description")
|
||||
private String description;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "SM Vendor Name")
|
||||
private String vendor;
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
@@ -26,18 +27,23 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtSoftwareModuleType extends MgmtNamedEntity {
|
||||
|
||||
@JsonProperty(value = "id", required = true)
|
||||
@Schema(example = "83")
|
||||
private Long moduleId;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "OS")
|
||||
private String key;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "1")
|
||||
private int maxAssignments;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "false")
|
||||
private boolean deleted;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "brown")
|
||||
private String colour;
|
||||
|
||||
public boolean isDeleted() {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
package org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* Request Body for SoftwareModuleType POST.
|
||||
@@ -18,12 +19,15 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtSoftwareModuleTypeRequestBodyPost extends MgmtSoftwareModuleTypeRequestBodyPut {
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "Example name")
|
||||
private String name;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "Example key")
|
||||
private String key;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "1")
|
||||
private int maxAssignments;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
package org.eclipse.hawkbit.mgmt.json.model.softwaremoduletype;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* Request Body for SoftwareModuleType PUT.
|
||||
@@ -18,9 +19,11 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtSoftwareModuleTypeRequestBodyPut {
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "Example description")
|
||||
private String description;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "rgb(0,0,255")
|
||||
private String colour;
|
||||
|
||||
public String getDescription() {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
package org.eclipse.hawkbit.mgmt.json.model.system;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.springframework.hateoas.RepresentationModel;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
@@ -26,14 +27,22 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
public class MgmtSystemTenantConfigurationValue extends RepresentationModel<MgmtSystemTenantConfigurationValue> {
|
||||
|
||||
@JsonInclude(Include.ALWAYS)
|
||||
@Schema(example = "true")
|
||||
private Object value;
|
||||
|
||||
@JsonInclude(Include.ALWAYS)
|
||||
@Schema(example = "true")
|
||||
private boolean isGlobal = true;
|
||||
|
||||
@Schema(example = "1623085150")
|
||||
private Long lastModifiedAt;
|
||||
|
||||
@Schema(example = "example user")
|
||||
private String lastModifiedBy;
|
||||
|
||||
@Schema(example = "1523085150")
|
||||
private Long createdAt;
|
||||
@Schema(example = "example user")
|
||||
private String createdBy;
|
||||
|
||||
public Object getValue() {
|
||||
|
||||
@@ -15,6 +15,7 @@ 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;
|
||||
|
||||
/**
|
||||
* A json annotated rest model for System Configuration for PUT.
|
||||
@@ -24,6 +25,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtSystemTenantConfigurationValueRequest {
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "exampleToken")
|
||||
private Serializable value;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@ 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;
|
||||
|
||||
/**
|
||||
* Request Body for PUT.
|
||||
@@ -23,6 +24,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtAssignedDistributionSetRequestBody {
|
||||
|
||||
@JsonProperty(value = "id", required = true)
|
||||
@Schema(example = "24")
|
||||
private Long distributionSetId;
|
||||
|
||||
public Long getDistributionSetId() {
|
||||
|
||||
@@ -13,6 +13,7 @@ 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;
|
||||
|
||||
/**
|
||||
* Request Body for PUT.
|
||||
@@ -23,6 +24,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtAssignedTargetRequestBody {
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "Target1")
|
||||
private String controllerId;
|
||||
|
||||
public String getControllerId() {
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.mgmt.json.model.tag;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
@@ -26,9 +27,11 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtTag extends MgmtNamedEntity {
|
||||
|
||||
@JsonProperty(value = "id", required = true)
|
||||
@Schema(example = "2")
|
||||
private Long tagId;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "rgb(255,0,0)")
|
||||
private String colour;
|
||||
|
||||
@JsonIgnore
|
||||
|
||||
@@ -13,6 +13,7 @@ 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;
|
||||
|
||||
/**
|
||||
* Request Body for PUT/POST.
|
||||
@@ -23,12 +24,15 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtTagRequestBodyPut {
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "rgb(0,255,0)")
|
||||
private String colour;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "Example name")
|
||||
private String name;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "Example description")
|
||||
private String description;
|
||||
|
||||
public String getName() {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.mgmt.json.model.target;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtId;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtMaintenanceWindowRequestBody;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
|
||||
@@ -16,10 +17,13 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
*/
|
||||
public class MgmtDistributionSetAssignment extends MgmtId {
|
||||
|
||||
@Schema(example = "1691065930359")
|
||||
private long forcetime;
|
||||
@JsonProperty(required = false)
|
||||
@Schema(example = "23")
|
||||
private Integer weight;
|
||||
@JsonProperty(required = false)
|
||||
@Schema(example = "false")
|
||||
private Boolean confirmationRequired;
|
||||
private MgmtActionType type;
|
||||
private MgmtMaintenanceWindowRequestBody maintenanceWindow;
|
||||
|
||||
@@ -5,6 +5,7 @@ package org.eclipse.hawkbit.mgmt.json.model.target;
|
||||
|
||||
import java.net.URI;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtPollStatus;
|
||||
|
||||
@@ -23,39 +24,50 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtTarget extends MgmtNamedEntity {
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "123")
|
||||
private String controllerId;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "in_sync")
|
||||
private String updateStatus;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "1691065941102")
|
||||
private Long lastControllerRequestAt;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "1691065941155")
|
||||
private Long installedAt;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "192.168.0.1")
|
||||
private String ipAddress;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "http://192.168.0.1")
|
||||
private String address;
|
||||
|
||||
@JsonProperty
|
||||
private MgmtPollStatus pollStatus;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "38e6a19932b014040ba061795186514e")
|
||||
private String securityToken;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "true")
|
||||
private boolean requestAttributes;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "19")
|
||||
private Long targetType;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "defaultType")
|
||||
private String targetTypeName;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "false")
|
||||
private Boolean autoConfirmActive;
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,6 +12,7 @@ package org.eclipse.hawkbit.mgmt.json.model.target;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.springframework.hateoas.RepresentationModel;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
@@ -24,9 +25,13 @@ import javax.validation.constraints.NotNull;
|
||||
@JsonPropertyOrder({ "active", "initiator", "remark", "activatedAt" })
|
||||
public class MgmtTargetAutoConfirm extends RepresentationModel<MgmtTargetAutoConfirm> {
|
||||
@NotNull
|
||||
@Schema(example = "true")
|
||||
private boolean active;
|
||||
@Schema(example = "custom_initiator_value")
|
||||
private String initiator;
|
||||
@Schema(example = "custom_remark")
|
||||
private String remark;
|
||||
@Schema(example = "1691065938576")
|
||||
private Long activatedAt;
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,15 +11,18 @@ package org.eclipse.hawkbit.mgmt.json.model.target;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* Payload to activate the auto-confirmation by given initiator and remark.
|
||||
*/
|
||||
public class MgmtTargetAutoConfirmUpdate {
|
||||
@JsonProperty(required = false)
|
||||
@Schema(example = "custom_initiator_value")
|
||||
private final String initiator;
|
||||
|
||||
@JsonProperty(required = false)
|
||||
@Schema(example = "custom_remark")
|
||||
private final String remark;
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
package org.eclipse.hawkbit.mgmt.json.model.target;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* Request body for target PUT/POST commands.
|
||||
@@ -11,23 +12,30 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
*/
|
||||
public class MgmtTargetRequestBody {
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "controllerName")
|
||||
private String name;
|
||||
|
||||
@Schema(example = "Example description of a target")
|
||||
private String description;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "12345")
|
||||
private String controllerId;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "https://192.168.0.1")
|
||||
private String address;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "2345678DGGDGFTDzztgf")
|
||||
private String securityToken;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "false")
|
||||
private Boolean requestAttributes;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "10")
|
||||
private Long targetType;
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.mgmt.json.model.targetfilter;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtBaseEntity;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
|
||||
|
||||
@@ -27,24 +28,30 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtTargetFilterQuery extends MgmtBaseEntity {
|
||||
|
||||
@JsonProperty(value = "id", required = true)
|
||||
@Schema(example = "2")
|
||||
private Long filterId;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "filterName")
|
||||
private String name;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "name==*")
|
||||
private String query;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "15")
|
||||
private Long autoAssignDistributionSet;
|
||||
|
||||
@JsonProperty
|
||||
private MgmtActionType autoAssignActionType;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "")
|
||||
private Integer autoAssignWeight;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "false")
|
||||
private Boolean confirmationRequired;
|
||||
|
||||
public Long getFilterId() {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
package org.eclipse.hawkbit.mgmt.json.model.targetfilter;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* Request body for target PUT/POST commands.
|
||||
@@ -17,9 +18,11 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
*/
|
||||
public class MgmtTargetFilterQueryRequestBody {
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "filterName")
|
||||
private String name;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "controllerId==example-target-*")
|
||||
private String query;
|
||||
|
||||
public String getName() {
|
||||
|
||||
@@ -12,6 +12,7 @@ package org.eclipse.hawkbit.mgmt.json.model.targettype;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
||||
|
||||
/**
|
||||
@@ -24,9 +25,11 @@ import org.eclipse.hawkbit.mgmt.json.model.MgmtNamedEntity;
|
||||
public class MgmtTargetType extends MgmtNamedEntity {
|
||||
|
||||
@JsonProperty(value = "id", required = true)
|
||||
@Schema(example = "26")
|
||||
private Long typeId;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "rgb(255,255,255")
|
||||
private String colour;
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
package org.eclipse.hawkbit.mgmt.json.model.targettype;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* Request Body for TargetType PUT.
|
||||
@@ -18,12 +19,15 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
public class MgmtTargetTypeRequestBodyPut {
|
||||
|
||||
@JsonProperty(required = true)
|
||||
@Schema(example = "updatedTypeName")
|
||||
private String name;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "an updated description")
|
||||
private String description;
|
||||
|
||||
@JsonProperty
|
||||
@Schema(example = "#aaafff")
|
||||
private String colour;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user