This is an automated email from the ASF dual-hosted git repository.

ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-toolkit.git

commit b979aa6a3686de97355449641eb5aee03c838230
Author: Daniel Qian <chanjars...@gmail.com>
AuthorDate: Thu Nov 7 15:20:22 2019 +0800

    SCB-1555 Integrate oas-validator compability check to cli
    Translate compatibility error message to english
---
 .../toolkit/cli/CheckCompatibilityAbbr.java        |  3 ++-
 ...EncodingAllowedReservedChangeDiffValidator.java |  3 ++-
 .../parameter/ParameterAddDiffValidator.java       |  4 +++-
 ...arameterAllowEmptyValueChangeDiffValidator.java |  3 ++-
 .../ParameterAllowReservedChangeDiffValidator.java |  3 ++-
 .../ParameterRequiredChangeDiffValidator.java      |  3 ++-
 .../RequestBodyRequiredChangeDiffValidator.java    |  3 ++-
 .../schema/SchemaTypeFormatChangeValidator.java    |  4 ++--
 .../SchemaEnumChangeInRequestValidator.java        |  4 +++-
 ...maExclusiveMaximumChangeInRequestValidator.java |  3 ++-
 ...maExclusiveMinimumChangeInRequestValidator.java |  3 ++-
 .../SchemaMultipleOfChangeInRequestValidator.java  |  4 +++-
 .../SchemaNullableChangeInRequestValidator.java    |  3 ++-
 .../SchemaRequiredChangeInRequestValidator.java    |  4 +++-
 .../SchemaUniqueItemsChangeInRequestValidator.java |  3 ++-
 .../SchemaEnumChangeInResponseValidator.java       |  4 +++-
 ...aExclusiveMaximumChangeInResponseValidator.java |  3 ++-
 ...aExclusiveMinimumChangeInResponseValidator.java |  3 ++-
 .../SchemaMultipleOfChangeInResponseValidator.java |  4 +++-
 .../SchemaNullableChangeInResponseValidator.java   |  3 ++-
 .../SchemaRequiredChangeInResponseValidator.java   |  4 +++-
 ...SchemaUniqueItemsChangeInResponseValidator.java |  3 ++-
 ...dingAllowedReservedChangeDiffValidatorTest.java |  3 ++-
 .../parameter/ParameterAddDiffValidatorTest.java   |  3 ++-
 ...eterAllowEmptyValueChangeDiffValidatorTest.java |  3 ++-
 ...ameterAllowReservedChangeDiffValidatorTest.java |  8 +++-----
 .../ParameterRequiredChangeDiffValidatorTest.java  |  3 ++-
 ...RequestBodyRequiredChangeDiffValidatorTest.java |  3 ++-
 .../SchemaEnumChangeInRequestValidatorTest.java    | 24 ++++++++++++++--------
 ...clusiveMaximumChangeInRequestValidatorTest.java |  5 +++--
 ...clusiveMinimumChangeInRequestValidatorTest.java |  5 +++--
 ...hemaMultipleOfChangeInRequestValidatorTest.java |  4 ++--
 ...SchemaNullableChangeInRequestValidatorTest.java |  5 +++--
 ...SchemaRequiredChangeInRequestValidatorTest.java |  4 ++--
 ...hemaTypeFormatChangeInRequestValidatorTest.java |  4 ++--
 ...emaUniqueItemsChangeInRequestValidatorTest.java |  5 +++--
 .../SchemaEnumChangeInResponseValidatorTest.java   |  2 +-
 ...lusiveMaximumChangeInResponseValidatorTest.java |  3 ++-
 ...lusiveMinimumChangeInResponseValidatorTest.java |  3 ++-
 ...emaMultipleOfChangeInResponseValidatorTest.java |  2 +-
 ...chemaNullableChangeInResponseValidatorTest.java |  3 ++-
 ...chemaRequiredChangeInResponseValidatorTest.java |  2 +-
 ...emaTypeFormatChangeInResponseValidatorTest.java |  2 +-
 ...maUniqueItemsChangeInResponseValidatorTest.java |  3 ++-
 .../diffvalidation/api/DiffViolationMessages.java  | 13 +++++++-----
 .../oasv/common/OasObjectPropertyLocationTest.java | 17 +++++++++++++++
 oas-validator/pom.xml                              |  2 +-
 47 files changed, 135 insertions(+), 70 deletions(-)

diff --git 
a/cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckCompatibilityAbbr.java
 
b/cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckCompatibilityAbbr.java
index 2f14b2b..6b09553 100644
--- 
a/cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckCompatibilityAbbr.java
+++ 
b/cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckCompatibilityAbbr.java
@@ -20,7 +20,8 @@ package org.apache.servicecomb.toolkit.cli;
 import io.airlift.airline.Command;
 
 @Command(name = "cc",
-    description = "Check compatibility for two OpenAPI v3 spec yamls, right 
one should be semantically compatible with left one")
+    description = "Check compatibility for two OpenAPI v3 spec yamls,"
+        + " right one should be semantically compatible with left one(abbr for 
checkcompatibility)")
 public class CheckCompatibilityAbbr extends CheckCompatibilityBase {
 
 }
diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/encoding/EncodingAllowedReservedChangeDiffValidator.java
 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/encoding/EncodingAllowedReservedChangeDiffValidator.java
index 614471b..b29e9f2 100755
--- 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/encoding/EncodingAllowedReservedChangeDiffValidator.java
+++ 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/encoding/EncodingAllowedReservedChangeDiffValidator.java
@@ -18,6 +18,7 @@
 package org.apache.servicecomb.toolkit.oasv.compatibility.validators.encoding;
 
 import org.apache.servicecomb.toolkit.oasv.common.OasObjectPropertyLocation;
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.DiffViolationMessages;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.EncodingDiffValidator;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffValidationContext;
 import org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffViolation;
@@ -50,7 +51,7 @@ public class EncodingAllowedReservedChangeDiffValidator
     return singletonList(new OasDiffViolation(
       leftLocation.property("allowReserved"),
       rightLocation.property("allowReserved"),
-      "仅允许false->true的修改"
+      DiffViolationMessages.FALSE_TO_TRUE
     ));
 
   }
diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterAddDiffValidator.java
 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterAddDiffValidator.java
