diff options
author | Steve Smokowski <ss835w@att.com> | 2019-11-22 15:34:46 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-11-22 15:34:46 +0000 |
commit | f3aade51a88b6708233ba486bb578ad436909796 (patch) | |
tree | 7e6f3943b32c519cc2a1c67f820c92fa7203c66e /common/src | |
parent | e53c2cbebcaf9eababa6ead8723cf62194146e51 (diff) | |
parent | ba40eeb0df65eba18fa150c8736f6cc084508d4b (diff) |
Merge "vnf and vf module replace requests to make"
Diffstat (limited to 'common/src')
-rw-r--r-- | common/src/main/java/org/onap/so/serviceinstancebeans/RequestError.java | 11 | ||||
-rw-r--r-- | common/src/main/java/org/onap/so/serviceinstancebeans/ServiceException.java | 3 |
2 files changed, 12 insertions, 2 deletions
diff --git a/common/src/main/java/org/onap/so/serviceinstancebeans/RequestError.java b/common/src/main/java/org/onap/so/serviceinstancebeans/RequestError.java index 121fd4a1a5..33678b336f 100644 --- a/common/src/main/java/org/onap/so/serviceinstancebeans/RequestError.java +++ b/common/src/main/java/org/onap/so/serviceinstancebeans/RequestError.java @@ -33,7 +33,12 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import org.apache.commons.lang3.builder.ToStringBuilder; -import com.fasterxml.jackson.annotation.JsonRootName; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeInfo.As; +import com.fasterxml.jackson.annotation.JsonTypeInfo.Id; +import com.fasterxml.jackson.annotation.JsonTypeName; /** @@ -63,7 +68,9 @@ import com.fasterxml.jackson.annotation.JsonRootName; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = {"policyException", "serviceException"}) @XmlRootElement(name = "requestError") -@JsonRootName(value = "requestError") +@JsonTypeName("requestError") +@JsonTypeInfo(include = As.WRAPPER_OBJECT, use = Id.NAME) +@JsonInclude(Include.NON_NULL) public class RequestError { protected PolicyException policyException; diff --git a/common/src/main/java/org/onap/so/serviceinstancebeans/ServiceException.java b/common/src/main/java/org/onap/so/serviceinstancebeans/ServiceException.java index f2976136e9..cbbc7f61c1 100644 --- a/common/src/main/java/org/onap/so/serviceinstancebeans/ServiceException.java +++ b/common/src/main/java/org/onap/so/serviceinstancebeans/ServiceException.java @@ -31,6 +31,8 @@ package org.onap.so.serviceinstancebeans; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonRootName; @@ -55,6 +57,7 @@ import com.fasterxml.jackson.annotation.JsonRootName; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "serviceException") @JsonRootName(value = "serviceException") +@JsonInclude(Include.NON_EMPTY) public class ServiceException extends ExceptionType { |