diff options
Diffstat (limited to 'adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/CreateVfModuleRequest.java')
-rw-r--r-- | adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/CreateVfModuleRequest.java | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/CreateVfModuleRequest.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/CreateVfModuleRequest.java index 43ac1f1f3c..dac09d4cd1 100644 --- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/CreateVfModuleRequest.java +++ b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/CreateVfModuleRequest.java @@ -21,35 +21,22 @@ package org.openecomp.mso.adapters.vnfrest; -import org.openecomp.mso.entity.MsoRequest; - -import java.util.Map; import java.util.HashMap; +import java.util.Map; import javax.xml.bind.annotation.XmlRootElement; -import org.jboss.resteasy.annotations.providers.NoJackson; +import org.openecomp.mso.entity.MsoRequest; + +import com.fasterxml.jackson.annotation.JsonRootName; -import org.codehaus.jackson.map.annotate.JsonRootName; /* README -* 1) Used JAXB/Jettison - see @NoJackson annotation on class to get RootElements REad by RestEasy -* 2) due to 1) Maps need to use this format - -"vfModuleParams": {"entry": [ - {"key": "network_id", - "value": "59ed7b41-2983-413f-ba93-e7d437433916"}, - {"key": "subnet_id", - "value": "086c9298-5c57-49b7-bb2b-6fd5730c5d92"}, - {"key": "server_name_0", - "value": "RaaVnf1"} - ]}, - * 3) to output json see toJSonString method below which required the @JsonRootName annotation and the WRAP_ROOT feature enabled - * 4) Tryong to work with RESTEASY JACKSON and JAXB/JETTISON to conform to Json input/output specs + Map<String, String> elements when marshalled to XML produce a list of <entry><key>${key}</key><value>${value}</value></entry> elements. + When marshalling to JSON they create a list of "${key}" : "${value}" pairs with no extra wrappers. */ @JsonRootName("createVfModuleRequest") @XmlRootElement(name = "createVfModuleRequest") -@NoJackson public class CreateVfModuleRequest extends VfRequestCommon { private String cloudSiteId; private String tenantId; |