index e5ee7e2..d7c4909 100755
--- 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterAddDiffValidator.java
+++ 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterAddDiffValidator.java
@@ -34,6 +34,8 @@ public class ParameterAddDiffValidator
   extends OasObjectDiffValidatorTemplate<Parameter>
   implements ParameterDiffValidator {
 
+  public static final String VIOLATION_MESSAGE = "required=true parameter is 
not allowed on right side";
+
   @Override
   protected List<OasDiffViolation> validateAdd(OasDiffValidationContext 
context,
     OasObjectPropertyLocation rightLocation, Parameter rightOasObject) {
@@ -45,7 +47,7 @@ public class ParameterAddDiffValidator
     String message = new StringBuilder()
       .append(ParameterUtils.getKeyString(rightOasObject))
       .append(':')
-      .append("仅允许新增required=false的parameter")
+      .append(VIOLATION_MESSAGE)
       .toString()
       ;
 
diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterAllowEmptyValueChangeDiffValidator.java
 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterAllowEmptyValueChangeDiffValidator.java
index 8ac7d39..d181744 100755
--- 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterAllowEmptyValueChangeDiffValidator.java
+++ 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterAllowEmptyValueChangeDiffValidator.java
@@ -18,6 +18,7 @@
 package org.apache.servicecomb.toolkit.oasv.compatibility.validators.parameter;
 
 import org.apache.servicecomb.toolkit.oasv.common.OasObjectPropertyLocation;
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.DiffViolationMessages;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffValidationContext;
 import org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffViolation;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasObjectDiffValidatorTemplate;
@@ -55,7 +56,7 @@ public class ParameterAllowEmptyValueChangeDiffValidator
     String message = new StringBuilder()
       .append(ParameterUtils.getKeyString(rightOasObject))
       .append(':')
-      .append("仅允许false->true的修改")
+      .append(DiffViolationMessages.FALSE_TO_TRUE)
       .toString();
 
     return singletonList(new OasDiffViolation(
diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterAllowReservedChangeDiffValidator.java
 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterAllowReservedChangeDiffValidator.java
index 9cca97a..537c4ba 100755
--- 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterAllowReservedChangeDiffValidator.java
+++ 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterAllowReservedChangeDiffValidator.java
@@ -18,6 +18,7 @@
 package org.apache.servicecomb.toolkit.oasv.compatibility.validators.parameter;
 
 import org.apache.servicecomb.toolkit.oasv.common.OasObjectPropertyLocation;
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.DiffViolationMessages;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffValidationContext;
 import org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffViolation;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasObjectDiffValidatorTemplate;
@@ -54,7 +55,7 @@ public class ParameterAllowReservedChangeDiffValidator
     String message = new StringBuilder()
       .append(ParameterUtils.getKeyString(rightOasObject))
       .append(':')
-      .append("仅允许false->true的修改")
+      .append(DiffViolationMessages.FALSE_TO_TRUE)
       .toString();
 
     return singletonList(new OasDiffViolation(
diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterRequiredChangeDiffValidator.java
 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterRequiredChangeDiffValidator.java
index f629812..36b4bd9 100755
--- 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterRequiredChangeDiffValidator.java
+++ 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterRequiredChangeDiffValidator.java
@@ -18,6 +18,7 @@
 package org.apache.servicecomb.toolkit.oasv.compatibility.validators.parameter;
 
 import org.apache.servicecomb.toolkit.oasv.common.OasObjectPropertyLocation;
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.DiffViolationMessages;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffValidationContext;
 import org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffViolation;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasObjectDiffValidatorTemplate;
@@ -54,7 +55,7 @@ public class ParameterRequiredChangeDiffValidator
     String message = new StringBuilder()
       .append(ParameterUtils.getKeyString(rightOasObject))
       .append(':')
-      .append("仅允许true->false的修改")
+      .append(DiffViolationMessages.TRUE_TO_FALSE)
       .toString();
 
     return singletonList(new OasDiffViolation(
diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/requestbody/RequestBodyRequiredChangeDiffValidator.java
 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/requestbody/RequestBodyRequiredChangeDiffValidator.java
index 76acb03..28c6e70 100755
--- 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/requestbody/RequestBodyRequiredChangeDiffValidator.java
+++ 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/requestbody/RequestBodyRequiredChangeDiffValidator.java
@@ -18,6 +18,7 @@
 package 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.requestbody;
 
 import org.apache.servicecomb.toolkit.oasv.common.OasObjectPropertyLocation;
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.DiffViolationMessages;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffValidationContext;
 import org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffViolation;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasObjectDiffValidatorTemplate;
@@ -53,7 +54,7 @@ public class RequestBodyRequiredChangeDiffValidator
     return singletonList(new OasDiffViolation(
       leftLocation.property("required"),
       rightLocation.property("required"),
-      "仅允许true->false的修改"
+      DiffViolationMessages.TRUE_TO_FALSE
     ));
 
   }
diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/SchemaTypeFormatChangeValidator.java
 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/SchemaTypeFormatChangeValidator.java
index e302456..7c683ea 100755
--- 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/SchemaTypeFormatChangeValidator.java
+++ 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/SchemaTypeFormatChangeValidator.java
@@ -46,7 +46,7 @@ public abstract class SchemaTypeFormatChangeValidator 
implements SchemaCompareVa
       return emptyList();
     }
 
-    StringBuilder message = new StringBuilder("不允许");
+    StringBuilder message = new StringBuilder("the change ");
     message
       .append("(type=")
       .append(leftTypeFormat.getType())
@@ -59,7 +59,7 @@ public abstract class SchemaTypeFormatChangeValidator 
implements SchemaCompareVa
       .append(",format=")
       .append(rightTypeFormat.getFormat())
       .append(')')
-      .append("的修改");
+      .append(" is not allowed");
 
     return singletonList(new OasDiffViolation(leftLocation, rightLocation, 
message.toString()));
 
diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaEnumChangeInRequestValidator.java
 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaEnumChangeInRequestValidator.java
index ef8192f..d1ba7db 100755
--- 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaEnumChangeInRequestValidator.java
+++ 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaEnumChangeInRequestValidator.java
@@ -30,6 +30,8 @@ import static java.util.Collections.emptyList;
 
 public class SchemaEnumChangeInRequestValidator extends 
SchemaPropertyChangeValidator<List> {
 
+  public static final String VIOLATION_MESSAGE = "delete enum on right side is 
not allowed";
+
   @Override
   protected List getProperty(Schema schema) {
     return ObjectUtils.defaultIfNull(schema.getEnum(), emptyList());
@@ -47,7 +49,7 @@ public class SchemaEnumChangeInRequestValidator extends 
SchemaPropertyChangeVali
 
   @Override
   protected String getMessage(List leftProperty, List rightProperty) {
-    return "不允许删除enum";
+    return VIOLATION_MESSAGE;
   }
 
   @Override
diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaExclusiveMaximumChangeInRequestValidator.java
 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaExclusiveMaximumChangeInRequestValidator.java
index b724510..7b13242 100755
--- 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaExclusiveMaximumChangeInRequestValidator.java
+++ 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaExclusiveMaximumChangeInRequestValidator.java
@@ -17,6 +17,7 @@
 
 package 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.schema.request;
 
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.DiffViolationMessages;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffValidationContext;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.util.ChangeRangeCheckUtils;
 import 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.schema.SchemaPropertyChangeValidator;
@@ -49,7 +50,7 @@ public class SchemaExclusiveMaximumChangeInRequestValidator 
extends SchemaProper
 
   @Override
   protected String getMessage(Boolean leftProperty, Boolean rightProperty) {
-    return "仅允许true->false的修改";
+    return DiffViolationMessages.TRUE_TO_FALSE;
   }
 
   @Override
diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaExclusiveMinimumChangeInRequestValidator.java
 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaExclusiveMinimumChangeInRequestValidator.java
index 5481f59..fb4f343 100755
--- 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaExclusiveMinimumChangeInRequestValidator.java
+++ 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaExclusiveMinimumChangeInRequestValidator.java
@@ -17,6 +17,7 @@
 
 package 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.schema.request;
 
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.DiffViolationMessages;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffValidationContext;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.util.ChangeRangeCheckUtils;
 import 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.schema.SchemaPropertyChangeValidator;
@@ -47,7 +48,7 @@ public class SchemaExclusiveMinimumChangeInRequestValidator 
extends SchemaProper
 
   @Override
   protected String getMessage(Boolean leftProperty, Boolean rightProperty) {
-    return "仅允许true->false的修改";
+    return DiffViolationMessages.TRUE_TO_FALSE;
   }
 
   @Override
diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaMultipleOfChangeInRequestValidator.java
 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaMultipleOfChangeInRequestValidator.java
index 1a9e619..f05af70 100755
--- 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaMultipleOfChangeInRequestValidator.java
+++ 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaMultipleOfChangeInRequestValidator.java
@@ -28,6 +28,8 @@ import static 
org.apache.servicecomb.toolkit.oasv.diffvalidation.util.OasDiffVal
 
 public class SchemaMultipleOfChangeInRequestValidator extends 
SchemaPropertyChangeValidator<BigDecimal> {
 
+  public static final String VIOLATION_MESSAGE = "right value is neither equal 
to left value nor a factor of left value";
+
   @Override
   protected BigDecimal getProperty(Schema schema) {
     return schema.getMultipleOf();
@@ -40,7 +42,7 @@ public class SchemaMultipleOfChangeInRequestValidator extends 
SchemaPropertyChan
 
   @Override
   protected String getMessage(BigDecimal leftProperty, BigDecimal 
rightProperty) {
-    return "新值必须==旧值或是旧值的因子";
+    return VIOLATION_MESSAGE;
   }
 
   @Override
diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaNullableChangeInRequestValidator.java
 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaNullableChangeInRequestValidator.java
index abebca1..2ab676f 100755
--- 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaNullableChangeInRequestValidator.java
+++ 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaNullableChangeInRequestValidator.java
@@ -17,6 +17,7 @@
 
 package 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.schema.request;
 
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.DiffViolationMessages;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffValidationContext;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.util.ChangeRangeCheckUtils;
 import 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.schema.SchemaPropertyChangeValidator;
@@ -47,7 +48,7 @@ public class SchemaNullableChangeInRequestValidator extends 
SchemaPropertyChange
 
   @Override
   protected String getMessage(Boolean leftProperty, Boolean rightProperty) {
-    return "仅允许false->true的修改";
+    return DiffViolationMessages.FALSE_TO_TRUE;
   }
 
   @Override
diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaRequiredChangeInRequestValidator.java
 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaRequiredChangeInRequestValidator.java
index c090054..004d1e8 100755
--- 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaRequiredChangeInRequestValidator.java
+++ 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaRequiredChangeInRequestValidator.java
@@ -30,6 +30,8 @@ import static java.util.Collections.emptyList;
 
 public class SchemaRequiredChangeInRequestValidator extends 
SchemaPropertyChangeValidator<List<String>> {
 
+  public static final String VIOLATION_MESSAGE = "add required fields is not 
allowed on right side";
+
   @Override
   protected List<String> getProperty(Schema schema) {
     return ObjectUtils.defaultIfNull(schema.getRequired(), emptyList());
@@ -47,7 +49,7 @@ public class SchemaRequiredChangeInRequestValidator extends 
SchemaPropertyChange
 
   @Override
   protected String getMessage(List<String> leftProperty, List<String> 
rightProperty) {
-    return "不允许新增required字段";
+    return VIOLATION_MESSAGE;
   }
 
   @Override
diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaUniqueItemsChangeInRequestValidator.java
 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaUniqueItemsChangeInRequestValidator.java
index de69be0..7ba71f2 100755
--- 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaUniqueItemsChangeInRequestValidator.java
+++ 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaUniqueItemsChangeInRequestValidator.java
@@ -17,6 +17,7 @@
 
 package 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.schema.request;
 
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.DiffViolationMessages;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffValidationContext;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.util.ChangeRangeCheckUtils;
 import 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.schema.SchemaPropertyChangeValidator;
@@ -46,7 +47,7 @@ public class SchemaUniqueItemsChangeInRequestValidator 
extends SchemaPropertyCha
 
   @Override
   protected String getMessage(Boolean leftProperty, Boolean rightProperty) {
-    return "仅允许true->false的修改";
+    return DiffViolationMessages.TRUE_TO_FALSE;
   }
 
   @Override
diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaEnumChangeInResponseValidator.java
 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaEnumChangeInResponseValidator.java
index 0656f83..c5c9de6 100755
--- 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaEnumChangeInResponseValidator.java
+++ 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaEnumChangeInResponseValidator.java
@@ -29,6 +29,8 @@ import static java.util.Collections.emptyList;
 
 public class SchemaEnumChangeInResponseValidator extends 
SchemaPropertyChangeValidator<List> {
 
+  public static final String VIOLATION_MESSAGE = "add enum on right side is 
not allowed";
+
   @Override
   protected List getProperty(Schema schema) {
     return ObjectUtils.defaultIfNull(schema.getEnum(), emptyList());
@@ -46,7 +48,7 @@ public class SchemaEnumChangeInResponseValidator extends 
SchemaPropertyChangeVal
 
   @Override
   protected String getMessage(List leftProperty, List rightProperty) {
-    return "不允许新增enum";
+    return VIOLATION_MESSAGE;
   }
 
   @Override
diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaExclusiveMaximumChangeInResponseValidator.java
 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaExclusiveMaximumChangeInResponseValidator.java
index 5c0084d..217d950 100755
--- 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaExclusiveMaximumChangeInResponseValidator.java
+++ 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaExclusiveMaximumChangeInResponseValidator.java
@@ -17,6 +17,7 @@
 
 package 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.schema.response;
 
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.DiffViolationMessages;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffValidationContext;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.util.ChangeRangeCheckUtils;
 import 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.schema.SchemaPropertyChangeValidator;
@@ -48,7 +49,7 @@ public class SchemaExclusiveMaximumChangeInResponseValidator 
extends SchemaPrope
 
   @Override
   protected String getMessage(Boolean leftProperty, Boolean rightProperty) {
-    return "仅允许false->true的修改";
+    return DiffViolationMessages.FALSE_TO_TRUE;
   }
 
   @Override
diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaExclusiveMinimumChangeInResponseValidator.java
 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaExclusiveMinimumChangeInResponseValidator.java
index 25ce187..d34ffaf 100755
--- 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaExclusiveMinimumChangeInResponseValidator.java
+++ 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaExclusiveMinimumChangeInResponseValidator.java
@@ -17,6 +17,7 @@
 
 package 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.schema.response;
 
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.DiffViolationMessages;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffValidationContext;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.util.ChangeRangeCheckUtils;
 import 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.schema.SchemaPropertyChangeValidator;
@@ -48,7 +49,7 @@ public class SchemaExclusiveMinimumChangeInResponseValidator 
extends SchemaPrope
 
   @Override
   protected String getMessage(Boolean leftProperty, Boolean rightProperty) {
-    return "仅允许false->true的修改";
+    return DiffViolationMessages.FALSE_TO_TRUE;
   }
 
   @Override
diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaMultipleOfChangeInResponseValidator.java
 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaMultipleOfChangeInResponseValidator.java
index 0614ecb..28564b8 100755
--- 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaMultipleOfChangeInResponseValidator.java
+++ 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaMultipleOfChangeInResponseValidator.java
@@ -27,6 +27,8 @@ import static 
org.apache.servicecomb.toolkit.oasv.diffvalidation.util.OasDiffVal
 
 public class SchemaMultipleOfChangeInResponseValidator extends 
SchemaPropertyChangeValidator<BigDecimal> {
 
+  public static final String VIOLATION_MESSAGE = "right value is neither equal 
to left value nor multiple of left value";
+
   @Override
   protected BigDecimal getProperty(Schema schema) {
     return schema.getMultipleOf();
@@ -39,7 +41,7 @@ public class SchemaMultipleOfChangeInResponseValidator 
extends SchemaPropertyCha
 
   @Override
   protected String getMessage(BigDecimal leftProperty, BigDecimal 
rightProperty) {
-    return "新值必须==旧值或是旧值的倍数";
+    return VIOLATION_MESSAGE;
   }
 
   @Override
diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaNullableChangeInResponseValidator.java
 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaNullableChangeInResponseValidator.java
index 2c69efb..6c52d83 100755
--- 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaNullableChangeInResponseValidator.java
+++ 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaNullableChangeInResponseValidator.java
@@ -17,6 +17,7 @@
 
 package 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.schema.response;
 
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.DiffViolationMessages;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffValidationContext;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.util.ChangeRangeCheckUtils;
 import 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.schema.SchemaPropertyChangeValidator;
@@ -46,7 +47,7 @@ public class SchemaNullableChangeInResponseValidator extends 
SchemaPropertyChang
 
   @Override
   protected String getMessage(Boolean leftProperty, Boolean rightProperty) {
-    return "仅允许true->false的修改";
+    return DiffViolationMessages.TRUE_TO_FALSE;
   }
 
   @Override
diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaRequiredChangeInResponseValidator.java
 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaRequiredChangeInResponseValidator.java
index 7f64f45..987742d 100755
--- 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaRequiredChangeInResponseValidator.java
+++ 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaRequiredChangeInResponseValidator.java
@@ -29,6 +29,8 @@ import static java.util.Collections.emptyList;
 
 public class SchemaRequiredChangeInResponseValidator extends 
SchemaPropertyChangeValidator<List<String>> {
 
+  public static final String VIOLATION_MESSAGE = "delete required fields is 
not allowed on right side";
+
   @Override
   protected List<String> getProperty(Schema schema) {
     return ObjectUtils.defaultIfNull(schema.getRequired(), emptyList());
@@ -46,7 +48,7 @@ public class SchemaRequiredChangeInResponseValidator extends 
SchemaPropertyChang
 
   @Override
   protected String getMessage(List<String> leftProperty, List<String> 
rightProperty) {
-    return "不允许删除required字段";
+    return SchemaRequiredChangeInResponseValidator.VIOLATION_MESSAGE;
   }
 
   @Override
diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaUniqueItemsChangeInResponseValidator.java
 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaUniqueItemsChangeInResponseValidator.java
index 372dae7..946668f 100755
--- 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaUniqueItemsChangeInResponseValidator.java
+++ 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaUniqueItemsChangeInResponseValidator.java
@@ -17,6 +17,7 @@
 
 package 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.schema.response;
 
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.DiffViolationMessages;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffValidationContext;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.util.ChangeRangeCheckUtils;
 import 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.schema.SchemaPropertyChangeValidator;
@@ -45,7 +46,7 @@ public class SchemaUniqueItemsChangeInResponseValidator 
extends SchemaPropertyCh
 
   @Override
   protected String getMessage(Boolean leftProperty, Boolean rightProperty) {
-    return "仅允许false->true的修改";
+    return DiffViolationMessages.FALSE_TO_TRUE;
   }
 
   @Override
diff --git 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/encoding/EncodingAllowedReservedChangeDiffValidatorTest.java
 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/encoding/EncodingAllowedReservedChangeDiffValidatorTest.java
index e0e7e51..9fe0a75 100755
--- 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/encoding/EncodingAllowedReservedChangeDiffValidatorTest.java
+++ 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/encoding/EncodingAllowedReservedChangeDiffValidatorTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.servicecomb.toolkit.oasv.compatibility.validators.encoding;
 
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.DiffViolationMessages;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.EncodingDiffValidator;
 import org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffViolation;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.config.OasDiffValidatorsSkeletonConfiguration;
@@ -47,7 +48,7 @@ public class EncodingAllowedReservedChangeDiffValidatorTest 
extends OasCompatibi
     assertThat(violations)
       .containsExactlyInAnyOrder(
         createViolation(
-          "仅允许false->true的修改",
+          DiffViolationMessages.FALSE_TO_TRUE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
diff --git 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterAddDiffValidatorTest.java
 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterAddDiffValidatorTest.java
index 0c9c9aa..0182be1 100755
--- 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterAddDiffValidatorTest.java
+++ 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterAddDiffValidatorTest.java
@@ -32,6 +32,7 @@ import org.springframework.test.context.ContextConfiguration;
 import java.util.List;
 
 import static org.apache.servicecomb.toolkit.oasv.common.OasObjectType.*;
+import static 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.parameter.ParameterAddDiffValidator.VIOLATION_MESSAGE;
 import static org.assertj.core.api.Assertions.assertThat;
 
 @ContextConfiguration(classes = 
ParameterAddDiffValidatorTest.TestConfiguration.class)
@@ -47,7 +48,7 @@ public class ParameterAddDiffValidatorTest extends 
OasCompatibilityTestBase {
     assertThat(violations)
       .containsExactlyInAnyOrder(
         createViolationRight(
-          "[name=bar,in=query]:仅允许新增required=false的parameter",
+          "[name=bar,in=query]:" + VIOLATION_MESSAGE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
diff --git 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterAllowEmptyValueChangeDiffValidatorTest.java
 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterAllowEmptyValueChangeDiffValidatorTest.java
index e16caa0..45d80b0 100755
--- 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterAllowEmptyValueChangeDiffValidatorTest.java
+++ 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterAllowEmptyValueChangeDiffValidatorTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.servicecomb.toolkit.oasv.compatibility.validators.parameter;
 
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.DiffViolationMessages;
 import org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffViolation;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.ParameterDiffValidator;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.config.OasDiffValidatorsSkeletonConfiguration;
@@ -47,7 +48,7 @@ public class ParameterAllowEmptyValueChangeDiffValidatorTest 
extends OasCompatib
     assertThat(violations)
       .containsExactlyInAnyOrder(
         createViolation(
-          "[name=limit4,in=query]:仅允许false->true的修改",
+          "[name=limit4,in=query]:" + DiffViolationMessages.FALSE_TO_TRUE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
diff --git 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterAllowReservedChangeDiffValidatorTest.java
 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterAllowReservedChangeDiffValidatorTest.java
index 96f2a52..70b82a8 100755
--- 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterAllowReservedChangeDiffValidatorTest.java
+++ 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterAllowReservedChangeDiffValidatorTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.servicecomb.toolkit.oasv.compatibility.validators.parameter;
 
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.DiffViolationMessages;
 import org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffViolation;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.ParameterDiffValidator;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.config.OasDiffValidatorsSkeletonConfiguration;
@@ -41,10 +42,7 @@ public class ParameterAllowReservedChangeDiffValidatorTest 
extends OasCompatibil
   public void validate() {
   }
 
-  /**
-   * TODO swagger parser对于allowReserved字段的反序列化存在问题,先跳过此测试
-   * https://github.com/swagger-api/swagger-parser/issues/1108
-   */
+  @Test
   public void validateBroken() {
     OpenAPI leftOpenAPI = 
loadRelative("petstore-parameter-allow-reserved-a.yaml");
     System.out.println(leftOpenAPI.toString());
@@ -55,7 +53,7 @@ public class ParameterAllowReservedChangeDiffValidatorTest 
extends OasCompatibil
     assertThat(violations)
       .containsExactlyInAnyOrder(
         createViolation(
-          "[name=limit4,in=query]:仅允许false->true的修改",
+          "[name=limit4,in=query]:" + DiffViolationMessages.FALSE_TO_TRUE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
diff --git 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterRequiredChangeDiffValidatorTest.java
 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterRequiredChangeDiffValidatorTest.java
index b6535ab..7273321 100755
--- 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterRequiredChangeDiffValidatorTest.java
+++ 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/parameter/ParameterRequiredChangeDiffValidatorTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.servicecomb.toolkit.oasv.compatibility.validators.parameter;
 
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.DiffViolationMessages;
 import org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffViolation;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.ParameterDiffValidator;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.config.OasDiffValidatorsSkeletonConfiguration;
@@ -47,7 +48,7 @@ public class ParameterRequiredChangeDiffValidatorTest extends 
OasCompatibilityTe
     assertThat(violations)
       .containsExactlyInAnyOrder(
         createViolation(
-          "[name=limit,in=query]:仅允许true->false的修改",
+          "[name=limit,in=query]:" + DiffViolationMessages.TRUE_TO_FALSE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
diff --git 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/requestbody/RequestBodyRequiredChangeDiffValidatorTest.java
 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/requestbody/RequestBodyRequiredChangeDiffValidatorTest.java
index a16bb42..f8d2ea4 100755
--- 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/requestbody/RequestBodyRequiredChangeDiffValidatorTest.java
+++ 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/requestbody/RequestBodyRequiredChangeDiffValidatorTest.java
@@ -17,6 +17,7 @@
 
 package 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.requestbody;
 
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.DiffViolationMessages;
 import org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffViolation;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.RequestBodyDiffValidator;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.config.OasDiffValidatorsSkeletonConfiguration;
@@ -47,7 +48,7 @@ public class RequestBodyRequiredChangeDiffValidatorTest 
extends OasCompatibility
     assertThat(violations)
       .containsExactlyInAnyOrder(
         createViolationBoth(
-          "仅允许true->false的修改",
+          DiffViolationMessages.TRUE_TO_FALSE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
diff --git 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaEnumChangeInRequestValidatorTest.java
 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaEnumChangeInRequestValidatorTest.java
index 67abd6d..b5e3fb0 100755
--- 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaEnumChangeInRequestValidatorTest.java
+++ 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaEnumChangeInRequestValidatorTest.java
@@ -17,22 +17,28 @@
 
 package 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.schema.request;
 
+import static 
org.apache.servicecomb.toolkit.oasv.common.OasObjectType.MEDIA_TYPE;
+import static 
org.apache.servicecomb.toolkit.oasv.common.OasObjectType.OPERATION;
+import static 
org.apache.servicecomb.toolkit.oasv.common.OasObjectType.PARAMETER;
+import static org.apache.servicecomb.toolkit.oasv.common.OasObjectType.PATHS;
+import static 
org.apache.servicecomb.toolkit.oasv.common.OasObjectType.PATH_ITEM;
+import static 
org.apache.servicecomb.toolkit.oasv.common.OasObjectType.REQUEST_BODY;
+import static org.apache.servicecomb.toolkit.oasv.common.OasObjectType.SCHEMA;
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.util.List;
+
+import 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.OasCompatibilityTestBase;
 import org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffViolation;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.SchemaCompareValidator;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.config.OasDiffValidatorsSkeletonConfiguration;
-
-import 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.OasCompatibilityTestBase;
-import io.swagger.v3.oas.models.OpenAPI;
 import org.junit.Test;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Import;
 import org.springframework.test.context.ContextConfiguration;
 
-import java.util.List;
-
-import static org.apache.servicecomb.toolkit.oasv.common.OasObjectType.*;
-import static org.assertj.core.api.Assertions.assertThat;
+import io.swagger.v3.oas.models.OpenAPI;
 
 @ContextConfiguration(classes = 
SchemaEnumChangeInRequestValidatorTest.TestConfiguration.class)
 public class SchemaEnumChangeInRequestValidatorTest extends 
OasCompatibilityTestBase {
@@ -47,7 +53,7 @@ public class SchemaEnumChangeInRequestValidatorTest extends 
OasCompatibilityTest
     assertThat(violations)
       .containsExactlyInAnyOrder(
         createViolationBoth(
-          "不允许删除enum",
+            SchemaEnumChangeInRequestValidator.VIOLATION_MESSAGE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
@@ -59,7 +65,7 @@ public class SchemaEnumChangeInRequestValidatorTest extends 
OasCompatibilityTest
           }
         ),
         createViolationBoth(
-          "不允许删除enum",
+            SchemaEnumChangeInRequestValidator.VIOLATION_MESSAGE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
diff --git 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaExclusiveMaximumChangeInRequestValidatorTest.java
 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaExclusiveMaximumChangeInRequestValidatorTest.java
index 8d0ec1a..60bd30a 100755
--- 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaExclusiveMaximumChangeInRequestValidatorTest.java
+++ 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaExclusiveMaximumChangeInRequestValidatorTest.java
@@ -17,6 +17,7 @@
 
 package 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.schema.request;
 
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.DiffViolationMessages;
 import org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffViolation;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.SchemaCompareValidator;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.config.OasDiffValidatorsSkeletonConfiguration;
@@ -47,7 +48,7 @@ public class 
SchemaExclusiveMaximumChangeInRequestValidatorTest extends OasCompa
     assertThat(violations)
       .containsExactlyInAnyOrder(
         createViolationBoth(
-          "仅允许true->false的修改",
+          DiffViolationMessages.TRUE_TO_FALSE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
@@ -59,7 +60,7 @@ public class 
SchemaExclusiveMaximumChangeInRequestValidatorTest extends OasCompa
           }
         ),
         createViolationBoth(
-          "仅允许true->false的修改",
+          DiffViolationMessages.TRUE_TO_FALSE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
diff --git 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaExclusiveMinimumChangeInRequestValidatorTest.java
 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaExclusiveMinimumChangeInRequestValidatorTest.java
index 2896312..09fc099 100755
--- 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaExclusiveMinimumChangeInRequestValidatorTest.java
+++ 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaExclusiveMinimumChangeInRequestValidatorTest.java
@@ -17,6 +17,7 @@
 
 package 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.schema.request;
 
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.DiffViolationMessages;
 import org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffViolation;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.SchemaCompareValidator;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.config.OasDiffValidatorsSkeletonConfiguration;
@@ -47,7 +48,7 @@ public class 
SchemaExclusiveMinimumChangeInRequestValidatorTest extends OasCompa
     assertThat(violations)
       .containsExactlyInAnyOrder(
         createViolationBoth(
-          "仅允许true->false的修改",
+          DiffViolationMessages.TRUE_TO_FALSE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
@@ -59,7 +60,7 @@ public class 
SchemaExclusiveMinimumChangeInRequestValidatorTest extends OasCompa
           }
         ),
         createViolationBoth(
-          "仅允许true->false的修改",
+          DiffViolationMessages.TRUE_TO_FALSE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
diff --git 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaMultipleOfChangeInRequestValidatorTest.java
 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaMultipleOfChangeInRequestValidatorTest.java
index 9bae7c6..8d5fdd4 100755
--- 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaMultipleOfChangeInRequestValidatorTest.java
+++ 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaMultipleOfChangeInRequestValidatorTest.java
@@ -47,7 +47,7 @@ public class SchemaMultipleOfChangeInRequestValidatorTest 
extends OasCompatibili
     assertThat(violations)
       .containsExactlyInAnyOrder(
         createViolationBoth(
-          "新值必须==旧值或是旧值的因子",
+            SchemaMultipleOfChangeInRequestValidator.VIOLATION_MESSAGE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
@@ -59,7 +59,7 @@ public class SchemaMultipleOfChangeInRequestValidatorTest 
extends OasCompatibili
           }
         ),
         createViolationBoth(
-          "新值必须==旧值或是旧值的因子",
+            SchemaMultipleOfChangeInRequestValidator.VIOLATION_MESSAGE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
diff --git 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaNullableChangeInRequestValidatorTest.java
 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaNullableChangeInRequestValidatorTest.java
index da437cb..d575194 100755
--- 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaNullableChangeInRequestValidatorTest.java
+++ 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaNullableChangeInRequestValidatorTest.java
@@ -17,6 +17,7 @@
 
 package 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.schema.request;
 
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.DiffViolationMessages;
 import org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffViolation;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.SchemaCompareValidator;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.config.OasDiffValidatorsSkeletonConfiguration;
@@ -47,7 +48,7 @@ public class SchemaNullableChangeInRequestValidatorTest 
extends OasCompatibility
     assertThat(violations)
       .containsExactlyInAnyOrder(
         createViolationBoth(
-          "仅允许false->true的修改",
+          DiffViolationMessages.FALSE_TO_TRUE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
@@ -59,7 +60,7 @@ public class SchemaNullableChangeInRequestValidatorTest 
extends OasCompatibility
           }
         ),
         createViolationBoth(
-          "仅允许false->true的修改",
+          DiffViolationMessages.FALSE_TO_TRUE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
diff --git 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaRequiredChangeInRequestValidatorTest.java
 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaRequiredChangeInRequestValidatorTest.java
index ab6974b..882eea9 100755
--- 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaRequiredChangeInRequestValidatorTest.java
+++ 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaRequiredChangeInRequestValidatorTest.java
@@ -47,7 +47,7 @@ public class SchemaRequiredChangeInRequestValidatorTest 
extends OasCompatibility
     assertThat(violations)
       .containsExactlyInAnyOrder(
         createViolationBoth(
-          "不允许新增required字段",
+            SchemaRequiredChangeInRequestValidator.VIOLATION_MESSAGE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
@@ -58,7 +58,7 @@ public class SchemaRequiredChangeInRequestValidatorTest 
extends OasCompatibility
           }
         ),
         createViolationBoth(
-          "不允许新增required字段",
+            SchemaRequiredChangeInRequestValidator.VIOLATION_MESSAGE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
diff --git 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaTypeFormatChangeInRequestValidatorTest.java
 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaTypeFormatChangeInRequestValidatorTest.java
index f04d4d5..a93d5e2 100755
--- 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaTypeFormatChangeInRequestValidatorTest.java
+++ 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaTypeFormatChangeInRequestValidatorTest.java
@@ -47,7 +47,7 @@ public class SchemaTypeFormatChangeInRequestValidatorTest 
extends OasCompatibili
     assertThat(violations)
       .containsExactlyInAnyOrder(
         createViolationBoth(
-          "不允许(type=integer,format=null)->(type=string,format=null)的修改",
+          "the change (type=integer,format=null)->(type=string,format=null) is 
not allowed",
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
@@ -59,7 +59,7 @@ public class SchemaTypeFormatChangeInRequestValidatorTest 
extends OasCompatibili
         ),
 
         createViolationBoth(
-          "不允许(type=integer,format=null)->(type=string,format=null)的修改",
+          "the change (type=integer,format=null)->(type=string,format=null) is 
not allowed",
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
diff --git 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaUniqueItemsChangeInRequestValidatorTest.java
 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaUniqueItemsChangeInRequestValidatorTest.java
index 4356b44..9c74e37 100755
--- 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaUniqueItemsChangeInRequestValidatorTest.java
+++ 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/request/SchemaUniqueItemsChangeInRequestValidatorTest.java
@@ -17,6 +17,7 @@
 
 package 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.schema.request;
 
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.DiffViolationMessages;
 import org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffViolation;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.SchemaCompareValidator;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.config.OasDiffValidatorsSkeletonConfiguration;
@@ -47,7 +48,7 @@ public class SchemaUniqueItemsChangeInRequestValidatorTest 
extends OasCompatibil
     assertThat(violations)
       .containsExactlyInAnyOrder(
         createViolationBoth(
-          "仅允许true->false的修改",
+          DiffViolationMessages.TRUE_TO_FALSE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
@@ -59,7 +60,7 @@ public class SchemaUniqueItemsChangeInRequestValidatorTest 
extends OasCompatibil
           }
         ),
         createViolationBoth(
-          "仅允许true->false的修改",
+          DiffViolationMessages.TRUE_TO_FALSE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
diff --git 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaEnumChangeInResponseValidatorTest.java
 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaEnumChangeInResponseValidatorTest.java
index 6b9c193..e28ebe5 100755
--- 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaEnumChangeInResponseValidatorTest.java
+++ 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaEnumChangeInResponseValidatorTest.java
@@ -47,7 +47,7 @@ public class SchemaEnumChangeInResponseValidatorTest extends 
OasCompatibilityTes
     assertThat(violations)
       .containsExactlyInAnyOrder(
         createViolationBoth(
-          "不允许新增enum",
+            SchemaEnumChangeInResponseValidator.VIOLATION_MESSAGE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
diff --git 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaExclusiveMaximumChangeInResponseValidatorTest.java
 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaExclusiveMaximumChangeInResponseValidatorTest.java
index cb7ebec..3d86716 100755
--- 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaExclusiveMaximumChangeInResponseValidatorTest.java
+++ 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaExclusiveMaximumChangeInResponseValidatorTest.java
@@ -17,6 +17,7 @@
 
 package 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.schema.response;
 
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.DiffViolationMessages;
 import org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffViolation;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.SchemaCompareValidator;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.config.OasDiffValidatorsSkeletonConfiguration;
@@ -47,7 +48,7 @@ public class 
SchemaExclusiveMaximumChangeInResponseValidatorTest extends OasComp
     assertThat(violations)
       .containsExactlyInAnyOrder(
         createViolationBoth(
-          "仅允许false->true的修改",
+          DiffViolationMessages.FALSE_TO_TRUE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
diff --git 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaExclusiveMinimumChangeInResponseValidatorTest.java
 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaExclusiveMinimumChangeInResponseValidatorTest.java
index 93e7d0e..cc91dfc 100755
--- 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaExclusiveMinimumChangeInResponseValidatorTest.java
+++ 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaExclusiveMinimumChangeInResponseValidatorTest.java
@@ -17,6 +17,7 @@
 
 package 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.schema.response;
 
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.DiffViolationMessages;
 import org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffViolation;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.SchemaCompareValidator;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.config.OasDiffValidatorsSkeletonConfiguration;
@@ -47,7 +48,7 @@ public class 
SchemaExclusiveMinimumChangeInResponseValidatorTest extends OasComp
     assertThat(violations)
       .containsExactlyInAnyOrder(
         createViolationBoth(
-          "仅允许false->true的修改",
+          DiffViolationMessages.FALSE_TO_TRUE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
diff --git 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaMultipleOfChangeInResponseValidatorTest.java
 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaMultipleOfChangeInResponseValidatorTest.java
index fe3dd51..4dc8677 100755
--- 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaMultipleOfChangeInResponseValidatorTest.java
+++ 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaMultipleOfChangeInResponseValidatorTest.java
@@ -47,7 +47,7 @@ public class SchemaMultipleOfChangeInResponseValidatorTest 
extends OasCompatibil
     assertThat(violations)
       .containsExactlyInAnyOrder(
         createViolationBoth(
-          "新值必须==旧值或是旧值的倍数",
+            SchemaMultipleOfChangeInResponseValidator.VIOLATION_MESSAGE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
diff --git 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaNullableChangeInResponseValidatorTest.java
 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaNullableChangeInResponseValidatorTest.java
index c90a165..a979da2 100755
--- 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaNullableChangeInResponseValidatorTest.java
+++ 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaNullableChangeInResponseValidatorTest.java
@@ -17,6 +17,7 @@
 
 package 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.schema.response;
 
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.DiffViolationMessages;
 import org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffViolation;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.SchemaCompareValidator;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.config.OasDiffValidatorsSkeletonConfiguration;
@@ -47,7 +48,7 @@ public class SchemaNullableChangeInResponseValidatorTest 
extends OasCompatibilit
     assertThat(violations)
       .containsExactlyInAnyOrder(
         createViolationBoth(
-          "仅允许true->false的修改",
+          DiffViolationMessages.TRUE_TO_FALSE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
diff --git 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaRequiredChangeInResponseValidatorTest.java
 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaRequiredChangeInResponseValidatorTest.java
index fbca321..cb88149 100755
--- 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaRequiredChangeInResponseValidatorTest.java
+++ 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaRequiredChangeInResponseValidatorTest.java
@@ -47,7 +47,7 @@ public class SchemaRequiredChangeInResponseValidatorTest 
extends OasCompatibilit
     assertThat(violations)
       .containsExactlyInAnyOrder(
         createViolationBoth(
-          "不允许删除required字段",
+            SchemaRequiredChangeInResponseValidator.VIOLATION_MESSAGE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
diff --git 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaTypeFormatChangeInResponseValidatorTest.java
 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaTypeFormatChangeInResponseValidatorTest.java
index 9ad950f..5105a75 100755
--- 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaTypeFormatChangeInResponseValidatorTest.java
+++ 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaTypeFormatChangeInResponseValidatorTest.java
@@ -47,7 +47,7 @@ public class SchemaTypeFormatChangeInResponseValidatorTest 
extends OasCompatibil
     assertThat(violations)
       .containsExactlyInAnyOrder(
         createViolationBoth(
-          "不允许(type=integer,format=int32)->(type=integer,format=int64)的修改",
+          "the change (type=integer,format=int32)->(type=integer,format=int64) 
is not allowed",
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
diff --git 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaUniqueItemsChangeInResponseValidatorTest.java
 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaUniqueItemsChangeInResponseValidatorTest.java
index 12f0fe8..96ef083 100755
--- 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaUniqueItemsChangeInResponseValidatorTest.java
+++ 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/schema/response/SchemaUniqueItemsChangeInResponseValidatorTest.java
@@ -17,6 +17,7 @@
 
 package 
org.apache.servicecomb.toolkit.oasv.compatibility.validators.schema.response;
 
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.DiffViolationMessages;
 import org.apache.servicecomb.toolkit.oasv.diffvalidation.api.OasDiffViolation;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.SchemaCompareValidator;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.config.OasDiffValidatorsSkeletonConfiguration;
@@ -47,7 +48,7 @@ public class SchemaUniqueItemsChangeInResponseValidatorTest 
extends OasCompatibi
     assertThat(violations)
       .containsExactlyInAnyOrder(
         createViolationBoth(
-          "仅允许false->true的修改",
+          DiffViolationMessages.FALSE_TO_TRUE,
           new Object[] {
             "paths", PATHS,
             "/pets", PATH_ITEM,
diff --git 
a/oas-validator/oas-validator-core/src/main/java/org/apache/servicecomb/toolkit/oasv/diffvalidation/api/DiffViolationMessages.java
 
b/oas-validator/oas-validator-core/src/main/java/org/apache/servicecomb/toolkit/oasv/diffvalidation/api/DiffViolationMessages.java
index 167a1cc..f739c87 100755
--- 
a/oas-validator/oas-validator-core/src/main/java/org/apache/servicecomb/toolkit/oasv/diffvalidation/api/DiffViolationMessages.java
+++ 
b/oas-validator/oas-validator-core/src/main/java/org/apache/servicecomb/toolkit/oasv/diffvalidation/api/DiffViolationMessages.java
@@ -19,11 +19,14 @@ package 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api;
 
 public abstract class DiffViolationMessages {
 
-  public static final String OP_DEL_FORBIDDEN = "不允许在新版本中删除";
-  public static final String OP_ADD_FORBIDDEN = "不允许在新版本中添加";
+  public static final String OP_DEL_FORBIDDEN = "deletion is no allowed on 
right side";
+  public static final String OP_ADD_FORBIDDEN = "adding is not allowed on 
right side";
 
-  public static final String NEW_NOT_EQ_OLD = "新旧值不一致";
-  public static final String NEW_NOT_GTE_OLD = "新值必须>=旧值";
-  public static final String NEW_NOT_LTE_OLD = "新值必须<=旧值";
+  public static final String NEW_NOT_EQ_OLD = "not equal on both side";
+  public static final String NEW_NOT_GTE_OLD = "left side must be >= right 
side";
+  public static final String NEW_NOT_LTE_OLD = "left side must be <= right 
side";
+
+  public static final String FALSE_TO_TRUE = "only false->true is allowed";
+  public static final String TRUE_TO_FALSE = "only true->false is allowed";
 
 }
diff --git 
a/oas-validator/oas-validator-core/src/test/java/org/apache/servicecomb/toolkit/oasv/common/OasObjectPropertyLocationTest.java
 
b/oas-validator/oas-validator-core/src/test/java/org/apache/servicecomb/toolkit/oasv/common/OasObjectPropertyLocationTest.java
index ac5bcd5..1502a98 100644
--- 
a/oas-validator/oas-validator-core/src/test/java/org/apache/servicecomb/toolkit/oasv/common/OasObjectPropertyLocationTest.java
+++ 
b/oas-validator/oas-validator-core/src/test/java/org/apache/servicecomb/toolkit/oasv/common/OasObjectPropertyLocationTest.java
@@ -1,3 +1,20 @@
+/*
+ * 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.servicecomb.toolkit.oasv.common;
 
 import static org.junit.Assert.assertEquals;
diff --git a/oas-validator/pom.xml b/oas-validator/pom.xml
index 1546299..cc48467 100644
--- a/oas-validator/pom.xml
+++ b/oas-validator/pom.xml
@@ -39,7 +39,7 @@
     <maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
     <maven.surefire.version>3.0.0-M3</maven.surefire.version>
 
-    <swagger-parser.version>2.0.12</swagger-parser.version>
+    <swagger-parser.version>2.0.15</swagger-parser.version>
     <commons-collections4.version>4.3</commons-collections4.version>
     <commons-io.version>2.6</commons-io.version>
     <spring-boot.version>2.1.4.RELEASE</spring-boot.version>

Reply via email to