summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRavi Mantena <rx908f@att.com>2020-12-17 11:23:12 -0500
committerRavi Mantena <rx908f@att.com>2020-12-17 11:26:15 -0500
commitf4ad471f83a09db2efaa3ca6943507f92b72299a (patch)
tree8092321014839d3422bdfe6e9236db586cc4d57a
parent3f0bbed7e1b96d1982d55e26c27169885aa3067c (diff)
Update to name and version regex for PM Update request Issue-ID: DCAEGEN2-1867
Issue-ID: DCAEGEN2-1867 Change-Id: Id2b08f6fd688bfc8d407ee56dff884e3632ed4c2 Signed-off-by: Ravi Mantena <rx908f@att.com>
-rw-r--r--mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/restapi/PolicyModelUpdateRequest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/restapi/PolicyModelUpdateRequest.java b/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/restapi/PolicyModelUpdateRequest.java
index 08d1e65..611a686 100644
--- a/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/restapi/PolicyModelUpdateRequest.java
+++ b/mod2/catalog-service/src/main/java/org/onap/dcaegen2/platform/mod/model/restapi/PolicyModelUpdateRequest.java
@@ -38,7 +38,7 @@ import javax.validation.constraints.Size;
@NoArgsConstructor
public class PolicyModelUpdateRequest {
- @Pattern(regexp = "^([a-z0-9](-[a-z0-9])*)+$", message = "Policy Model name is invalid. Accepts 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;
@@ -46,7 +46,7 @@ public class PolicyModelUpdateRequest {
private String owner;
- @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;