summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2019-04-04 13:57:30 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-04 13:57:31 +0000
commita2ec30735da8be9228c4360489660f17030dcb07 (patch)
treeaaf2aecde5679f125b57c633622c7f7574215cde
parent3cf1d9e82557d36da6c8d56dca11ec4cb5b957e6 (diff)
parenta50a7d8414e03af2520ed5e4714af2d28016d238 (diff)
Merge "Add ApiModelProperty annotation to authorative models"
-rw-r--r--models-tosca/pom.xml5
-rw-r--r--models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaConstraint.java6
-rw-r--r--models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaEntity.java5
-rw-r--r--models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicy.java1
-rw-r--r--models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaProperty.java3
-rw-r--r--models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java5
-rw-r--r--models-tosca/src/main/java/org/onap/policy/models/tosca/legacy/concepts/LegacyGuardPolicyInput.java4
-rw-r--r--models-tosca/src/main/java/org/onap/policy/models/tosca/legacy/concepts/LegacyOperationalPolicy.java4
8 files changed, 27 insertions, 6 deletions
diff --git a/models-tosca/pom.xml b/models-tosca/pom.xml
index c8fa2520a..5b857c13b 100644
--- a/models-tosca/pom.xml
+++ b/models-tosca/pom.xml
@@ -68,6 +68,11 @@
<artifactId>mariadb-java-client</artifactId>
<scope>test</scope>
</dependency>
+
+ <dependency>
+ <groupId>io.swagger</groupId>
+ <artifactId>swagger-jersey2-jaxrs</artifactId>
+ </dependency>
</dependencies>
</project>
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaConstraint.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaConstraint.java
index 4623b20e8..582b73cc6 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaConstraint.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaConstraint.java
@@ -24,6 +24,7 @@
package org.onap.policy.models.tosca.authorative.concepts;
import com.google.gson.annotations.SerializedName;
+import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import lombok.Data;
@@ -35,20 +36,25 @@ import lombok.Data;
@Data
public class ToscaConstraint {
+ @ApiModelProperty(name = "valid_values")
@SerializedName("valid_values")
private List<String> validValues;
private String equal;
+ @ApiModelProperty(name = "greater_than")
@SerializedName("greater_than")
private String greaterThan;
+ @ApiModelProperty(name = "greater_or_equal")
@SerializedName("greater_or_equal")
private String greaterOrEqual;
+ @ApiModelProperty(name = "less_than")
@SerializedName("less_than")
private String lessThan;
+ @ApiModelProperty(name = "less_or_equal")
@SerializedName("less_or_equal")
private String lessOrEqual;
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaEntity.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaEntity.java
index a61f2a781..9d327a2ca 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaEntity.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaEntity.java
@@ -23,15 +23,13 @@
package org.onap.policy.models.tosca.authorative.concepts;
import com.google.gson.annotations.SerializedName;
-
+import io.swagger.annotations.ApiModelProperty;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Map.Entry;
-
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.NonNull;
-
import org.onap.policy.models.base.PfNameVersion;
/**
@@ -46,6 +44,7 @@ public class ToscaEntity implements PfNameVersion {
private String version;
+ @ApiModelProperty(name = "derived_from")
@SerializedName("derived_from")
private String derivedFrom;
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicy.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicy.java
index 38c68599d..6463abc84 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicy.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicy.java
@@ -26,7 +26,6 @@ package org.onap.policy.models.tosca.authorative.concepts;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Map.Entry;
-
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaProperty.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaProperty.java
index 84f798bc9..00005f2f8 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaProperty.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaProperty.java
@@ -24,6 +24,7 @@
package org.onap.policy.models.tosca.authorative.concepts;
import com.google.gson.annotations.SerializedName;
+import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import lombok.Data;
@@ -46,6 +47,7 @@ public class ToscaProperty {
private String description;
+ @ApiModelProperty(name = "default")
@SerializedName("default")
private String defaultValue;
@@ -55,6 +57,7 @@ public class ToscaProperty {
private List<ToscaConstraint> constraints;
+ @ApiModelProperty(name = "entry_schema")
@SerializedName("entry_schema")
private ToscaEntrySchema entrySchema;
}
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java
index a9a1783d7..0b19708dc 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaServiceTemplate.java
@@ -24,6 +24,7 @@
package org.onap.policy.models.tosca.authorative.concepts;
import com.google.gson.annotations.SerializedName;
+import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import java.util.Map;
import lombok.Data;
@@ -38,15 +39,19 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
public class ToscaServiceTemplate extends ToscaEntity {
+ @ApiModelProperty(name = "tosca_definitions_version")
@SerializedName("tosca_definitions_version")
private String toscaDefinitionsVersion;
+ @ApiModelProperty(name = "topology_template")
@SerializedName("topology_template")
private ToscaTopologyTemplate toscaTopologyTemplate;
+ @ApiModelProperty(name = "policy_types")
@SerializedName("policy_types")
private List<Map<String, ToscaPolicyType>> policyTypes;
+ @ApiModelProperty(name = "data_types")
@SerializedName("data_types")
private List<Map<String, ToscaDataType>> dataTypes;
} \ No newline at end of file
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/legacy/concepts/LegacyGuardPolicyInput.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/legacy/concepts/LegacyGuardPolicyInput.java
index 18853c100..819fcba75 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/legacy/concepts/LegacyGuardPolicyInput.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/legacy/concepts/LegacyGuardPolicyInput.java
@@ -22,7 +22,7 @@
package org.onap.policy.models.tosca.legacy.concepts;
import com.google.gson.annotations.SerializedName;
-
+import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
@@ -33,9 +33,11 @@ import lombok.Data;
@Data
public class LegacyGuardPolicyInput {
+ @ApiModelProperty(name = "policy-id")
@SerializedName("policy-id")
private String policyId;
+ @ApiModelProperty(name = "policy-version")
@SerializedName("policy-version")
private String policyVersion;
diff --git a/models-tosca/src/main/java/org/onap/policy/models/tosca/legacy/concepts/LegacyOperationalPolicy.java b/models-tosca/src/main/java/org/onap/policy/models/tosca/legacy/concepts/LegacyOperationalPolicy.java
index 1db4d6e20..70453da76 100644
--- a/models-tosca/src/main/java/org/onap/policy/models/tosca/legacy/concepts/LegacyOperationalPolicy.java
+++ b/models-tosca/src/main/java/org/onap/policy/models/tosca/legacy/concepts/LegacyOperationalPolicy.java
@@ -22,7 +22,7 @@
package org.onap.policy.models.tosca.legacy.concepts;
import com.google.gson.annotations.SerializedName;
-
+import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
@@ -33,9 +33,11 @@ import lombok.Data;
@Data
public class LegacyOperationalPolicy {
+ @ApiModelProperty(name = "policy-id")
@SerializedName("policy-id")
private String policyId;
+ @ApiModelProperty(name = "policy-version")
@SerializedName("policy-version")
private String policyVersion;