Smaller Improvements of configuration REST-API

* changed resource path to "rest/v1/system/configs"
* added links to resources, to follow good practice recommendations
* added GET methode for parent resource system/configs
* fade out null values in json
* marked some json properties as mandatory

TMP

Signed-off-by: Nonnenmacher Fabian <fabian.nonnenmacher@bosch-si.com>
This commit is contained in:
Fabian Nonnenmacher
2016-02-01 15:31:56 +01:00
committed by Nonnenmacher Fabian
parent c39753001e
commit aee254244a
5 changed files with 43 additions and 15 deletions

View File

@@ -12,7 +12,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
@JsonIgnoreProperties(ignoreUnknown = true)
public class TenantConfigurationValueRequest {
@JsonProperty
@JsonProperty(required = true)
private Object value;
/**
@@ -24,7 +24,7 @@ public class TenantConfigurationValueRequest {
}
/**
* Sets teh TenantConfigurationValueRequest
* Sets the TenantConfigurationValueRequest
*
* @param value
*/

View File

@@ -1,9 +1,21 @@
package org.eclipse.hawkbit.rest.resource.model.system;
public class TenantConfigurationValueRest {
import org.springframework.hateoas.ResourceSupport;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
@JsonInclude(Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class TenantConfigurationValueRest extends ResourceSupport {
@JsonInclude(Include.ALWAYS)
private Object value = null;
@JsonInclude(Include.ALWAYS)
private boolean isGlobal = true;
private Long lastModifiedAt = null;
private String lastModifiedBy = null;
private Long createdAt = null;