summaryrefslogtreecommitdiffstats
path: root/models-pdp/src/main/java/org
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-04-16 15:32:12 -0400
committerJim Hahn <jrh3@att.com>2019-04-16 15:42:47 -0400
commit70be3b7d76f6bd8d2c834496c688d349933e7130 (patch)
tree3a9d82a58bc3e7d582430837f95c540c85998549 /models-pdp/src/main/java/org
parent46c8422501ac8321e11493693f2ad5b2ea8e1293 (diff)
Don't include "nullVersion" in swagger API
Swagger sitll uses jackson, thus it is including ToscaPolicyIdentifierOptVersion.isNullVersion() in the API that it generates. Added @JsonIgnore annotation to prevent it from being included. Similar issue with get/setVersion() in PdpGroup. Created POLICY-1653 to remove the isNullVersion() method altogether in El Alto. Change-Id: I6cb7b7d1d75258eeb9d6f9b6c7a48eeb32174307 Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-pdp/src/main/java/org')
-rw-r--r--models-pdp/src/main/java/org/onap/policy/models/pdp/concepts/PdpGroup.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/models-pdp/src/main/java/org/onap/policy/models/pdp/concepts/PdpGroup.java b/models-pdp/src/main/java/org/onap/policy/models/pdp/concepts/PdpGroup.java
index 4cb0ac54e..8cad58c13 100644
--- a/models-pdp/src/main/java/org/onap/policy/models/pdp/concepts/PdpGroup.java
+++ b/models-pdp/src/main/java/org/onap/policy/models/pdp/concepts/PdpGroup.java
@@ -21,6 +21,7 @@
package org.onap.policy.models.pdp.concepts;
+import com.fasterxml.jackson.annotation.JsonIgnore;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
@@ -121,12 +122,14 @@ public class PdpGroup implements PfNameVersion, Comparable<PdpGroup> {
}
@Override
+ @JsonIgnore
public String getVersion() {
// We need to pass a version for keying in the database
return PfKey.NULL_KEY_VERSION;
}
@Override
+ @JsonIgnore
public void setVersion(String version) {
// Just ignore any version that is set
}