summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRavi Mantena <rx908f@att.com>2020-12-16 12:45:29 -0500
committerRavi Mantena <rx908f@att.com>2020-12-16 12:48:04 -0500
commit63307648ca91dddf8358403909d676a92cdd6324 (patch)
treea48495ca283cc96d65958b11a75fed75c666fbc4
parente3578fcdcd65c9f919c0f7cc16949b79b70d12b4 (diff)
Changes to Regex for Name and version Issue-ID: DCAEGEN2-1867
Issue-ID: DCAEGEN2-1867 Change-Id: I59bcfed6efa95c44e1f66523dfc3ed6e535fefac Signed-off-by: Ravi Mantena <rx908f@att.com>
-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