summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Venkatesh Kumar <vv770d@att.com>2020-12-16 20:43:47 +0000
committerGerrit Code Review <gerrit@onap.org>2020-12-16 20:43:47 +0000
commit3f0bbed7e1b96d1982d55e26c27169885aa3067c (patch)
tree506e57a79098807033b1116a492eac940e58648c
parent2fd50f39ff37a1ca006f4bf984af91378e395d80 (diff)
parent63307648ca91dddf8358403909d676a92cdd6324 (diff)
Merge "Changes to Regex for Name and version Issue-ID: DCAEGEN2-1867"
-rw-r--r--mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/restapi/PolicyModelCreateRequest.java4
-rw-r--r--mod2/catalog-service/src/main/resources/application.properties2
2 files changed, 3 insertions, 3 deletions
diff --git a/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/restapi/PolicyModelCreateRequest.java b/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/restapi/PolicyModelCreateRequest.java
index a4258f4..db806bb 100644
--- a/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/restapi/PolicyModelCreateRequest.java
+++ b/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/restapi/PolicyModelCreateRequest.java
@@ -40,7 +40,7 @@ import javax.validation.constraints.Size;
public class PolicyModelCreateRequest {
@NotBlank
- @Pattern(regexp = "^([a-z0-9](-[a-z0-9])*)+$", message = "Policy Model name is invalid. Accepts lower alphanumerics and hyphens.")
+ @Pattern(regexp = "^([a-zA-Z0-9]([.|-][a-zA-Z0-9])*)+$", message = "Policy Model name is invalid. Accepts alphanumerics, Dot(.) and hyphens.")
@Size(min = 5, max = 50, message = "Policy Model name length cannot exceed 50 characters")
private String name;
@@ -51,7 +51,7 @@ public class PolicyModelCreateRequest {
private String owner;
@NotBlank
- @Pattern(regexp = "[0-9].[0-9].[0-9]", message = "Policy Model version is invalid. Should be in x.x.x format.")
+ @Pattern(regexp = "[0-9][.][0-9][.][0-9]", message = "Policy Model version is invalid. Should be in x.x.x format.")
private String version;
private MetadataRequest metadata;
diff --git a/mod2/catalog-service/src/main/resources/application.properties b/mod2/catalog-service/src/main/resources/application.properties
index f818c6c..93c7883 100644
--- a/mod2/catalog-service/src/main/resources/application.properties
+++ b/mod2/catalog-service/src/main/resources/application.properties
@@ -30,7 +30,7 @@ spring.data.mongodb.database=dcae_mod
url.path=/policy/api/v1/policytypes
dev.server=10.12.6.2
-dev.port=31317
+dev.port=30522
dev.user=healthcheck
dev.password=PASSWORD_GOES_HERE