Copilot commented on code in PR #6096:
URL: https://github.com/apache/shenyu/pull/6096#discussion_r2280427259


##########
shenyu-admin/src/main/java/org/apache/shenyu/admin/model/dto/RegistryDTO.java:
##########
@@ -0,0 +1,199 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shenyu.admin.model.dto;
+
+import java.io.Serializable;
+
+import jakarta.validation.constraints.NotNull;
+import org.hibernate.validator.constraints.Length;
+
+/**
+ * RegistryDTO.
+ */
+public class RegistryDTO implements Serializable {
+
+    private String id;
+
+    @Length(max = 128, message = "The maximum length is 128")
+    @NotNull(message = "registry code not null")

Review Comment:
   The error message 'registry code not null' should be 'registry code cannot 
be null' or 'registry code is required' for grammatical correctness and clarity.
   ```suggestion
       @NotNull(message = "registry code is required")
   ```



##########
db/init/oracle/schema.sql:
##########
@@ -3607,3 +3607,46 @@ INSERT INTO permission (id, role_id, resource_id, 
date_created, date_updated) VA
 INSERT INTO permission (id, role_id, resource_id, date_created, date_updated) 
VALUES ('1697146861569542758', '1346358560427216896', '1844026199075534867', 
sysdate, sysdate);
 INSERT INTO permission (id, role_id, resource_id, date_created, date_updated) 
VALUES ('1697146861569542759', '1346358560427216896', '1844026199075534868', 
sysdate, sysdate);
 INSERT INTO permission (id, role_id, resource_id, date_created, date_updated) 
VALUES ('1697146861569542760', '1346358560427216896', '1844026199075534869', 
sysdate, sysdate);
+
+CREATE TABLE "public"."registry_config"  (

Review Comment:
   In Oracle database, the schema name 'public' is not valid. Oracle uses 
schema names like 'SYSTEM' or user-defined schemas, but not 'public' which is 
PostgreSQL-specific syntax.
   ```suggestion
   CREATE TABLE "registry_config"  (
   ```



##########
shenyu-admin/src/main/java/org/apache/shenyu/admin/model/dto/RegistryDTO.java:
##########
@@ -0,0 +1,199 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shenyu.admin.model.dto;
+
+import java.io.Serializable;
+
+import jakarta.validation.constraints.NotNull;
+import org.hibernate.validator.constraints.Length;
+
+/**
+ * RegistryDTO.
+ */
+public class RegistryDTO implements Serializable {
+
+    private String id;
+
+    @Length(max = 128, message = "The maximum length is 128")
+    @NotNull(message = "registry code not null")
+    private String registryId;
+
+    @Length(max = 128, message = "The maximum length is 128")
+    @NotNull(message = "registry protocol not null")
+    private String protocol;
+
+    @Length(max = 100, message = "The maximum length is 100")
+    @NotNull(message = "address null")

Review Comment:
   The error message 'address null' is incomplete and unclear. It should be 
'address cannot be null' or 'address is required' for better user understanding.
   ```suggestion
       @NotNull(message = "address cannot be null")
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to