[GitHub] [servicecomb-toolkit] WillemJiang commented on a change in pull request #43: SCB-1555 Integrate oas-validator compability check to cli

2019-11-07 Thread GitBox
WillemJiang commented on a change in pull request #43: SCB-1555 Integrate 
oas-validator compability check to cli
URL: https://github.com/apache/servicecomb-toolkit/pull/43#discussion_r343521125
 
 

 ##
 File path: 
oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/factory/DefaultExampleDiffValidatorFactory.java
 ##
 @@ -0,0 +1,34 @@
+/*
+ * 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.compatibility.factory;
+
+import java.util.Collections;
+import java.util.List;
+
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.ExampleDiffValidator;
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.factory.ExampleDiffValidatorFactory;
+import org.springframework.stereotype.Component;
+
+@Component
+public class DefaultExampleDiffValidatorFactory implements 
ExampleDiffValidatorFactory {
 
 Review comment:
   Why do we need a example diff validator?


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [servicecomb-toolkit] chanjarster commented on a change in pull request #43: SCB-1555 Integrate oas-validator compability check to cli

2019-11-07 Thread GitBox
chanjarster commented on a change in pull request #43: SCB-1555 Integrate 
oas-validator compability check to cli
URL: https://github.com/apache/servicecomb-toolkit/pull/43#discussion_r343534038
 
 

 ##
 File path: 
oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/factory/DefaultExampleDiffValidatorFactory.java
 ##
 @@ -0,0 +1,34 @@
+/*
+ * 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.compatibility.factory;
+
+import java.util.Collections;
+import java.util.List;
+
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.ExampleDiffValidator;
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.factory.ExampleDiffValidatorFactory;
+import org.springframework.stereotype.Component;
+
+@Component
+public class DefaultExampleDiffValidatorFactory implements 
ExampleDiffValidatorFactory {
 
 Review comment:
   Actually we don't need it, I just create corresponding validators for every 
openapi object


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [servicecomb-java-chassis] liubao68 merged pull request #1356: [SCB-1565] add a Java client of servicecomb-service-center

2019-11-07 Thread GitBox
liubao68 merged pull request #1356: [SCB-1565] add a Java client of 
servicecomb-service-center
URL: https://github.com/apache/servicecomb-java-chassis/pull/1356
 
 
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[servicecomb-java-chassis] branch master updated (4577b42 -> be1b0bb)

2019-11-07 Thread liubao
This is an automated email from the ASF dual-hosted git repository.

liubao pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git.


from 4577b42  modify project parameter naming
 add 643d06e  upload a java client of service-center
 add 486deaa  add sslCertification and some unitTests to 
service-center-client
 add 433c298  optimize code and naming
 add 7be46eb  optimize exception handling and log code
 add be1b0bb  normalized code format and optimizate code

No new revisions were added by this update.

Summary of changes:
 .../{kie-client => service-center-client}/pom.xml  |   9 +-
 .../service/center/client/ServiceCenterClient.java | 381 +
 .../center/client/ServiceCenterRawClient.java} | 388 +-
 .../service/center}/client/http/HttpRequest.java   |  94 ++---
 .../service/center}/client/http/HttpResponse.java  | 122 +++---
 .../service/center}/client/http/HttpTransport.java |  75 ++--
 .../center}/client/http/HttpTransportFactory.java  |  61 ++-
 .../center}/client/http/HttpTransportImpl.java | 239 +--
 .../service/center/client/http/TLSConfig.java  |  97 +
 .../center/client/http/TLSHttpsTransport.java  | 140 +++
 .../service/center/client/model}/BasePath.java |  90 ++--
 .../center/client/model}/DataCenterInfo.java   | 101 ++---
 .../service/center/client/model}/Framework.java|  83 ++--
 .../service/center/client/model}/HealthCheck.java  | 134 +++---
 .../center/client/model/HealthCheckMode.java   |  48 +--
 .../center/client/model/HeartbeatsRequest.java | 111 +++--
 .../center/client/model/InstancesRequest.java  |  88 ++--
 .../service/center/client/model}/Microservice.java | 453 ++---
 .../center/client/model/MicroserviceInstance.java  | 141 +++
 .../client/model}/MicroserviceInstanceStatus.java  |  57 ++-
 .../model/MicroserviceInstancesResponse.java   |  70 ++--
 .../center/client/model}/MicroserviceStatus.java   |  51 ++-
 .../center/client/model/MicroservicesResponse.java |  67 ++-
 .../center/client/HttpTransportImplTest.java}  |  18 +-
 .../center/client/ServiceCenterClientTest.java | 412 +++
 .../center/client/ServiceCenterRawClientTest.java} |  31 +-
 .../center/client/TLSHttpsTransportTest.java   |  43 +-
 .../src/test/resources/tls/client.p12  | Bin 0 -> 1605 bytes
 .../src/test/resources/tls/server.jks  | Bin 0 -> 577 bytes
 pom.xml|   1 +
 30 files changed, 2366 insertions(+), 1239 deletions(-)
 copy client/{kie-client => service-center-client}/pom.xml (93%)
 create mode 100755 
client/service-center-client/src/main/java/org/apache/servicecomb/service/center/client/ServiceCenterClient.java
 copy 
client/{kie-client/src/main/java/org/apache/servicecomb/kie/client/KieRawClient.java
 => 
service-center-client/src/main/java/org/apache/servicecomb/service/center/client/ServiceCenterRawClient.java}
 (65%)
 copy client/{kie-client/src/main/java/org/apache/servicecomb/kie => 
service-center-client/src/main/java/org/apache/servicecomb/service/center}/client/http/HttpRequest.java
 (92%)
 copy client/{kie-client/src/main/java/org/apache/servicecomb/kie => 
service-center-client/src/main/java/org/apache/servicecomb/service/center}/client/http/HttpResponse.java
 (92%)
 copy client/{kie-client/src/main/java/org/apache/servicecomb/kie => 
service-center-client/src/main/java/org/apache/servicecomb/service/center}/client/http/HttpTransport.java
 (79%)
 copy client/{kie-client/src/main/java/org/apache/servicecomb/kie => 
service-center-client/src/main/java/org/apache/servicecomb/service/center}/client/http/HttpTransportFactory.java
 (92%)
 copy client/{kie-client/src/main/java/org/apache/servicecomb/kie => 
service-center-client/src/main/java/org/apache/servicecomb/service/center}/client/http/HttpTransportImpl.java
 (82%)
 create mode 100755 
client/service-center-client/src/main/java/org/apache/servicecomb/service/center/client/http/TLSConfig.java
 create mode 100755 
client/service-center-client/src/main/java/org/apache/servicecomb/service/center/client/http/TLSHttpsTransport.java
 copy 
{service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/registry
 => 
client/service-center-client/src/main/java/org/apache/servicecomb/service/center/client/model}/BasePath.java
 (85%)
 mode change 100644 => 100755
 copy 
{service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/registry
 => 
client/service-center-client/src/main/java/org/apache/servicecomb/service/center/client/model}/DataCenterInfo.java
 (92%)
 mode change 100644 => 100755
 copy 
{service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/registry
 => 
client/service-center-client/src/main/java/org/apache/servicecomb/service/center/client/model}/Framework.java
 (91%)
 mode change 100644 => 100755
 copy 
{service-regis

[GitHub] [servicecomb-pack] coolbeevip commented on issue #588: 超時場景下 Failed to process grpc coordinate command

2019-11-07 Thread GitBox
coolbeevip commented on issue #588: 超時場景下 Failed to process grpc coordinate 
command
URL: 
https://github.com/apache/servicecomb-pack/issues/588#issuecomment-550989809
 
 
   你的cancel方法中sleep了10秒,但是你在 @Compensable 中声明了cancel方法5秒的调用超时


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [servicecomb-pack] whitemeng commented on issue #588: 超時場景下 Failed to process grpc coordinate command

2019-11-07 Thread GitBox
whitemeng commented on issue #588: 超時場景下 Failed to process grpc coordinate 
command
URL: 
https://github.com/apache/servicecomb-pack/issues/588#issuecomment-551000434
 
 
   > 你的cancel方法中sleep了10秒,但是你在 @Compensable 中声明了cancel方法5秒的调用超时
   對不起,我不太懂您的意思,能否再詳細說明一下,感謝 !
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [servicecomb-pack] whitemeng edited a comment on issue #588: 超時場景下 Failed to process grpc coordinate command

2019-11-07 Thread GitBox
whitemeng edited a comment on issue #588: 超時場景下 Failed to process grpc 
coordinate command
URL: 
https://github.com/apache/servicecomb-pack/issues/588#issuecomment-551000434
 
 
   > 你的cancel方法中sleep了10秒,但是你在 @Compensable 中声明了cancel方法5秒的调用超时
   
   對不起,我不太懂您的意思,能否再詳細說明一下,感謝 !


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [servicecomb-pack] coolbeevip commented on issue #588: 超時場景下 Failed to process grpc coordinate command

2019-11-07 Thread GitBox
coolbeevip commented on issue #588: 超時場景下 Failed to process grpc coordinate 
command
URL: 
https://github.com/apache/servicecomb-pack/issues/588#issuecomment-551006733
 
 
   > > 你的cancel方法中sleep了10秒,但是你在 @Compensable 中声明了cancel方法5秒的调用超时
   > 
   > 對不起,我不太懂您的意思,能否再詳細說明一下,感謝 !
   
   我又看了一下,也不太敢确定,你可以提供一下你自己服务端更详细的错误日志吗


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [servicecomb-toolkit] chanjarster commented on a change in pull request #43: SCB-1555 Integrate oas-validator compability check to cli

2019-11-07 Thread GitBox
chanjarster commented on a change in pull request #43: SCB-1555 Integrate 
oas-validator compability check to cli
URL: https://github.com/apache/servicecomb-toolkit/pull/43#discussion_r343534038
 
 

 ##
 File path: 
oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/factory/DefaultExampleDiffValidatorFactory.java
 ##
 @@ -0,0 +1,34 @@
+/*
+ * 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.compatibility.factory;
+
+import java.util.Collections;
+import java.util.List;
+
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.ExampleDiffValidator;
+import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.factory.ExampleDiffValidatorFactory;
+import org.springframework.stereotype.Component;
+
+@Component
+public class DefaultExampleDiffValidatorFactory implements 
ExampleDiffValidatorFactory {
 
 Review comment:
   Actually we don't need it, I just create corresponding validators for every 
openapi object. It's ok to remove it.


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


svn commit: r36663 - /release/servicecomb/servicecomb-service-center/1.3.0/

2019-11-07 Thread asifdxtreme
Author: asifdxtreme
Date: Thu Nov  7 10:51:51 2019
New Revision: 36663

Log:
Release ServiceComb Service-Center 1.0.0-M3

Added:
release/servicecomb/servicecomb-service-center/1.3.0/

release/servicecomb/servicecomb-service-center/1.3.0/apache-servicecomb-service-center-1.3.0-darwin-amd64.tar.gz
   (with props)

release/servicecomb/servicecomb-service-center/1.3.0/apache-servicecomb-service-center-1.3.0-darwin-amd64.tar.gz.asc
   (with props)

release/servicecomb/servicecomb-service-center/1.3.0/apache-servicecomb-service-center-1.3.0-darwin-amd64.tar.gz.sha512
   (with props)

release/servicecomb/servicecomb-service-center/1.3.0/apache-servicecomb-service-center-1.3.0-linux-amd64.tar.gz
   (with props)

release/servicecomb/servicecomb-service-center/1.3.0/apache-servicecomb-service-center-1.3.0-linux-amd64.tar.gz.asc
   (with props)

release/servicecomb/servicecomb-service-center/1.3.0/apache-servicecomb-service-center-1.3.0-linux-amd64.tar.gz.sha512
   (with props)

release/servicecomb/servicecomb-service-center/1.3.0/apache-servicecomb-service-center-1.3.0-src.zip
   (with props)

release/servicecomb/servicecomb-service-center/1.3.0/apache-servicecomb-service-center-1.3.0-src.zip.asc
   (with props)

release/servicecomb/servicecomb-service-center/1.3.0/apache-servicecomb-service-center-1.3.0-src.zip.sha512
   (with props)

release/servicecomb/servicecomb-service-center/1.3.0/apache-servicecomb-service-center-1.3.0-windows-amd64.tar.gz
   (with props)

release/servicecomb/servicecomb-service-center/1.3.0/apache-servicecomb-service-center-1.3.0-windows-amd64.tar.gz.asc
   (with props)

release/servicecomb/servicecomb-service-center/1.3.0/apache-servicecomb-service-center-1.3.0-windows-amd64.tar.gz.sha512
   (with props)

Added: 
release/servicecomb/servicecomb-service-center/1.3.0/apache-servicecomb-service-center-1.3.0-darwin-amd64.tar.gz
==
Binary file - no diff available.

Propchange: 
release/servicecomb/servicecomb-service-center/1.3.0/apache-servicecomb-service-center-1.3.0-darwin-amd64.tar.gz
--
svn:mime-type = application/octet-stream

Added: 
release/servicecomb/servicecomb-service-center/1.3.0/apache-servicecomb-service-center-1.3.0-darwin-amd64.tar.gz.asc
==
--- 
release/servicecomb/servicecomb-service-center/1.3.0/apache-servicecomb-service-center-1.3.0-darwin-amd64.tar.gz.asc
 (added)
+++ 
release/servicecomb/servicecomb-service-center/1.3.0/apache-servicecomb-service-center-1.3.0-darwin-amd64.tar.gz.asc
 Thu Nov  7 10:51:51 2019
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCgAdFiEEQsDXlA/N5eYw5Krj3JP2lr16TWkFAl21XYAACgkQ3JP2lr16
+TWnltA/8DjFZayoK5YIJhRiVG8vk70XhaOFpYuQeMKun21QVblrbPnQyHJg35atT
+Ea94JJvmMr9El/vyh+r0qyL0CoiKnTTTXLYFYe+GxO/M25F642HUE++jOCW007nP
+/ushKKeabafc0zRrcyJBtk20bF1Bm8sxIG8rnAMYEVYF2pJ1Bzusgozs6aWE1hz2
+CD5PV+Rf1ncTFcQkO3NHBZ0b/buZbCjJP/+C5LZQMH4bMoaHwgujKQBDw5GmlvnH
+GII1z8jhmslnwzmVLPgttDizt/MhFUZe6t/S5d2wk2okeF1tZtSfoV1sX4IH7eTm
+sPL19JhF8OOm895fEmw/H11LHRyogFZt+veFh09AgJ/MH5aqlJxKsraEe4C2g0ig
+Wp4/eBjTOntQV/yUi2HMwsklIFuofjDiHFROqF7TxUpYNvryrHlh4NOq3RRCfcTw
+0uSQAILZQOFp8zV+rlYCI1J+8MRrQnL1e8z4VH0iMKF1ZcAGQs3GnbZ08ub/QmVG
+zOSBTUCs4SQl/LbFlZ9Rgn/NaCFsLd4q0JhvYTTMCPyyE/0DZCDKgKZvXCUK3CAM
+F2owtiIYvHBdpjjz7/UTC5E7Xtf52/N7jwgbmAk+1miFsn0Ih4Xh68FAXUeVRN39
+aM943Qut7vKFtbKLwf/iS1YOFf9R7G4QrbN6rLj3900ODowGaYc=
+=Lx4O
+-END PGP SIGNATURE-

Propchange: 
release/servicecomb/servicecomb-service-center/1.3.0/apache-servicecomb-service-center-1.3.0-darwin-amd64.tar.gz.asc
--
svn:eol-style = native

Added: 
release/servicecomb/servicecomb-service-center/1.3.0/apache-servicecomb-service-center-1.3.0-darwin-amd64.tar.gz.sha512
==
--- 
release/servicecomb/servicecomb-service-center/1.3.0/apache-servicecomb-service-center-1.3.0-darwin-amd64.tar.gz.sha512
 (added)
+++ 
release/servicecomb/servicecomb-service-center/1.3.0/apache-servicecomb-service-center-1.3.0-darwin-amd64.tar.gz.sha512
 Thu Nov  7 10:51:51 2019
@@ -0,0 +1 @@
+544657ad08dc20100b0546d4cbe3357f6d53c9a45c002c261d112450ce27f2ab6a5e49882f68c83d76f3b217eb638f5e2c013d5bc3c5c9c0b808977b16c33b37
  apache-servicecomb-service-center-1.3.0-darwin-amd64.tar.gz

Propchange: 
release/servicecomb/servicecomb-service-center/1.3.0/apache-servicecomb-service-center-1.3.0-darwin-amd64.tar.gz.sha512
--
svn:eol-style = native

Added: 
release/servicecomb/servicecomb-service-center/1.3.0/apache-servicecomb-service-center-1.3.0-linux-amd64.tar.gz

svn commit: r36664 - /release/servicecomb/servicecomb-service-center/1.2.0/

2019-11-07 Thread asifdxtreme
Author: asifdxtreme
Date: Thu Nov  7 11:00:33 2019
New Revision: 36664

Log:
Remove old version to archive

Removed:
release/servicecomb/servicecomb-service-center/1.2.0/



[servicecomb-toolkit] 04/07: SCB-1555 Integrate oas-validator compability check to cli Update readme

2019-11-07 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit 830f73972446b6d2f919fd84dc77de84c2e58609
Author: Daniel Qian 
AuthorDate: Thu Nov 7 15:31:00 2019 +0800

SCB-1555 Integrate oas-validator compability check to cli
Update readme
---
 README-ZH.md | 16 +++-
 README.md| 15 ++-
 2 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/README-ZH.md b/README-ZH.md
index e357f03..c8bd5a3 100644
--- a/README-ZH.md
+++ b/README-ZH.md
@@ -269,12 +269,26 @@ $ java -jar toolkit-cli-{version}.jar docgenerate -i 
swagger.yaml -o ./document
  3.3.3 契约风格检查
 
 ```shell
-$ java -jar toolkit-cli-{version}.jar checkstyle openapi.yaml
+$ java -jar toolkit-cli-{version}.jar checkstyle oas.yaml
+或者
+$ java -jar toolkit-cli-{version}.jar cs oas.yaml
 ```
 
 > **checkstyle** Command argument
 *  OpenAPI v3 spec yaml文件
 
+ 3.3.4 契约兼容性检查
+
+```shell
+$ java -jar toolkit-cli-{version}.jar checkcompatibility left-oas.yaml 
right-oas.yaml
+或者
+$ java -jar toolkit-cli-{version}.jar cc left-oas.yaml right-oas.yaml
+```
+
+> **checkcompatibility** Command argument
+*  Two OpenAPI v3 spec yaml file
+
+
 ### 3.4 使用案例
 可以在[这里](./samples/README-ZH.md)找到使用插件的一些示例 
 
diff --git a/README.md b/README.md
index 1a43352..ba07c98 100644
--- a/README.md
+++ b/README.md
@@ -270,12 +270,25 @@ e.g:-f swagger-ui
  3.3.3 Service contract style checking
 
 ```shell
-$ java -jar toolkit-cli-{version}.jar checkstyle openapi.yaml
+$ java -jar toolkit-cli-{version}.jar checkstyle oas.yaml
+or
+$ java -jar toolkit-cli-{version}.jar cs oas.yaml
 ```
 
 > **checkstyle** Command argument
 *  OpenAPI v3 spec yaml file
 
+ 3.3.4 Service contract compatibility checking
+
+```shell
+$ java -jar toolkit-cli-{version}.jar checkcompatibility left-oas.yaml 
right-oas.yaml
+or
+$ java -jar toolkit-cli-{version}.jar cc left-oas.yaml right-oas.yaml
+```
+
+> **checkcompatibility** Command argument
+*  Two OpenAPI v3 spec yaml file
+
 
 ### 3.4 Use case
 



[servicecomb-toolkit] 05/07: remove stdout in test

2019-11-07 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit a92f7f70b3108255e51447faeb2e12377477b63c
Author: Daniel Qian 
AuthorDate: Thu Nov 7 15:32:29 2019 +0800

remove stdout in test
---
 .../parameter/ParameterAllowReservedChangeDiffValidatorTest.java | 1 -
 1 file changed, 1 deletion(-)

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 70b82a8..a5a4b5b 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
@@ -45,7 +45,6 @@ public class ParameterAllowReservedChangeDiffValidatorTest 
extends OasCompatibil
   @Test
   public void validateBroken() {
 OpenAPI leftOpenAPI = 
loadRelative("petstore-parameter-allow-reserved-a.yaml");
-System.out.println(leftOpenAPI.toString());
 OpenAPI rightOpenAPI = 
loadRelative("petstore-parameter-allow-reserved-b.yaml");
 List violations = oasSpecDiffValidator
   .validate(createContext(leftOpenAPI, rightOpenAPI), leftOpenAPI, 
rightOpenAPI);



[GitHub] [servicecomb-toolkit] WillemJiang merged pull request #43: SCB-1555 Integrate oas-validator compability check to cli

2019-11-07 Thread GitBox
WillemJiang merged pull request #43: SCB-1555 Integrate oas-validator 
compability check to cli
URL: https://github.com/apache/servicecomb-toolkit/pull/43
 
 
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[servicecomb-toolkit] 03/07: SCB-1555 Integrate oas-validator compability check to cli Translate compatibility error message to english

2019-11-07 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit 1ffe8e21edc1a87d93f82cf5f16a1575a51a1c55
Author: Daniel Qian 
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/valid

[servicecomb-toolkit] 07/07: fix unit test

2019-11-07 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit 8d31222cf07128053b587b47269795ee57ed8b46
Author: Daniel Qian 
AuthorDate: Thu Nov 7 18:25:04 2019 +0800

fix unit test
---
 .../factory/DefaultComponentsDiffValidatorFactoryTest.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/factory/DefaultComponentsDiffValidatorFactoryTest.java
 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/factory/DefaultComponentsDiffValidatorFactoryTest.java
index fc98e19..5652cb7 100644
--- 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/factory/DefaultComponentsDiffValidatorFactoryTest.java
+++ 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/factory/DefaultComponentsDiffValidatorFactoryTest.java
@@ -38,7 +38,7 @@ public class DefaultComponentsDiffValidatorFactoryTest {
   @Test
   public void create() {
 List validators = validatorFactory.create();
-assertThat(validators).hasSize(7);
+assertThat(validators).hasSize(6);
   }
 }
 



[servicecomb-toolkit] 06/07: SCB-1555 Integrate oas-validator compability check to cli Remove useless ExampleDiffValidator

2019-11-07 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit 6f295441e46133ffe137e6daf8bddc1368ff83a7
Author: Daniel Qian 
AuthorDate: Thu Nov 7 17:19:15 2019 +0800

SCB-1555 Integrate oas-validator compability check to cli
Remove useless ExampleDiffValidator
---
 .../DefaultComponentsDiffValidatorFactory.java |  7 ---
 .../DefaultExampleDiffValidatorFactory.java| 34 --
 .../DefaultExampleDiffValidatorFactoryTest.java| 43 -
 .../OasDiffValidatorsSkeletonConfiguration.java| 47 ++-
 .../diffvalidation/api/ExampleDiffValidator.java   | 23 -
 .../factory/ExampleDiffValidatorFactory.java   | 23 -
 .../ComponentsExamplesDiffValidator.java   | 54 --
 7 files changed, 36 insertions(+), 195 deletions(-)

diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/factory/DefaultComponentsDiffValidatorFactory.java
 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/factory/DefaultComponentsDiffValidatorFactory.java
index 213d441..ab791ee 100644
--- 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/factory/DefaultComponentsDiffValidatorFactory.java
+++ 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/factory/DefaultComponentsDiffValidatorFactory.java
@@ -24,14 +24,12 @@ import java.util.List;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.ComponentsDiffValidator;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.factory.CallbackDiffValidatorFactory;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.factory.ComponentsDiffValidatorFactory;
-import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.factory.ExampleDiffValidatorFactory;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.factory.HeaderDiffValidatorFactory;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.factory.LinkDiffValidatorFactory;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.factory.ParameterDiffValidatorFactory;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.factory.RequestBodyDiffValidatorFactory;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.factory.ResponseDiffValidatorFactory;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.skeleton.components.ComponentsCallbacksDiffValidator;
-import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.skeleton.components.ComponentsExamplesDiffValidator;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.skeleton.components.ComponentsHeadersDiffValidator;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.skeleton.components.ComponentsLinksDiffValidator;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.skeleton.components.ComponentsParametersDiffValidator;
@@ -44,8 +42,6 @@ public class DefaultComponentsDiffValidatorFactory implements 
ComponentsDiffVali
 
   private final CallbackDiffValidatorFactory callbackDiffValidatorFactory;
 
-  private final ExampleDiffValidatorFactory exampleDiffValidatorFactory;
-
   private final HeaderDiffValidatorFactory headerDiffValidatorFactory;
 
   private final LinkDiffValidatorFactory linkDiffValidatorFactory;
@@ -58,14 +54,12 @@ public class DefaultComponentsDiffValidatorFactory 
implements ComponentsDiffVali
 
   public DefaultComponentsDiffValidatorFactory(
   CallbackDiffValidatorFactory callbackDiffValidatorFactory,
-  ExampleDiffValidatorFactory exampleDiffValidatorFactory,
   HeaderDiffValidatorFactory headerDiffValidatorFactory,
   LinkDiffValidatorFactory linkDiffValidatorFactory,
   ParameterDiffValidatorFactory parameterDiffValidatorFactory,
   RequestBodyDiffValidatorFactory requestBodyDiffValidatorFactory,
   ResponseDiffValidatorFactory responseDiffValidatorFactory) {
 this.callbackDiffValidatorFactory = callbackDiffValidatorFactory;
-this.exampleDiffValidatorFactory = exampleDiffValidatorFactory;
 this.headerDiffValidatorFactory = headerDiffValidatorFactory;
 this.linkDiffValidatorFactory = linkDiffValidatorFactory;
 this.parameterDiffValidatorFactory = parameterDiffValidatorFactory;
@@ -80,7 +74,6 @@ public class DefaultComponentsDiffValidatorFactory implements 
ComponentsDiffVali
 
 // skeletons
 validators.add(new 
ComponentsCallbacksDiffValidator(callbackDiffValidatorFactory.create()));
-validators.add(new 
ComponentsExamplesDiffValidator(exampleDiffValidatorFactory.create()));
 validators.add(new 
ComponentsHeadersDiffValidator(headerDiffValidatorFactory.create()));
 validators.add(new 
ComponentsLinksDiffValidator(linkDiffValidatorFactory.create()));

[servicecomb-toolkit] branch import-oas-validator updated (40cb4ff -> 8d31222)

2019-11-07 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

ningjiang pushed a change to branch import-oas-validator
in repository https://gitbox.apache.org/repos/asf/servicecomb-toolkit.git.


from 40cb4ff  SCB-1553 Integrate oas-validator compliance check to cli Fix 
the license issue
 new f00406c  SCB-1555 Integrate oas-validator compability check to cli Add 
factories for compatibility check validators
 new 37da70b  SCB-1555 Integrate oas-validator compability check to cli Add 
subcommands checkcompatibility and cs to cli
 new 1ffe8e2  SCB-1555 Integrate oas-validator compability check to cli 
Translate compatibility error message to english
 new 830f739  SCB-1555 Integrate oas-validator compability check to cli 
Update readme
 new a92f7f7  remove stdout in test
 new 6f29544  SCB-1555 Integrate oas-validator compability check to cli 
Remove useless ExampleDiffValidator
 new 8d31222  fix unit test

The 7 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 README-ZH.md   |  16 ++-
 README.md  |  15 ++-
 cli/pom.xml|   5 +
 .../{CheckStyle.java => CheckCompatibility.java}   |   6 +-
 ...CheckStyle.java => CheckCompatibilityAbbr.java} |   7 +-
 .../toolkit/cli/CheckCompatibilityBase.java| 129 
 .../servicecomb/toolkit/cli/CheckStyleBase.java|  14 +--
 .../servicecomb/toolkit/cli/ToolkitMain.java   |   7 +-
 .../apache/servicecomb/toolkit/cli/CliTest.java|  25 +++-
 .../src/test/resources/oas/compatibility-left.yaml |   0
 .../test/resources/oas/compatibility-right.yaml|   0
 .../resources/oas/{parser-test.yaml => style.yaml} |   0
 oas-validator/oas-validator-compatibility/pom.xml  |  11 ++
 .../DefaultCallbackDiffValidatorFactory.java}  |  10 +-
 .../DefaultComponentsDiffValidatorFactory.java |  87 +
 .../DefaultEncodingDiffValidatorFactory.java   |  64 ++
 .../factory/DefaultHeaderDiffValidatorFactory.java |  56 +
 .../factory/DefaultInfoDiffValidatorFactory.java}  |  10 +-
 .../factory/DefaultLinkDiffValidatorFactory.java}  |  10 +-
 .../DefaultMediaTypeDiffValidatorFactory.java  |  67 ++
 .../DefaultOasSpecDiffValidatorFactory.java}   |  40 +++---
 .../DefaultOpenApiDiffValidatorFactory.java|  80 
 .../DefaultOperationDiffValidatorFactory.java  |  70 +++
 .../DefaultParameterDiffValidatorFactory.java  |  72 +++
 .../DefaultPathItemDiffValidatorFactory.java   |  61 ++
 .../factory/DefaultPathsDiffValidatorFactory.java} |  27 +++--
 .../DefaultRequestBodyDiffValidatorFactory.java|  54 +
 .../DefaultResponseDiffValidatorFactory.java   |  61 ++
 .../DefaultResponsesDiffValidatorFactory.java} |  30 +++--
 .../factory/DefaultSchemaDiffValidatorFactory.java | 135 +
 ...DefaultSecuritySchemeDiffValidatorFactory.java} |  12 +-
 .../DefaultServerDiffValidatorFactory.java}|  11 +-
 .../factory/DefaultTagDiffValidatorFactory.java}   |  11 +-
 ...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 +-
 .../DefaultCallbackDiffValidatorFactoryTest.java}  |  13 +-
 ...DefaultComponentsDiffValidatorFactoryTest.java} |  18 +--
 .../DefaultEncodingDiffValidatorFactoryTest.java}  |  16 +--
 .../DefaultInfoDiffValidatorFactoryTest.java}  |  13 +-
 .../DefaultLinkDiffValidatorFactoryTest.java}  |  13 +-
 .../DefaultMediaTypeDiffValidatorFactoryTest.java} |  18 +--
 

[servicecomb-toolkit] 02/07: SCB-1555 Integrate oas-validator compability check to cli Add subcommands checkcompatibility and cs to cli

2019-11-07 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit 37da70ba772f66f4d5f0d1ce8c55a3fecb91517b
Author: Daniel Qian 
AuthorDate: Thu Nov 7 14:25:47 2019 +0800

SCB-1555 Integrate oas-validator compability check to cli
Add subcommands checkcompatibility and cs to cli
---
 cli/pom.xml|   5 +
 .../toolkit/cli/CheckCompatibility.java|  26 +
 .../toolkit/cli/CheckCompatibilityAbbr.java|  26 +
 .../toolkit/cli/CheckCompatibilityBase.java| 129 +
 .../servicecomb/toolkit/cli/CheckStyleBase.java|  14 +--
 .../servicecomb/toolkit/cli/ToolkitMain.java   |   7 +-
 .../apache/servicecomb/toolkit/cli/CliTest.java|  25 +++-
 .../{parser-test.yaml => compatibility-left.yaml}  |   6 +-
 .../{parser-test.yaml => compatibility-right.yaml} |   8 +-
 .../resources/oas/{parser-test.yaml => style.yaml} |   0
 ...dingAllowedReservedChangeDiffValidatorTest.java |   1 -
 .../oasv/common/OasObjectPropertyLocation.java |  14 +++
 .../oasv/common/OasObjectPropertyLocationTest.java |  16 +++
 13 files changed, 259 insertions(+), 18 deletions(-)

diff --git a/cli/pom.xml b/cli/pom.xml
index 6a222d7..4499804 100644
--- a/cli/pom.xml
+++ b/cli/pom.xml
@@ -85,6 +85,11 @@
   org.apache.servicecomb.toolkit
   oas-validator-compliance
 
+
+
+  org.apache.servicecomb.toolkit
+  oas-validator-compatibility
+
   
 
   
diff --git 
a/cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckCompatibility.java 
b/cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckCompatibility.java
new file mode 100644
index 000..c12439d
--- /dev/null
+++ 
b/cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckCompatibility.java
@@ -0,0 +1,26 @@
+/*
+ * 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.cli;
+
+import io.airlift.airline.Command;
+
+@Command(name = "checkcompatibility",
+description = "Check compatibility for two OpenAPI v3 spec yamls, right 
one should be semantically compatible with left one")
+public class CheckCompatibility extends CheckCompatibilityBase {
+
+}
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
new file mode 100644
index 000..2f14b2b
--- /dev/null
+++ 
b/cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckCompatibilityAbbr.java
@@ -0,0 +1,26 @@
+/*
+ * 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.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")
+public class CheckCompatibilityAbbr extends CheckCompatibilityBase {
+
+}
diff --git 
a/cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckCompatibilityBase.java
 
b/cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckCompatibilityBase.java
new file mode 100644
index 000..298132f
--- /dev/null
+++ 
b/cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckCompatibilityBase.java
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license

[GitHub] [servicecomb-toolkit] WillemJiang commented on issue #33: Adjust the structure of the generated project

2019-11-07 Thread GitBox
WillemJiang commented on issue #33: Adjust the structure of the generated 
project
URL: 
https://github.com/apache/servicecomb-toolkit/issues/33#issuecomment-551032090
 
 
   @kakulisen  Did you create a JIRA to check this issue?


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [servicecomb-toolkit] chanjarster opened a new pull request #44: Merge branch import-oas-validator to master

2019-11-07 Thread GitBox
chanjarster opened a new pull request #44: Merge branch import-oas-validator to 
master
URL: https://github.com/apache/servicecomb-toolkit/pull/44
 
 
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [servicecomb-website] asifdxtreme opened a new pull request #213: Update SC 1.3.0 Version Details

2019-11-07 Thread GitBox
asifdxtreme opened a new pull request #213: Update SC 1.3.0 Version Details
URL: https://github.com/apache/servicecomb-website/pull/213
 
 
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [servicecomb-website] WillemJiang commented on a change in pull request #213: Update SC 1.3.0 Version Details

2019-11-07 Thread GitBox
WillemJiang commented on a change in pull request #213: Update SC 1.3.0 Version 
Details
URL: 
https://github.com/apache/servicecomb-website/pull/213#discussion_r343615026
 
 

 ##
 File path: _release/cn/release.md
 ##
 @@ -14,14 +14,14 @@ last_modified_at: 2019-04-06T00:50:43-55:00
 
 **稳定发布版 - 最新版本:**
 
+* [ServiceComb Service-Center 
1.3.0](https://apache.org/dyn/closer.cgi/servicecomb/servicecomb-service-center/1.3.0/){:target="_blank"}
 (released on 2019-04-06)
 
 Review comment:
   The release data need to be updated.


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[servicecomb-website] branch master updated (ff38fde -> d0f7d4b)

2019-11-07 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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


from ff38fde  change the news author
 new fe85ce6  Update SC 1.3.0 Version Details
 new d0f7d4b  Update SC 1.3.0 Release Date

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 _pages/cn/home.md  |  2 +-
 _pages/home.md |  2 +-
 _release/cn/release.md |  5 +--
 _release/cn/service_center_downloads.md|  5 +--
 _release/cn/service_center_releaseNotes.md | 50 ++
 _release/release.md|  5 +--
 _release/service_center_downloads.md   |  5 +--
 _release/service_center_releaseNotes.md| 50 ++
 8 files changed, 114 insertions(+), 10 deletions(-)



[servicecomb-website] 01/02: Update SC 1.3.0 Version Details

2019-11-07 Thread ningjiang
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-website.git

commit fe85ce60bd955f148281fd82cb77de89b5ad5844
Author: asifdxtreme 
AuthorDate: Thu Nov 7 16:50:51 2019 +0530

Update SC 1.3.0 Version Details
---
 _pages/cn/home.md  |  2 +-
 _pages/home.md |  2 +-
 _release/cn/release.md |  5 +--
 _release/cn/service_center_downloads.md|  5 +--
 _release/cn/service_center_releaseNotes.md | 50 ++
 _release/release.md|  5 +--
 _release/service_center_downloads.md   |  5 +--
 _release/service_center_releaseNotes.md| 50 ++
 8 files changed, 114 insertions(+), 10 deletions(-)

diff --git a/_pages/cn/home.md b/_pages/cn/home.md
index b5d1dd7..17fe195 100755
--- a/_pages/cn/home.md
+++ b/_pages/cn/home.md
@@ -25,7 +25,7 @@ intro:
 Apache ServiceComb 
Java-Chassis 发布1.3.0
   
   
-Apache ServiceComb 发布正式版 1.2.0
+Apache ServiceComb 
Service-Center 发布 1.3.0
   
   
 Apache ServiceComb Pack 发布0.5.0
diff --git a/_pages/home.md b/_pages/home.md
index c0738ef..84c386e 100755
--- a/_pages/home.md
+++ b/_pages/home.md
@@ -25,7 +25,7 @@ intro:
 Apache ServiceComb Java-Chassis 
Release Version 1.3.0
   
   
-  Apache ServiceComb Release Version 1.2.0
+  Apache ServiceComb 
Service-Center Release Version 1.3.0
   
   
 Apache ServiceComb Pack 0.5.0 is 
released
diff --git a/_release/cn/release.md b/_release/cn/release.md
index f083c88..ee318dd 100755
--- a/_release/cn/release.md
+++ b/_release/cn/release.md
@@ -14,14 +14,14 @@ last_modified_at: 2019-04-06T00:50:43-55:00
 
 **稳定发布版 - 最新版本:**
 
+* [ServiceComb Service-Center 
1.3.0](https://apache.org/dyn/closer.cgi/servicecomb/servicecomb-service-center/1.3.0/){:target="_blank"}
 (released on 2019-04-06)
+
 * [ServiceComb Toolkit 
0.1.0](https://apache.org/dyn/closer.cgi/servicecomb/servicecomb-toolkit/0.1.0/){:target="_blank"}
 (released on 2019-09-03)
 
 * [ServiceComb Pack 
0.5.0](https://apache.org/dyn/closer.cgi/servicecomb/servicecomb-pack/0.5.0/){:target="_blank"}
 (released on 2019-08-26)
 
 * [ServiceComb Java-Chassis 
1.3.0](https://apache.org/dyn/closer.cgi/servicecomb/servicecomb-java-chassis/1.3.0/){:target="_blank"}
 (released on 2019-10-31)
 
-* [ServiceComb Service-Center 
1.2.0](https://apache.org/dyn/closer.cgi/servicecomb/servicecomb-service-center/1.2.0/){:target="_blank"}
 (released on 2019-04-06)
-
 * [ServiceComb Saga Actuator 
0.3.0](https://apache.org/dyn/closer.cgi/servicecomb/servicecomb-saga-actuator/0.3.0/){:target="_blank"}
 (released on 2018-12-18)
 
 * [ServiceComb Saga 
0.2.1](https://apache.org/dyn/closer.cgi/servicecomb/servicecomb-saga/0.2.1/){:target="_blank"}
 (released on 2018-11-23)
@@ -32,6 +32,7 @@ last_modified_at: 2019-04-06T00:50:43-55:00
 
 **先前发行版本 :**
 
+* [ServiceComb Service-Center 
1.2.0](https://apache.org/dyn/closer.cgi/servicecomb/servicecomb-service-center/1.2.0/){:target="_blank"}
 (released on 2019-04-06)
 * [ServiceComb Service-Center 
1.1.0](https://apache.org/dyn/closer.cgi/servicecomb/servicecomb-service-center/1.1.0/){:target="_blank"}
 (released on 2018-11-30)
 * [ServiceComb Service-Center 
1.0.0](http://archive.apache.org/dist/incubator/servicecomb/incubator-servicecomb-service-center/1.0.0/){:target="_blank"}
 (released on 2018-08-02)
 * [ServiceComb Service-Center 
1.0.0-m2](http://archive.apache.org/dist/incubator/servicecomb/incubator-servicecomb-service-center/1.0.0-m2/){:target="_blank"}
 (released on 2018-06-21)
diff --git a/_release/cn/service_center_downloads.md 
b/_release/cn/service_center_downloads.md
index 679cf90..45e2690 100644
--- a/_release/cn/service_center_downloads.md
+++ b/_release/cn/service_center_downloads.md
@@ -4,14 +4,15 @@ lang: cn
 ref: release
 permalink: /cn/release/service-center-downloads/
 excerpt: "ServiceComb Service-Center Downloads"
-last_modified_at: 2019-04-06T00:50:43-55:00
+last_modified_at: 2019-11-06T00:50:43-55:00
 ---
 
 ## 发布包
 
 | 版本号   | 源码|   Windows版本 |
   Linux版本   |   Darwin版本  |   
与之兼容的Java-Chassis版本 |
 | -- | - | 
- | - | 
- |- |
-| **Apache ServiceComb Service-Center 1.2.0 (LATEST)**
|[[src]](https://apache.org/dyn/closer.cgi/servicecomb/servicecomb-service-center/1.2.0/apache-servicecomb-service-center-1.2.0-src.tar.gz)
 
[[asc]](https://www.apache.org/dist/servicecomb/servicecomb-service-center/1.2.0/apache-servicecomb-service-center-1.2.0-src.tar.gz.asc)
 
[[sha512]](https://www.apache.org/dist/servicecomb/servicecomb-service-center/1.2.0/apache-servicecomb-service-c

[servicecomb-website] 02/02: Update SC 1.3.0 Release Date

2019-11-07 Thread ningjiang
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-website.git

commit d0f7d4bcf4950b92f303244b2f301b01f047c640
Author: asifdxtreme 
AuthorDate: Thu Nov 7 17:37:27 2019 +0530

Update SC 1.3.0 Release Date
---
 _release/cn/release.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/_release/cn/release.md b/_release/cn/release.md
index ee318dd..dbf9121 100755
--- a/_release/cn/release.md
+++ b/_release/cn/release.md
@@ -14,7 +14,7 @@ last_modified_at: 2019-04-06T00:50:43-55:00
 
 **稳定发布版 - 最新版本:**
 
-* [ServiceComb Service-Center 
1.3.0](https://apache.org/dyn/closer.cgi/servicecomb/servicecomb-service-center/1.3.0/){:target="_blank"}
 (released on 2019-04-06)
+* [ServiceComb Service-Center 
1.3.0](https://apache.org/dyn/closer.cgi/servicecomb/servicecomb-service-center/1.3.0/){:target="_blank"}
 (released on 2019-11-07)
 
 * [ServiceComb Toolkit 
0.1.0](https://apache.org/dyn/closer.cgi/servicecomb/servicecomb-toolkit/0.1.0/){:target="_blank"}
 (released on 2019-09-03)
 



[GitHub] [servicecomb-website] WillemJiang merged pull request #213: Update SC 1.3.0 Version Details

2019-11-07 Thread GitBox
WillemJiang merged pull request #213: Update SC 1.3.0 Version Details
URL: https://github.com/apache/servicecomb-website/pull/213
 
 
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[servicecomb-website] branch asf-site updated (f23681b -> 91fc6d0)

2019-11-07 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

ningjiang pushed a change to branch asf-site
in repository https://gitbox.apache.org/repos/asf/servicecomb-website.git.


from f23681b  Publish the website
 add c860e43  News about oas-validator code donation(English version)
 new f646d3f  Merge branch 'master' into asf-site
 add ff38fde  change the news author
 new 0736a17  Merge branch 'master' into asf-site
 add fe85ce6  Update SC 1.3.0 Version Details
 add d0f7d4b  Update SC 1.3.0 Release Date
 new 79a5419  Merge branch 'master' into asf-site
 new 91fc6d0  Publish the website

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 _pages/cn/home.md  |   2 +-
 _pages/home.md |   5 +-
 ...comb-accept-newcapec-institute-code-donation.md |  20 ++
 ...comb-accept-newcapec-institute-code-donation.md |   2 +-
 _release/cn/release.md |   5 +-
 _release/cn/service_center_downloads.md|   5 +-
 _release/cn/service_center_releaseNotes.md |  50 +
 _release/release.md|   5 +-
 _release/service_center_downloads.md   |   5 +-
 _release/service_center_releaseNotes.md|  50 +
 .../index.html |  20 +-
 .../index.html |  20 +-
 .../index.html |  20 +-
 .../index.html |  20 +-
 .../docs/apache-servicecomb-day-slides/index.html  |  20 +-
 .../apache-servicecomb-incubating-day/index.html   |  20 +-
 .../index.html |  20 +-
 content/cn/docs/autoscale-on-company/index.html|  20 +-
 .../index.html |  20 +-
 .../index.html |  20 +-
 content/cn/docs/communication-btw-sc-ms/index.html |  20 +-
 content/cn/docs/company-on-kubernetes/index.html   |  20 +-
 .../cn/docs/config_center_integration/index.html   |  20 +-
 content/cn/docs/consul-servicemesh.html|  20 +-
 content/cn/docs/crm-part-I/index.html  |  20 +-
 .../customized-tracing-with-servicecomb/index.html |  20 +-
 .../index.html |  20 +-
 .../index.html |  20 +-
 .../index.html |  20 +-
 content/cn/docs/distributed_saga_1/index.html  |  20 +-
 content/cn/docs/distributed_saga_2/index.html  |  20 +-
 content/cn/docs/distributed_saga_3/index.html  |  20 +-
 content/cn/docs/go-to-cloud/index.html |  20 +-
 .../how-to-do-microservice-accept-test/index.html  |  20 +-
 .../index.html |  20 +-
 .../docs/how-to-reform-a-legacy-system/index.html  |  20 +-
 content/cn/docs/jira_beginner_guide/index.html |  20 +-
 content/cn/docs/join_the_community/index.html  |  20 +-
 content/cn/docs/linuxcon-workshop-demo/index.html  |  20 +-
 content/cn/docs/loadtest-saga-with-kubernetes.html |  20 +-
 .../cn/docs/maven_dependency_management/index.html |  20 +-
 content/cn/docs/open-design/index.html |  20 +-
 .../index.html |  20 +-
 content/cn/docs/osi-microservices/index.html   |  20 +-
 .../index.html |  20 +-
 content/cn/docs/release-note-1-0-0.html|  20 +-
 content/cn/docs/saga_pack_design/index.html|  20 +-
 content/cn/docs/saga_with_cucumber/index.html  |  20 +-
 .../seckill-development-journey-part-I/index.html  |  20 +-
 .../seckill-development-journey-part-II/index.html |  20 +-
 .../index.html |  20 +-
 .../index.html |  61 ++
 .../cn/docs/servicecomb-pack-cluster/index.html|  20 +-
 content/cn/docs/servicecomb-pack-consul/index.html |  20 +-
 content/cn/docs/servicecomb-pack-eureka/index.html |  20 +-
 .../servicecomb-springcloud-zuul-demo/index.html   |  20 +-
 .../index.html |  20 +-
 content/cn/docs/talk-to-apache-experts.html|  20 +-
 .../cn/docs/tracing-with-servicecomb/index.html|  20 +-
 .../index.html |  16 +-
 content/cn/index.html  |   2 +-
 content/cn/release/index.html  |   7 +-
 .../cn/release/service-center-downloads/index.html |  20 +-
 .../service-center-release-notes/index.html|  52 -
 .../index.html |  20 +-
 .../index.html |  20 +-
 .../index.html |  20 +-
 .../

[servicecomb-website] 03/04: Merge branch 'master' into asf-site

2019-11-07 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit 79a54193561fc3e3a0916c10c1297c8199afcb31
Merge: 0736a17 d0f7d4b
Author: Willem Jiang 
AuthorDate: Thu Nov 7 20:11:56 2019 +0800

Merge branch 'master' into asf-site

 _pages/cn/home.md  |  2 +-
 _pages/home.md |  2 +-
 _release/cn/release.md |  5 +--
 _release/cn/service_center_downloads.md|  5 +--
 _release/cn/service_center_releaseNotes.md | 50 ++
 _release/release.md|  5 +--
 _release/service_center_downloads.md   |  5 +--
 _release/service_center_releaseNotes.md| 50 ++
 8 files changed, 114 insertions(+), 10 deletions(-)



[servicecomb-website] 02/04: Merge branch 'master' into asf-site

2019-11-07 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit 0736a174616ca9fdac85ffd242d52fa5b67a2b27
Merge: f646d3f ff38fde
Author: Willem Jiang 
AuthorDate: Thu Nov 7 10:42:26 2019 +0800

Merge branch 'master' into asf-site

 .../2019-11-07-servicecomb-accept-newcapec-institute-code-donation.md   | 2 +-
 .../2019-10-29-servicecomb-accept-newcapec-institute-code-donation.md   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)



[servicecomb-website] 01/04: Merge branch 'master' into asf-site

2019-11-07 Thread ningjiang
This is an automated email from the ASF dual-hosted git repository.

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

commit f646d3f00cf0c10adb880cc7f9d20804da2da0d5
Merge: f23681b c860e43
Author: Willem Jiang 
AuthorDate: Thu Nov 7 10:12:44 2019 +0800

Merge branch 'master' into asf-site

 _pages/home.md   |  3 +++
 ...cecomb-accept-newcapec-institute-code-donation.md | 20 
 2 files changed, 23 insertions(+)



[servicecomb-toolkit] 25/26: SCB-1555 Integrate oas-validator compability check to cli Remove useless ExampleDiffValidator

2019-11-07 Thread ningjiang
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 b3e2995fadcb045179ff46ce795a812bb6e9994f
Author: Daniel Qian 
AuthorDate: Thu Nov 7 17:19:15 2019 +0800

SCB-1555 Integrate oas-validator compability check to cli
Remove useless ExampleDiffValidator
---
 .../DefaultComponentsDiffValidatorFactory.java |  7 ---
 .../DefaultExampleDiffValidatorFactory.java| 34 --
 .../DefaultExampleDiffValidatorFactoryTest.java| 43 -
 .../OasDiffValidatorsSkeletonConfiguration.java| 47 ++-
 .../diffvalidation/api/ExampleDiffValidator.java   | 23 -
 .../factory/ExampleDiffValidatorFactory.java   | 23 -
 .../ComponentsExamplesDiffValidator.java   | 54 --
 7 files changed, 36 insertions(+), 195 deletions(-)

diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/factory/DefaultComponentsDiffValidatorFactory.java
 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/factory/DefaultComponentsDiffValidatorFactory.java
index 213d441..ab791ee 100644
--- 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/factory/DefaultComponentsDiffValidatorFactory.java
+++ 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/factory/DefaultComponentsDiffValidatorFactory.java
@@ -24,14 +24,12 @@ import java.util.List;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.api.ComponentsDiffValidator;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.factory.CallbackDiffValidatorFactory;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.factory.ComponentsDiffValidatorFactory;
-import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.factory.ExampleDiffValidatorFactory;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.factory.HeaderDiffValidatorFactory;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.factory.LinkDiffValidatorFactory;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.factory.ParameterDiffValidatorFactory;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.factory.RequestBodyDiffValidatorFactory;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.factory.ResponseDiffValidatorFactory;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.skeleton.components.ComponentsCallbacksDiffValidator;
-import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.skeleton.components.ComponentsExamplesDiffValidator;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.skeleton.components.ComponentsHeadersDiffValidator;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.skeleton.components.ComponentsLinksDiffValidator;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.skeleton.components.ComponentsParametersDiffValidator;
@@ -44,8 +42,6 @@ public class DefaultComponentsDiffValidatorFactory implements 
ComponentsDiffVali
 
   private final CallbackDiffValidatorFactory callbackDiffValidatorFactory;
 
-  private final ExampleDiffValidatorFactory exampleDiffValidatorFactory;
-
   private final HeaderDiffValidatorFactory headerDiffValidatorFactory;
 
   private final LinkDiffValidatorFactory linkDiffValidatorFactory;
@@ -58,14 +54,12 @@ public class DefaultComponentsDiffValidatorFactory 
implements ComponentsDiffVali
 
   public DefaultComponentsDiffValidatorFactory(
   CallbackDiffValidatorFactory callbackDiffValidatorFactory,
-  ExampleDiffValidatorFactory exampleDiffValidatorFactory,
   HeaderDiffValidatorFactory headerDiffValidatorFactory,
   LinkDiffValidatorFactory linkDiffValidatorFactory,
   ParameterDiffValidatorFactory parameterDiffValidatorFactory,
   RequestBodyDiffValidatorFactory requestBodyDiffValidatorFactory,
   ResponseDiffValidatorFactory responseDiffValidatorFactory) {
 this.callbackDiffValidatorFactory = callbackDiffValidatorFactory;
-this.exampleDiffValidatorFactory = exampleDiffValidatorFactory;
 this.headerDiffValidatorFactory = headerDiffValidatorFactory;
 this.linkDiffValidatorFactory = linkDiffValidatorFactory;
 this.parameterDiffValidatorFactory = parameterDiffValidatorFactory;
@@ -80,7 +74,6 @@ public class DefaultComponentsDiffValidatorFactory implements 
ComponentsDiffVali
 
 // skeletons
 validators.add(new 
ComponentsCallbacksDiffValidator(callbackDiffValidatorFactory.create()));
-validators.add(new 
ComponentsExamplesDiffValidator(exampleDiffValidatorFactory.create()));
 validators.add(new 
ComponentsHeadersDiffValidator(headerDiffValidatorFactory.create()));
 validators.add(new 
ComponentsLinksDiffValidator(linkDiffValidatorFactory.create()));
 validators.ad

[servicecomb-toolkit] 21/26: SCB-1555 Integrate oas-validator compability check to cli Add subcommands checkcompatibility and cs to cli

2019-11-07 Thread ningjiang
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 653b4b2cfc1316b1cc1847dee57b1faf9103
Author: Daniel Qian 
AuthorDate: Thu Nov 7 14:25:47 2019 +0800

SCB-1555 Integrate oas-validator compability check to cli
Add subcommands checkcompatibility and cs to cli
---
 cli/pom.xml|   5 +
 .../toolkit/cli/CheckCompatibility.java|  26 +
 .../toolkit/cli/CheckCompatibilityAbbr.java|  26 +
 .../toolkit/cli/CheckCompatibilityBase.java| 129 +
 .../servicecomb/toolkit/cli/CheckStyleBase.java|  14 +--
 .../servicecomb/toolkit/cli/ToolkitMain.java   |   7 +-
 .../apache/servicecomb/toolkit/cli/CliTest.java|  25 +++-
 .../{parser-test.yaml => compatibility-left.yaml}  |   6 +-
 .../{parser-test.yaml => compatibility-right.yaml} |   8 +-
 .../resources/oas/{parser-test.yaml => style.yaml} |   0
 ...dingAllowedReservedChangeDiffValidatorTest.java |   1 -
 .../oasv/common/OasObjectPropertyLocation.java |  14 +++
 .../oasv/common/OasObjectPropertyLocationTest.java |  16 +++
 13 files changed, 259 insertions(+), 18 deletions(-)

diff --git a/cli/pom.xml b/cli/pom.xml
index 6a222d7..4499804 100644
--- a/cli/pom.xml
+++ b/cli/pom.xml
@@ -85,6 +85,11 @@
   org.apache.servicecomb.toolkit
   oas-validator-compliance
 
+
+
+  org.apache.servicecomb.toolkit
+  oas-validator-compatibility
+
   
 
   
diff --git 
a/cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckCompatibility.java 
b/cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckCompatibility.java
new file mode 100644
index 000..c12439d
--- /dev/null
+++ 
b/cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckCompatibility.java
@@ -0,0 +1,26 @@
+/*
+ * 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.cli;
+
+import io.airlift.airline.Command;
+
+@Command(name = "checkcompatibility",
+description = "Check compatibility for two OpenAPI v3 spec yamls, right 
one should be semantically compatible with left one")
+public class CheckCompatibility extends CheckCompatibilityBase {
+
+}
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
new file mode 100644
index 000..2f14b2b
--- /dev/null
+++ 
b/cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckCompatibilityAbbr.java
@@ -0,0 +1,26 @@
+/*
+ * 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.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")
+public class CheckCompatibilityAbbr extends CheckCompatibilityBase {
+
+}
diff --git 
a/cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckCompatibilityBase.java
 
b/cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckCompatibilityBase.java
new file mode 100644
index 000..298132f
--- /dev/null
+++ 
b/cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckCompatibilityBase.java
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  

[servicecomb-toolkit] 19/26: SCB-1553 Integrate oas-validator compliance check to cli Fix the license issue

2019-11-07 Thread ningjiang
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 20709fd8dae35f6f2b1df3a5f6ca5607da2eed26
Author: Daniel Qian 
AuthorDate: Wed Nov 6 11:04:01 2019 +0800

SCB-1553 Integrate oas-validator compliance check to cli
Fix the license issue
---
 toolkit-distribution/src/release/LICENSE   |  13 +-
 .../src/release/licenses/LICENSE-cddl-gplv2| 760 -
 2 files changed, 3 insertions(+), 770 deletions(-)

diff --git a/toolkit-distribution/src/release/LICENSE 
b/toolkit-distribution/src/release/LICENSE
index cf82798..af84657 100644
--- a/toolkit-distribution/src/release/LICENSE
+++ b/toolkit-distribution/src/release/LICENSE
@@ -230,6 +230,7 @@ You can find a copy of the License at licenses/LICENSE-cddl
 * JavaMail API jar (javax.mail:mailapi:1.4.3 - 
http://java.sun.com/projects/javamail/mailapi)
 * Java Servlet API (javax.servlet:javax.servlet-api:4.0.1 - 
http://servlet-spec.java.net)
 * JavaBeans(TM) Activation Framework (javax.activation:activation:1.1 - 
http://java.sun.com/products/javabeans/jaf/index.jsp)
+* javax.annotation API (javax.annotation:javax.annotation-api:1.3.2 - 
http://jcp.org/en/jsr/detail?id=250)
 * javax.ws.rs-api (javax.ws.rs:javax.ws.rs-api:2.0.1 - 
http://jax-rs-spec.java.net)
 * jaxb-api (javax.xml.bind:jaxb-api:2.3.0 - 
https://github.com/javaee/jaxb-spec/jaxb-api)
 
@@ -458,14 +459,6 @@ For details, see their respective project links.
 * unbescape (org.unbescape:unbescape:1.1.6.RELEASE - http://www.unbescape.org)
 
 ===
-This product bundles the following libraries which are licensed under the
-CDDL + GPLv2 with classpath exception.
-For details, see their respective project links.
-You can find a copy of the License at licenses/LICENSE-cddl-gplv2
-
-* javax.annotation API (javax.annotation:javax.annotation-api:1.3.2 - 
http://jcp.org/en/jsr/detail?id=250)
-
-===
 This product bundles Webjars which is licensed under the
 MIT License.
 For details, see their respective project links.
@@ -478,7 +471,7 @@ You can find a copy of the License at 
licenses/LICENSE-webjars
 This product bundles Animal Sniffer Annotations which is licensed under the
 MIT License.
 For details, see 
http://www.mojohaus.org/animal-sniffer/animal-sniffer-annotations
-You can find a copy of the License at licenses/LICENSE-mit-unknown
+You can find a copy of the License at licenses/LICENSE-mit
 
 * Animal Sniffer Annotations 
(org.codehaus.mojo:animal-sniffer-annotations:1.17 - 
http://www.mojohaus.org/animal-sniffer/animal-sniffer-annotations)
 
@@ -486,7 +479,7 @@ You can find a copy of the License at 
licenses/LICENSE-mit-unknown
 This product bundles Checker Qual which is licensed under the
 MIT License.
 For details, see https://checkerframework.org
-You can find a copy of the License at licenses/LICENSE-mit-unknown
+You can find a copy of the License at licenses/LICENSE-mit
 
 * Checker Qual (org.checkerframework:checker-compat-qual:2.5.2 - 
https://checkerframework.org)
 
diff --git a/toolkit-distribution/src/release/licenses/LICENSE-cddl-gplv2 
b/toolkit-distribution/src/release/licenses/LICENSE-cddl-gplv2
deleted file mode 100644
index 4b156e6..000
--- a/toolkit-distribution/src/release/licenses/LICENSE-cddl-gplv2
+++ /dev/null
@@ -1,760 +0,0 @@
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1
-
-1. Definitions.
-
-1.1. "Contributor" means each individual or entity that creates or
-contributes to the creation of Modifications.
-
-1.2. "Contributor Version" means the combination of the Original
-Software, prior Modifications used by a Contributor (if any), and
-the Modifications made by that particular Contributor.
-
-1.3. "Covered Software" means (a) the Original Software, or (b)
-Modifications, or (c) the combination of files containing Original
-Software with files containing Modifications, in each case including
-portions thereof.
-
-1.4. "Executable" means the Covered Software in any form other than
-Source Code.
-
-1.5. "Initial Developer" means the individual or entity that first
-makes Original Software available under this License.
-
-1.6. "Larger Work" means a work which combines Covered Software or
-portions thereof with code not governed by the terms of this License.
-
-1.7. "License" means this document.
-
-1.8. "Licensable" means having the right to grant, to the maximum
-extent possible, whether at the time of the initial grant or
-subsequently acquired, any and all of the rights conveyed herein.
-
-1.9. "Modifications" means the Source Code and Executable form of
-any of the following:
-
-A. Any file that results from an addition to, deletion from or
-modificatio

[servicecomb-toolkit] 07/26: SCB-1553 Integrate oas-validator compliance check to cli refactor parse checker code, remove duplication

2019-11-07 Thread ningjiang
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 2646643159f51ea15aa3cd831b67596c3be85cf5
Author: Daniel Qian 
AuthorDate: Fri Nov 1 15:11:01 2019 +0800

SCB-1553 Integrate oas-validator compliance check to cli
refactor parse checker code, remove duplication
---
 .../compatibility/CompatibilityCheckParser.java| 36 +++
 .../validators/OasCompatibilityTestBase.java   | 17 -
 .../oasv/compliance/ComplianceCheckParser.java | 36 +++
 .../validator/OasComplianceTestBase.java   | 18 +-
 .../oasv/util/DefaultOasSpecSyntaxChecker.java | 42 --
 .../toolkit/oasv/util/OasSpecParseException.java   | 39 
 .../toolkit/oasv/util/OasSpecParser.java   | 36 ---
 .../toolkit/oasv/util/OasSpecSyntaxChecker.java| 36 ---
 .../servicecomb/toolkit/oasv/OasSpecLoader.java|  9 +
 .../api/controller/CompatibilityController.java| 30 
 .../web/api/controller/ComplianceController.java   | 36 ++-
 11 files changed, 106 insertions(+), 229 deletions(-)

diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/CompatibilityCheckParser.java
 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/CompatibilityCheckParser.java
new file mode 100644
index 000..18fa225
--- /dev/null
+++ 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/CompatibilityCheckParser.java
@@ -0,0 +1,36 @@
+package org.apache.servicecomb.toolkit.oasv.compatibility;
+
+import static java.util.Collections.emptyList;
+
+import java.util.List;
+
+import io.swagger.v3.parser.OpenAPIV3Parser;
+import io.swagger.v3.parser.core.models.ParseOptions;
+import io.swagger.v3.parser.core.models.SwaggerParseResult;
+
+public abstract class CompatibilityCheckParser {
+
+  private CompatibilityCheckParser() {
+// singleton
+  }
+
+  public static SwaggerParseResult parseYaml(String yaml) {
+OpenAPIV3Parser parser = new OpenAPIV3Parser();
+return parser.readContents(yaml, null, createParseOptions());
+  }
+
+  public static List checkSyntax(String yaml) {
+SwaggerParseResult result = parseYaml(yaml);
+return result.getMessages() == null ? emptyList() : result.getMessages();
+  }
+
+  private static ParseOptions createParseOptions() {
+
+ParseOptions parseOptions = new ParseOptions();
+parseOptions.setResolve(true);
+parseOptions.setResolveCombinators(true);
+parseOptions.setResolveFully(true);
+parseOptions.setFlatten(false);
+return parseOptions;
+  }
+}
diff --git 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/OasCompatibilityTestBase.java
 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/OasCompatibilityTestBase.java
index efbf135..0713c2a 100755
--- 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/OasCompatibilityTestBase.java
+++ 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/validators/OasCompatibilityTestBase.java
@@ -17,21 +17,18 @@
 
 package org.apache.servicecomb.toolkit.oasv.compatibility.validators;
 
+import 
org.apache.servicecomb.toolkit.oasv.compatibility.CompatibilityCheckParser;
 import 
org.apache.servicecomb.toolkit.oasv.diffvalidation.test.OasDiffValidatorTestBase;
-import io.swagger.v3.parser.core.models.ParseOptions;
+
+import io.swagger.v3.parser.core.models.SwaggerParseResult;
+import io.swagger.v3.parser.util.ClasspathHelper;
 
 public class OasCompatibilityTestBase extends OasDiffValidatorTestBase {
 
   @Override
-  protected ParseOptions createParseOptions() {
-
-ParseOptions parseOptions = new ParseOptions();
-parseOptions.setResolve(true);
-parseOptions.setResolveCombinators(true);
-parseOptions.setResolveFully(true);
-parseOptions.setFlatten(false);
-return parseOptions;
-
+  protected SwaggerParseResult parseAbsolute(String classpath) {
+String content = ClasspathHelper.loadFileFromClasspath(classpath);
+return CompatibilityCheckParser.parseYaml(content);
   }
 
 }
diff --git 
a/oas-validator/oas-validator-compliance/src/main/java/org/apache/servicecomb/toolkit/oasv/compliance/ComplianceCheckParser.java
 
b/oas-validator/oas-validator-compliance/src/main/java/org/apache/servicecomb/toolkit/oasv/compliance/ComplianceCheckParser.java
new file mode 100644
index 000..ad08cff
--- /dev/null
+++ 
b/oas-validator/oas-validator-compliance/src/main/java/org/apache/servicecomb/toolkit/oasv/com

[servicecomb-toolkit] 06/26: SCB-1553 Integrate oas-validator compliance check to cli add compliance validator factories

2019-11-07 Thread ningjiang
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 afe8ceaba6129f3b77894c1a7715890d14f32e82
Author: Daniel Qian 
AuthorDate: Fri Nov 1 15:10:07 2019 +0800

SCB-1553 Integrate oas-validator compliance check to cli
add compliance validator factories
---
 oas-validator/oas-validator-compliance/pom.xml | 21 +
 .../factory/DefaultComponentsValidatorFactory.java | 96 ++
 .../factory/DefaultEncodingValidatorFactory.java   | 54 
 .../factory/DefaultHeaderValidatorFactory.java | 54 
 .../factory/DefaultInfoValidatorFactory.java   | 42 ++
 .../factory/DefaultMediaTypeValidatorFactory.java  | 57 +
 .../factory/DefaultOasSpecValidatorFactory.java| 41 +
 .../factory/DefaultOpenApiValidatorFactory.java| 86 +++
 .../factory/DefaultOperationValidatorFactory.java  | 77 +
 .../factory/DefaultParameterValidatorFactory.java  | 69 
 .../factory/DefaultPathItemValidatorFactory.java   | 57 +
 .../factory/DefaultPathsValidatorFactory.java  | 54 
 .../DefaultRequestBodyValidatorFactory.java| 53 
 .../factory/DefaultResponseValidatorFactory.java   | 61 ++
 .../factory/DefaultResponsesValidatorFactory.java  | 50 +++
 .../factory/DefaultSchemaValidatorFactory.java | 43 ++
 .../DefaultSecuritySchemeValidatorFactory.java | 34 
 .../factory/DefaultServerValidatorFactory.java | 35 
 .../factory/DefaultTagValidatorFactory.java| 45 ++
 .../factory/CallbackValidatorFactory.java  | 23 ++
 .../factory/ComponentsValidatorFactory.java| 23 ++
 .../factory/EncodingValidatorFactory.java  | 23 ++
 .../factory/ExampleValidatorFactory.java   | 23 ++
 .../validation/factory/HeaderValidatorFactory.java | 23 ++
 .../validation/factory/InfoValidatorFactory.java   | 23 ++
 .../validation/factory/LinkValidatorFactory.java   | 23 ++
 .../factory/MediaTypeValidatorFactory.java | 23 ++
 .../factory/OasObjectValidatorFactory.java | 28 +++
 .../factory/OasSpecValidatorFactory.java   | 24 ++
 .../factory/OpenApiValidatorFactory.java   | 23 ++
 .../factory/OperationValidatorFactory.java | 23 ++
 .../factory/ParameterValidatorFactory.java | 23 ++
 .../factory/PathItemValidatorFactory.java  | 23 ++
 .../validation/factory/PathsValidatorFactory.java  | 23 ++
 .../factory/RequestBodyValidatorFactory.java   | 23 ++
 .../factory/ResponseValidatorFactory.java  | 23 ++
 .../factory/ResponsesValidatorFactory.java | 23 ++
 .../validation/factory/SchemaValidatorFactory.java | 23 ++
 .../factory/SecuritySchemeValidatorFactory.java| 23 ++
 .../validation/factory/ServerValidatorFactory.java | 23 ++
 .../validation/factory/TagValidatorFactory.java| 23 ++
 41 files changed, 1541 insertions(+)

diff --git a/oas-validator/oas-validator-compliance/pom.xml 
b/oas-validator/oas-validator-compliance/pom.xml
index d1bd9a8..0e40c26 100755
--- a/oas-validator/oas-validator-compliance/pom.xml
+++ b/oas-validator/oas-validator-compliance/pom.xml
@@ -30,6 +30,10 @@
 
   oas-validator-compliance
 
+  
+2.11.0
+  
+
   
 
 
@@ -38,6 +42,23 @@
   ${project.version}
 
 
+
+  org.springframework
+  spring-context
+
+
+
+  org.slf4j
+  slf4j-api
+  provided
+
+
+
+  org.slf4j
+  jul-to-slf4j
+  provided
+
+
 
 
   org.apache.servicecomb.toolkit
diff --git 
a/oas-validator/oas-validator-compliance/src/main/java/org/apache/servicecomb/toolkit/oasv/compliance/factory/DefaultComponentsValidatorFactory.java
 
b/oas-validator/oas-validator-compliance/src/main/java/org/apache/servicecomb/toolkit/oasv/compliance/factory/DefaultComponentsValidatorFactory.java
new file mode 100644
index 000..2ff27b5
--- /dev/null
+++ 
b/oas-validator/oas-validator-compliance/src/main/java/org/apache/servicecomb/toolkit/oasv/compliance/factory/DefaultComponentsValidatorFactory.java
@@ -0,0 +1,96 @@
+/*
+ * 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 WAR

[servicecomb-toolkit] 12/26: Change chmod 755 to 644 on plain test files

2019-11-07 Thread ningjiang
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 412deab6b6b74ff503843da09616faad8ad805ff
Author: Daniel Qian 
AuthorDate: Fri Nov 1 16:37:55 2019 +0800

Change chmod 755 to 644 on plain test files
---
 README-ZH.md  | 0
 README.md | 0
 cli/pom.xml   | 0
 codegen/pom.xml   | 0
 common/pom.xml| 0
 common/src/test/resources/projects/demo-with-correct-pom/pom.xml  | 0
 common/src/test/resources/projects/demo-with-invaild-pom/pom.xml  | 0
 contractgen/pom.xml   | 0
 contractgen/src/test/projects/demo/pom.xml| 0
 core/pom.xml  | 0
 docgen/pom.xml| 0
 integration-tests/coverage-aggregate/pom.xml  | 0
 integration-tests/pom.xml | 0
 oas-validator/oas-validator-compatibility-spring/pom.xml  | 0
 oas-validator/oas-validator-compatibility/pom.xml | 0
 oas-validator/oas-validator-compliance-spring/pom.xml | 0
 oas-validator/oas-validator-compliance/pom.xml| 0
 oas-validator/oas-validator-core-spring/pom.xml   | 0
 oas-validator/oas-validator-core/pom.xml  | 0
 oas-validator/oas-validator-test/pom.xml  | 0
 oas-validator/oas-validator-web/pom.xml   | 0
 oas-validator/pom.xml | 0
 pom.xml   | 0
 samples/generate-from-code-sample/GoodbyeService/pom.xml  | 0
 samples/generate-from-code-sample/HelloService/pom.xml| 0
 samples/generate-from-code-sample/pom.xml | 0
 samples/generate-from-contract-sample/pom.xml | 0
 samples/pom.xml   | 0
 samples/verify-with-code-sample/GreetingService/pom.xml   | 0
 samples/verify-with-code-sample/pom.xml   | 0
 toolkit-distribution/pom.xml  | 0
 toolkit-distribution/src/release/LICENSE  | 0
 toolkit-distribution/src/release/NOTICE   | 0
 toolkit-maven-plugin/pom.xml  | 0
 .../src/test/projects/demo-multi-module/first-module/pom.xml  | 0
 toolkit-maven-plugin/src/test/projects/demo-multi-module/pom.xml  | 0
 toolkit-maven-plugin/src/test/projects/demo-with-contract/pom.xml | 0
 toolkit-maven-plugin/src/test/projects/demo-without-contract/pom.xml  | 0
 38 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/README-ZH.md b/README-ZH.md
old mode 100755
new mode 100644
diff --git a/README.md b/README.md
old mode 100755
new mode 100644
diff --git a/cli/pom.xml b/cli/pom.xml
old mode 100755
new mode 100644
diff --git a/codegen/pom.xml b/codegen/pom.xml
old mode 100755
new mode 100644
diff --git a/common/pom.xml b/common/pom.xml
old mode 100755
new mode 100644
diff --git a/common/src/test/resources/projects/demo-with-correct-pom/pom.xml 
b/common/src/test/resources/projects/demo-with-correct-pom/pom.xml
old mode 100755
new mode 100644
diff --git a/common/src/test/resources/projects/demo-with-invaild-pom/pom.xml 
b/common/src/test/resources/projects/demo-with-invaild-pom/pom.xml
old mode 100755
new mode 100644
diff --git a/contractgen/pom.xml b/contractgen/pom.xml
old mode 100755
new mode 100644
diff --git a/contractgen/src/test/projects/demo/pom.xml 
b/contractgen/src/test/projects/demo/pom.xml
old mode 100755
new mode 100644
diff --git a/core/pom.xml b/core/pom.xml
old mode 100755
new mode 100644
diff --git a/docgen/pom.xml b/docgen/pom.xml
old mode 100755
new mode 100644
diff --git a/integration-tests/coverage-aggregate/pom.xml 
b/integration-tests/coverage-aggregate/pom.xml
old mode 100755
new mode 100644
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
old mode 100755
new mode 100644
diff --git a/oas-validator/oas-validator-compatibility-spring/pom.xml 
b/oas-validator/oas-validator-compatibility-spring/pom.xml
old mode 100755
new mode 100644
diff --git a/oas-validator/oas-validator-compatibility/pom.xml 
b/oas-validator/oas-validator-compati

[servicecomb-toolkit] 23/26: SCB-1555 Integrate oas-validator compability check to cli Update readme

2019-11-07 Thread ningjiang
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 24236c66dfab83251e69f5f9c631cf2f9fb1c7ef
Author: Daniel Qian 
AuthorDate: Thu Nov 7 15:31:00 2019 +0800

SCB-1555 Integrate oas-validator compability check to cli
Update readme
---
 README-ZH.md | 16 +++-
 README.md| 15 ++-
 2 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/README-ZH.md b/README-ZH.md
index a791b7c..747105c 100644
--- a/README-ZH.md
+++ b/README-ZH.md
@@ -275,12 +275,26 @@ $ java -jar toolkit-cli-{version}.jar docgenerate -i 
swagger.yaml -o ./document
  3.3.3 契约风格检查
 
 ```shell
-$ java -jar toolkit-cli-{version}.jar checkstyle openapi.yaml
+$ java -jar toolkit-cli-{version}.jar checkstyle oas.yaml
+或者
+$ java -jar toolkit-cli-{version}.jar cs oas.yaml
 ```
 
 > **checkstyle** Command argument
 *  OpenAPI v3 spec yaml文件
 
+ 3.3.4 契约兼容性检查
+
+```shell
+$ java -jar toolkit-cli-{version}.jar checkcompatibility left-oas.yaml 
right-oas.yaml
+或者
+$ java -jar toolkit-cli-{version}.jar cc left-oas.yaml right-oas.yaml
+```
+
+> **checkcompatibility** Command argument
+*  Two OpenAPI v3 spec yaml file
+
+
 ### 3.4 使用案例
 可以在[这里](./samples/README-ZH.md)找到使用插件的一些示例 
 
diff --git a/README.md b/README.md
index 1a43352..ba07c98 100644
--- a/README.md
+++ b/README.md
@@ -270,12 +270,25 @@ e.g:-f swagger-ui
  3.3.3 Service contract style checking
 
 ```shell
-$ java -jar toolkit-cli-{version}.jar checkstyle openapi.yaml
+$ java -jar toolkit-cli-{version}.jar checkstyle oas.yaml
+or
+$ java -jar toolkit-cli-{version}.jar cs oas.yaml
 ```
 
 > **checkstyle** Command argument
 *  OpenAPI v3 spec yaml file
 
+ 3.3.4 Service contract compatibility checking
+
+```shell
+$ java -jar toolkit-cli-{version}.jar checkcompatibility left-oas.yaml 
right-oas.yaml
+or
+$ java -jar toolkit-cli-{version}.jar cc left-oas.yaml right-oas.yaml
+```
+
+> **checkcompatibility** Command argument
+*  Two OpenAPI v3 spec yaml file
+
 
 ### 3.4 Use case
 



[GitHub] [servicecomb-toolkit] WillemJiang merged pull request #44: SCB-1569 Merge branch import-oas-validator to master

2019-11-07 Thread GitBox
WillemJiang merged pull request #44: SCB-1569 Merge branch import-oas-validator 
to master
URL: https://github.com/apache/servicecomb-toolkit/pull/44
 
 
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[servicecomb-toolkit] 17/26: SCB-1553 Integrate oas-validator compliance check to cli Increase test coverage.

2019-11-07 Thread ningjiang
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 e26fac5d7edbe618e62e7697c88d0353cbec5c15
Author: Daniel Qian 
AuthorDate: Tue Nov 5 22:56:35 2019 +0800

SCB-1553 Integrate oas-validator compliance check to cli
Increase test coverage.
---
 .../apache/servicecomb/toolkit/cli/CliTest.java| 10 
 cli/src/test/resources/oas/parser-test.yaml| 48 +++
 .../oas-validator-compatibility-spring/pom.xml |  8 ++-
 .../config/ValidatorConfigurationsTest.java| 64 
 .../src/test/resources/logback-test.xml| 22 +++
 .../oas-validator-compliance-spring/pom.xml|  6 ++
 .../config/ValidatorConfigurationsTest.java| 68 ++
 .../src/test/resources/logback-test.xml| 22 +++
 8 files changed, 247 insertions(+), 1 deletion(-)

diff --git a/cli/src/test/java/org/apache/servicecomb/toolkit/cli/CliTest.java 
b/cli/src/test/java/org/apache/servicecomb/toolkit/cli/CliTest.java
index 631bf28..3c2fd7b 100755
--- a/cli/src/test/java/org/apache/servicecomb/toolkit/cli/CliTest.java
+++ b/cli/src/test/java/org/apache/servicecomb/toolkit/cli/CliTest.java
@@ -90,4 +90,14 @@ public class CliTest {
 
 tempDir.toFile().deleteOnExit();
   }
+
+  @Test
+  public void testCheckStyle() throws IOException {
+String[] args = new String[] {
+"checkstyle",
+
Paths.get("./src/test/resources/oas/parser-test.yaml").toFile().getCanonicalPath()
+};
+ToolkitMain.main(args);
+  }
+
 }
diff --git a/cli/src/test/resources/oas/parser-test.yaml 
b/cli/src/test/resources/oas/parser-test.yaml
new file mode 100644
index 000..f7b88b5
--- /dev/null
+++ b/cli/src/test/resources/oas/parser-test.yaml
@@ -0,0 +1,48 @@
+## ---
+## 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.
+## ---
+openapi: "3.0.0"
+info:
+  version: 1.0.0
+  title: Pet petstore
+paths:
+  /pets:
+get:
+  summary: List all pets
+  operationId: listpets
+  responses:
+'200':
+  description: A paged array of pets
+
+post:
+  summary: List all pets
+  operationId: foo
+  requestBody:
+content:
+  application/x-www-form-urlencoded:
+schema:
+  type: object
+  properties:
+foo:
+  type: string
+bar:
+  type: string
+encoding:
+  foo:
+contentType: 'application/octet-stream'
+  responses:
+'200':
+  description: A paged array of pets
diff --git a/oas-validator/oas-validator-compatibility-spring/pom.xml 
b/oas-validator/oas-validator-compatibility-spring/pom.xml
index 7a4c85b..f60ee7b 100644
--- a/oas-validator/oas-validator-compatibility-spring/pom.xml
+++ b/oas-validator/oas-validator-compatibility-spring/pom.xml
@@ -41,10 +41,16 @@
   org.apache.servicecomb.toolkit
   oas-validator-core-spring
 
-
+
+
+  org.springframework.boot
+  spring-boot-starter
+
+
 
   org.springframework.boot
   spring-boot-starter-test
+  test
 
 
   
diff --git 
a/oas-validator/oas-validator-compatibility-spring/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/config/ValidatorConfigurationsTest.java
 
b/oas-validator/oas-validator-compatibility-spring/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/config/ValidatorConfigurationsTest.java
new file mode 100644
index 000..e2ca246
--- /dev/null
+++ 
b/oas-validator/oas-validator-compatibility-spring/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/config/ValidatorConfigurationsTest.java
@@ -0,0 +1,64 @@
+/*
+ * 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

[servicecomb-toolkit] 24/26: remove stdout in test

2019-11-07 Thread ningjiang
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 1109b7e4317a730f702b65c597d1cad38d8ee7a8
Author: Daniel Qian 
AuthorDate: Thu Nov 7 15:32:29 2019 +0800

remove stdout in test
---
 .../parameter/ParameterAllowReservedChangeDiffValidatorTest.java | 1 -
 1 file changed, 1 deletion(-)

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 70b82a8..a5a4b5b 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
@@ -45,7 +45,6 @@ public class ParameterAllowReservedChangeDiffValidatorTest 
extends OasCompatibil
   @Test
   public void validateBroken() {
 OpenAPI leftOpenAPI = 
loadRelative("petstore-parameter-allow-reserved-a.yaml");
-System.out.println(leftOpenAPI.toString());
 OpenAPI rightOpenAPI = 
loadRelative("petstore-parameter-allow-reserved-b.yaml");
 List violations = oasSpecDiffValidator
   .validate(createContext(leftOpenAPI, rightOpenAPI), leftOpenAPI, 
rightOpenAPI);



[servicecomb-toolkit] 26/26: fix unit test

2019-11-07 Thread ningjiang
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 a82dd34ecb111e8a7c723406abcb70f4eb511f96
Author: Daniel Qian 
AuthorDate: Thu Nov 7 18:25:04 2019 +0800

fix unit test
---
 .../factory/DefaultComponentsDiffValidatorFactoryTest.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/factory/DefaultComponentsDiffValidatorFactoryTest.java
 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/factory/DefaultComponentsDiffValidatorFactoryTest.java
index fc98e19..5652cb7 100644
--- 
a/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/factory/DefaultComponentsDiffValidatorFactoryTest.java
+++ 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/factory/DefaultComponentsDiffValidatorFactoryTest.java
@@ -38,7 +38,7 @@ public class DefaultComponentsDiffValidatorFactoryTest {
   @Test
   public void create() {
 List validators = validatorFactory.create();
-assertThat(validators).hasSize(7);
+assertThat(validators).hasSize(6);
   }
 }
 



[servicecomb-toolkit] 08/26: SCB-1553 Integrate oas-validator compliance check to cli Translate chinese prompt message to english

2019-11-07 Thread ningjiang
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 b5120d35318ed431a3f35d20c06e0ffdd3b9d0df
Author: Daniel Qian 
AuthorDate: Fri Nov 1 15:35:40 2019 +0800

SCB-1553 Integrate oas-validator compliance check to cli
Translate chinese prompt message to english
---
 .../validator/openapi/OpenApiSecurityEmptyValidator.java   |  2 +-
 .../validator/openapi/OpenApiTagNotEmptyValidator.java |  2 +-
 .../compliance/validator/openapi/OpenApiVersionValidator.java  |  2 +-
 .../validator/operation/OperationServersEmptyValidator.java|  2 +-
 .../validator/operation/OperationTagsOnlyOneValidator.java |  2 +-
 .../validator/operation/OperationTagsReferenceValidator.java   |  2 +-
 .../parameter/ParameterDescriptionRequiredValidator.java   |  2 +-
 .../requestbody/RequestBodyDescriptionRequiredValidator.java   |  2 +-
 .../oasv/compliance/validator/tag/TagReferenceValidator.java   |  2 +-
 .../header/HeaderDescriptionRequiredValidatorTest.java |  7 ---
 .../validator/info/InfoDescriptionRequiredValidatorTest.java   |  3 ++-
 .../validator/openapi/OpenApiTagsSizeValidatorTest.java|  2 +-
 .../validator/openapi/OpenApiVersionValidatorTest.java |  2 +-
 .../validator/operation/OperationTagsOnlyOneValidatorTest.java |  2 +-
 .../operation/OperationTagsReferenceValidatorTest.java |  2 +-
 .../validator/tag/TagDescriptionRequiredValidatorTest.java |  3 ++-
 .../validator/tag/TagNameUpperCamelCaseValidatorTest.java  |  3 ++-
 .../compliance/validator/tag/TagReferenceValidatorTest.java|  2 +-
 .../toolkit/oasv/validation/api/ViolationMessages.java | 10 +-
 .../servicecomb/toolkit/oasv/util/StringCaseUtilsTest.java |  5 ++---
 20 files changed, 31 insertions(+), 28 deletions(-)

diff --git 
a/oas-validator/oas-validator-compliance/src/main/java/org/apache/servicecomb/toolkit/oasv/compliance/validator/openapi/OpenApiSecurityEmptyValidator.java
 
b/oas-validator/oas-validator-compliance/src/main/java/org/apache/servicecomb/toolkit/oasv/compliance/validator/openapi/OpenApiSecurityEmptyValidator.java
index 432b0f7..5655a87 100755
--- 
a/oas-validator/oas-validator-compliance/src/main/java/org/apache/servicecomb/toolkit/oasv/compliance/validator/openapi/OpenApiSecurityEmptyValidator.java
+++ 
b/oas-validator/oas-validator-compliance/src/main/java/org/apache/servicecomb/toolkit/oasv/compliance/validator/openapi/OpenApiSecurityEmptyValidator.java
@@ -35,7 +35,7 @@ import static java.util.Collections.singletonList;
  * https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#openapi-object";>OpenAPI
 Object
  * .security属性校验器
  * 
- * 不允许提供
+ * This field is not allowed
  * 
  */
 public class OpenApiSecurityEmptyValidator implements OpenApiValidator {
diff --git 
a/oas-validator/oas-validator-compliance/src/main/java/org/apache/servicecomb/toolkit/oasv/compliance/validator/openapi/OpenApiTagNotEmptyValidator.java
 
b/oas-validator/oas-validator-compliance/src/main/java/org/apache/servicecomb/toolkit/oasv/compliance/validator/openapi/OpenApiTagNotEmptyValidator.java
index ac92737..803a691 100755
--- 
a/oas-validator/oas-validator-compliance/src/main/java/org/apache/servicecomb/toolkit/oasv/compliance/validator/openapi/OpenApiTagNotEmptyValidator.java
+++ 
b/oas-validator/oas-validator-compliance/src/main/java/org/apache/servicecomb/toolkit/oasv/compliance/validator/openapi/OpenApiTagNotEmptyValidator.java
@@ -43,7 +43,7 @@ public class OpenApiTagNotEmptyValidator implements 
OpenApiValidator {
   public List validate(OasValidationContext context, 
OasObjectPropertyLocation location, OpenAPI openAPI) {
 
 if (CollectionUtils.isEmpty(openAPI.getTags())) {
-  return singletonList(new OasViolation(location.property("tags", 
OasObjectType.TAG), "至少提供一个"));
+  return singletonList(new OasViolation(location.property("tags", 
OasObjectType.TAG), "At least provide one tag"));
 
 }
 return emptyList();
diff --git 
a/oas-validator/oas-validator-compliance/src/main/java/org/apache/servicecomb/toolkit/oasv/compliance/validator/openapi/OpenApiVersionValidator.java
 
b/oas-validator/oas-validator-compliance/src/main/java/org/apache/servicecomb/toolkit/oasv/compliance/validator/openapi/OpenApiVersionValidator.java
index 3b3faca..3ea279a 100755
--- 
a/oas-validator/oas-validator-compliance/src/main/java/org/apache/servicecomb/toolkit/oasv/compliance/validator/openapi/OpenApiVersionValidator.java
+++ 
b/oas-validator/oas-validator-compliance/src/main/java/org/apache/servicecomb/toolkit/oasv/compliance/validator/openapi/OpenApiVersionValidator.java
@@ -47,7 +47,7 @@ public class OpenApiVersionValidator implements 
OpenApiValidator {
 if (ok) {
   return emptyList();
 }
-return singletonList(new OasViolation(location.property("openapi"), 
"必须>=3.0.2"));
+return si

[servicecomb-toolkit] 18/26: SCB-1553 Integrate oas-validator compliance check to cli Add abbr for checkstyle subcommand: cs

2019-11-07 Thread ningjiang
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 fcd97abb68f88a10d10e32d0b49102a40b9108b4
Author: Daniel Qian 
AuthorDate: Wed Nov 6 09:55:34 2019 +0800

SCB-1553 Integrate oas-validator compliance check to cli
Add abbr for checkstyle subcommand: cs
---
 .../apache/servicecomb/toolkit/cli/CheckStyle.java | 103 +
 .../servicecomb/toolkit/cli/CheckStyleAbbr.java|  26 ++
 .../cli/{CheckStyle.java => CheckStyleBase.java}   |   7 +-
 .../servicecomb/toolkit/cli/ToolkitMain.java   |   2 +-
 .../apache/servicecomb/toolkit/cli/CliTest.java|   9 ++
 5 files changed, 40 insertions(+), 107 deletions(-)

diff --git 
a/cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckStyle.java 
b/cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckStyle.java
index 2ea2f99..6cd820b 100644
--- a/cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckStyle.java
+++ b/cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckStyle.java
@@ -17,109 +17,10 @@
 
 package org.apache.servicecomb.toolkit.cli;
 
-import java.io.IOException;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.List;
-
-import org.apache.commons.collections4.CollectionUtils;
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.IOUtils;
-import org.apache.servicecomb.toolkit.oasv.common.OasObjectProperty;
-import org.apache.servicecomb.toolkit.oasv.common.OasObjectPropertyLocation;
-import org.apache.servicecomb.toolkit.oasv.compliance.ComplianceCheckParser;
-import 
org.apache.servicecomb.toolkit.oasv.compliance.factory.DefaultOasSpecValidatorFactory;
-import org.apache.servicecomb.toolkit.oasv.validation.api.OasSpecValidator;
-import org.apache.servicecomb.toolkit.oasv.validation.api.OasValidationContext;
-import org.apache.servicecomb.toolkit.oasv.validation.api.OasViolation;
-import 
org.apache.servicecomb.toolkit.oasv.validation.factory.OasSpecValidatorFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import 
org.springframework.context.annotation.AnnotationConfigApplicationContext;
-
-import io.airlift.airline.Arguments;
 import io.airlift.airline.Command;
-import io.swagger.v3.oas.models.OpenAPI;
-import io.swagger.v3.parser.core.models.SwaggerParseResult;
 
 @Command(name = "checkstyle",
-description = "Check style of OpenAPI v3 spec yaml")
-public class CheckStyle implements Runnable {
-
-  private final static Logger LOGGER = 
LoggerFactory.getLogger(CheckStyle.class);
-
-  @Arguments(
-  title = "file", required = true,
-  description = "OpenAPI v3 spec yaml"
-  )
-  private String filePath;
-
-  @Override
-  public void run() {
-
-String yaml = null;
-try {
-  yaml = loadFileContent(filePath);
-} catch (IOException e) {
-  LOGGER.error(e.getMessage());
-  return;
-}
-
-SwaggerParseResult parseResult = ComplianceCheckParser.parseYaml(yaml);
-OpenAPI openAPI = parseResult.getOpenAPI();
-if (openAPI == null) {
-  if (CollectionUtils.isNotEmpty(parseResult.getMessages())) {
-for (String message : parseResult.getMessages()) {
-  LOGGER.error(message);
-}
-  }
-  LOGGER.error("Parse error");
-  return;
-}
-
-OasSpecValidator oasSpecValidator = createOasSpecValidator();
-
-List violations = 
oasSpecValidator.validate(createContext(openAPI), openAPI);
-if (CollectionUtils.isNotEmpty(violations)) {
-  for (OasViolation violation : violations) {
-LOGGER.info("{}: {}", toPathString(violation.getLocation()), 
violation.getError());
-  }
-  return;
-}
-LOGGER.info("Everything is good");
-  }
-
-  private String toPathString(OasObjectPropertyLocation location) {
-StringBuilder sb = new StringBuilder();
-List path = location.getPath();
-for (OasObjectProperty property : path) {
-  sb.append(property.getName()).append('.');
-}
-sb.deleteCharAt(sb.length() - 1);
-return sb.toString();
-  }
-
-  private OasSpecValidator createOasSpecValidator() {
-AnnotationConfigApplicationContext ctx = new 
AnnotationConfigApplicationContext(
-DefaultOasSpecValidatorFactory.class.getPackage().getName());
-try {
-  OasSpecValidatorFactory oasSpecValidatorFactory = 
ctx.getBean(OasSpecValidatorFactory.class);
-  return oasSpecValidatorFactory.create();
-} finally {
-  ctx.close();
-}
-  }
-
-
-  private String loadFileContent(String filePath) throws IOException {
-Path specPath = Paths.get(filePath);
-specPath.toAbsolutePath().toString();
-return FileUtils.readFileToString(specPath.toFile());
-  }
-
-  private OasValidationContext createContext(OpenAPI openAPI) {
+description = "Check style for OpenAPI v3 spec yaml")
+public class CheckStyle extends CheckStyleBase {
 
-OasValidationContext oasValidationContext =

[servicecomb-toolkit] 13/26: SCB-1553 Integrate oas-validator compliance check to cli Add oas-validator style check usage to README

2019-11-07 Thread ningjiang
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 5d64553aadb39cbc325a4e866ebf72be1dbe9ac0
Author: Daniel Qian 
AuthorDate: Fri Nov 1 17:03:07 2019 +0800

SCB-1553 Integrate oas-validator compliance check to cli
Add oas-validator style check usage to README
---
 README-ZH.md |  9 +
 README.md| 17 ++---
 2 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/README-ZH.md b/README-ZH.md
index 9514ce1..a791b7c 100644
--- a/README-ZH.md
+++ b/README-ZH.md
@@ -272,6 +272,15 @@ $ java -jar toolkit-cli-{version}.jar docgenerate -i 
swagger.yaml -o ./document
 * -f, --format : 指定输出文档风格,现支持swagger-ui
 例:-f swagger-ui
 
+ 3.3.3 契约风格检查
+
+```shell
+$ java -jar toolkit-cli-{version}.jar checkstyle openapi.yaml
+```
+
+> **checkstyle** Command argument
+*  OpenAPI v3 spec yaml文件
+
 ### 3.4 使用案例
 可以在[这里](./samples/README-ZH.md)找到使用插件的一些示例 
 
diff --git a/README.md b/README.md
index 5a0aabf..1a43352 100644
--- a/README.md
+++ b/README.md
@@ -261,13 +261,24 @@ $ java -jar toolkit-cli-{version}.jar docgenerate -i 
swagger.yaml -o ./document
 ```
 > **docgenerate** Command option
 * -i, --input. Specifies contract files that follow the OpenAPI specification, 
supports yaml and json formats, and supports specifying local and network files.
-例:-i http://petstore.swagger.io/v2/swagger.json
+e.g:-i http://petstore.swagger.io/v2/swagger.json
 * -o, --output. Document output path.
-例:-o ./document
+e.g:-o ./document
 * -f, --format. Specifies the output document format, now supports swagger-ui
-例:-f swagger-ui
+e.g:-f swagger-ui
+
+ 3.3.3 Service contract style checking
+
+```shell
+$ java -jar toolkit-cli-{version}.jar checkstyle openapi.yaml
+```
+
+> **checkstyle** Command argument
+*  OpenAPI v3 spec yaml file
+
 
 ### 3.4 Use case
+
 some example of using plugin can be found [here](./samples)
 
 ## 4 Contact us



[servicecomb-toolkit] 10/26: SCB-1553 Integrate oas-validator compliance check to cli Add compliance check capability to cli

2019-11-07 Thread ningjiang
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 c09b33fea6f78b54db4f20002d1027475042b491
Author: Daniel Qian 
AuthorDate: Fri Nov 1 16:33:47 2019 +0800

SCB-1553 Integrate oas-validator compliance check to cli
Add compliance check capability to cli
---
 cli/pom.xml|   5 +
 .../apache/servicecomb/toolkit/cli/CheckStyle.java | 125 +
 .../servicecomb/toolkit/cli/ToolkitMain.java   |   2 +-
 pom.xml|  43 +++
 4 files changed, 174 insertions(+), 1 deletion(-)

diff --git a/cli/pom.xml b/cli/pom.xml
index 750c82f..6a222d7 100755
--- a/cli/pom.xml
+++ b/cli/pom.xml
@@ -80,6 +80,11 @@
   log4j-core
   ${log4j2.version}
 
+
+
+  org.apache.servicecomb.toolkit
+  oas-validator-compliance
+
   
 
   
diff --git 
a/cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckStyle.java 
b/cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckStyle.java
new file mode 100644
index 000..2ea2f99
--- /dev/null
+++ b/cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckStyle.java
@@ -0,0 +1,125 @@
+/*
+ * 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.cli;
+
+import java.io.IOException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.List;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
+import org.apache.servicecomb.toolkit.oasv.common.OasObjectProperty;
+import org.apache.servicecomb.toolkit.oasv.common.OasObjectPropertyLocation;
+import org.apache.servicecomb.toolkit.oasv.compliance.ComplianceCheckParser;
+import 
org.apache.servicecomb.toolkit.oasv.compliance.factory.DefaultOasSpecValidatorFactory;
+import org.apache.servicecomb.toolkit.oasv.validation.api.OasSpecValidator;
+import org.apache.servicecomb.toolkit.oasv.validation.api.OasValidationContext;
+import org.apache.servicecomb.toolkit.oasv.validation.api.OasViolation;
+import 
org.apache.servicecomb.toolkit.oasv.validation.factory.OasSpecValidatorFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import 
org.springframework.context.annotation.AnnotationConfigApplicationContext;
+
+import io.airlift.airline.Arguments;
+import io.airlift.airline.Command;
+import io.swagger.v3.oas.models.OpenAPI;
+import io.swagger.v3.parser.core.models.SwaggerParseResult;
+
+@Command(name = "checkstyle",
+description = "Check style of OpenAPI v3 spec yaml")
+public class CheckStyle implements Runnable {
+
+  private final static Logger LOGGER = 
LoggerFactory.getLogger(CheckStyle.class);
+
+  @Arguments(
+  title = "file", required = true,
+  description = "OpenAPI v3 spec yaml"
+  )
+  private String filePath;
+
+  @Override
+  public void run() {
+
+String yaml = null;
+try {
+  yaml = loadFileContent(filePath);
+} catch (IOException e) {
+  LOGGER.error(e.getMessage());
+  return;
+}
+
+SwaggerParseResult parseResult = ComplianceCheckParser.parseYaml(yaml);
+OpenAPI openAPI = parseResult.getOpenAPI();
+if (openAPI == null) {
+  if (CollectionUtils.isNotEmpty(parseResult.getMessages())) {
+for (String message : parseResult.getMessages()) {
+  LOGGER.error(message);
+}
+  }
+  LOGGER.error("Parse error");
+  return;
+}
+
+OasSpecValidator oasSpecValidator = createOasSpecValidator();
+
+List violations = 
oasSpecValidator.validate(createContext(openAPI), openAPI);
+if (CollectionUtils.isNotEmpty(violations)) {
+  for (OasViolation violation : violations) {
+LOGGER.info("{}: {}", toPathString(violation.getLocation()), 
violation.getError());
+  }
+  return;
+}
+LOGGER.info("Everything is good");
+  }
+
+  private String toPathString(OasObjectPropertyLocation location) {
+StringBuilder sb = new StringBuilder();
+List path = location.getPath();
+for (OasObjectProperty property : path) {
+  sb.append(property.getNam

[servicecomb-toolkit] 14/26: SCB-1553 Integrate oas-validator compliance check to cli Fix license header missing issue

2019-11-07 Thread ningjiang
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 fd90d8de826d4d71e2a3c37a78370a64f490c44f
Author: Daniel Qian 
AuthorDate: Sat Nov 2 09:00:57 2019 +0800

SCB-1553 Integrate oas-validator compliance check to cli
Fix license header missing issue
---
 .../oasv/compatibility/CompatibilityCheckParser.java| 17 +
 .../toolkit/oasv/compliance/ComplianceCheckParser.java  | 17 +
 .../factory/DefaultOpenApiValidatorFactoryTest.java | 17 +
 3 files changed, 51 insertions(+)

diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/CompatibilityCheckParser.java
 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/CompatibilityCheckParser.java
index 18fa225..13a52f8 100644
--- 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/CompatibilityCheckParser.java
+++ 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/CompatibilityCheckParser.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.compatibility;
 
 import static java.util.Collections.emptyList;
diff --git 
a/oas-validator/oas-validator-compliance/src/main/java/org/apache/servicecomb/toolkit/oasv/compliance/ComplianceCheckParser.java
 
b/oas-validator/oas-validator-compliance/src/main/java/org/apache/servicecomb/toolkit/oasv/compliance/ComplianceCheckParser.java
index ad08cff..7f0bf4a 100644
--- 
a/oas-validator/oas-validator-compliance/src/main/java/org/apache/servicecomb/toolkit/oasv/compliance/ComplianceCheckParser.java
+++ 
b/oas-validator/oas-validator-compliance/src/main/java/org/apache/servicecomb/toolkit/oasv/compliance/ComplianceCheckParser.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.compliance;
 
 import static java.util.Collections.emptyList;
diff --git 
a/oas-validator/oas-validator-compliance/src/test/java/org/apache/servicecomb/toolkit/oasv/compliance/factory/DefaultOpenApiValidatorFactoryTest.java
 
b/oas-validator/oas-validator-compliance/src/test/java/org/apache/servicecomb/toolkit/oasv/compliance/factory/DefaultOpenApiValidatorFactoryTest.java
index 7b9f8ef..349efd5 100644
--- 
a/oas-validator/oas-validator-compliance/src/test/java/org/apache/servicecomb/toolkit/oasv/compliance/factory/DefaultOpenApiValidatorFactoryTest.java
+++ 
b/oas-validator/oas-validator-compliance/src/test/java/org/apache/servicecomb/toolkit/oasv/compliance/factory/DefaultOpenApiValidatorFactoryTest.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

[servicecomb-toolkit] 16/26: SCB-1553 Integrate oas-validator compliance check to cli Fix syntax check logical bug.

2019-11-07 Thread ningjiang
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 0927cd177ca8b9e88d25049252ff2a6149e30657
Author: Daniel Qian 
AuthorDate: Tue Nov 5 22:55:28 2019 +0800

SCB-1553 Integrate oas-validator compliance check to cli
Fix syntax check logical bug.
---
 .../compatibility/CompatibilityCheckParser.java|  9 
 .../CompatibilityCheckParserTest.java} | 40 +++--
 .../toolkit/oasv/compatibility/parser-test.yaml| 48 +
 .../oasv/compliance/ComplianceCheckParser.java |  9 
 .../compliance/ComplianceCheckParserTest.java} | 40 +++--
 .../toolkit/oasv/compliance/parser-test.yaml   | 48 +
 .../toolkit/oasv/util/SyntaxChecker.java}  | 29 ++---
 .../toolkit/oasv/util/SyntaxCheckerTest.java   | 50 ++
 .../servicecomb/toolkit/oasv/util/syntax-bad.yaml  | 48 +
 .../servicecomb/toolkit/oasv/util/syntax-good.yaml | 48 +
 .../api/controller/CompatibilityController.java|  5 ++-
 .../web/api/controller/ComplianceController.java   |  3 +-
 12 files changed, 289 insertions(+), 88 deletions(-)

diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/CompatibilityCheckParser.java
 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/CompatibilityCheckParser.java
index 13a52f8..4ca49f7 100644
--- 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/CompatibilityCheckParser.java
+++ 
b/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/CompatibilityCheckParser.java
@@ -17,10 +17,6 @@
 
 package org.apache.servicecomb.toolkit.oasv.compatibility;
 
-import static java.util.Collections.emptyList;
-
-import java.util.List;
-
 import io.swagger.v3.parser.OpenAPIV3Parser;
 import io.swagger.v3.parser.core.models.ParseOptions;
 import io.swagger.v3.parser.core.models.SwaggerParseResult;
@@ -36,11 +32,6 @@ public abstract class CompatibilityCheckParser {
 return parser.readContents(yaml, null, createParseOptions());
   }
 
-  public static List checkSyntax(String yaml) {
-SwaggerParseResult result = parseYaml(yaml);
-return result.getMessages() == null ? emptyList() : result.getMessages();
-  }
-
   private static ParseOptions createParseOptions() {
 
 ParseOptions parseOptions = new ParseOptions();
diff --git 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/CompatibilityCheckParser.java
 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/CompatibilityCheckParserTest.java
similarity index 50%
copy from 
oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/CompatibilityCheckParser.java
copy to 
oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/CompatibilityCheckParserTest.java
index 13a52f8..8846d29 100644
--- 
a/oas-validator/oas-validator-compatibility/src/main/java/org/apache/servicecomb/toolkit/oasv/compatibility/CompatibilityCheckParser.java
+++ 
b/oas-validator/oas-validator-compatibility/src/test/java/org/apache/servicecomb/toolkit/oasv/compatibility/CompatibilityCheckParserTest.java
@@ -17,37 +17,27 @@
 
 package org.apache.servicecomb.toolkit.oasv.compatibility;
 
-import static java.util.Collections.emptyList;
 
-import java.util.List;
+import static org.assertj.core.api.Assertions.assertThat;
 
-import io.swagger.v3.parser.OpenAPIV3Parser;
-import io.swagger.v3.parser.core.models.ParseOptions;
-import io.swagger.v3.parser.core.models.SwaggerParseResult;
-
-public abstract class CompatibilityCheckParser {
+import org.junit.Test;
 
-  private CompatibilityCheckParser() {
-// singleton
-  }
+import io.swagger.v3.parser.core.models.SwaggerParseResult;
+import io.swagger.v3.parser.util.ClasspathHelper;
 
-  public static SwaggerParseResult parseYaml(String yaml) {
-OpenAPIV3Parser parser = new OpenAPIV3Parser();
-return parser.readContents(yaml, null, createParseOptions());
-  }
+public class CompatibilityCheckParserTest {
 
-  public static List checkSyntax(String yaml) {
-SwaggerParseResult result = parseYaml(yaml);
-return result.getMessages() == null ? emptyList() : result.getMessages();
+  @Test
+  public void parseYaml() {
+String yaml = loadRelative("parser-test.yaml");
+SwaggerParseResult swaggerParseResult = 
CompatibilityCheckParser.parseYaml(yaml);
+assertThat(swaggerParseResult).isNotNull();
+assertThat(swaggerParseResult.getOpenAPI()).isNotNull();
+assertThat(swaggerParseResult.getMessages()).isE

[servicecomb-toolkit] 02/26: SCB-1548 fix license header issue and remove unnecessary ci files

2019-11-07 Thread ningjiang
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 c023d3b75f4c363041b803b34e53113494bdb40c
Author: Daniel Qian 
AuthorDate: Mon Oct 28 10:11:42 2019 +0800

SCB-1548 fix license header issue and remove unnecessary ci files
---
 oas-validator/.mvn/wrapper/maven-wrapper.jar   | Bin 48336 -> 0 bytes
 .../.mvn/wrapper/maven-wrapper.properties  |   1 -
 oas-validator/Jenkinsfile  |  61 --
 oas-validator/mvnw | 227 -
 oas-validator/mvnw.cmd | 145 -
 .../src/main/resources/META-INF/spring.factories   |  17 ++
 .../src/main/resources/META-INF/spring.factories   |  17 ++
 .../src/main/resources/META-INF/spring.factories   |  17 ++
 .../templates/validator/compatibility.html |  16 ++
 9 files changed, 67 insertions(+), 434 deletions(-)

diff --git a/oas-validator/.mvn/wrapper/maven-wrapper.jar 
b/oas-validator/.mvn/wrapper/maven-wrapper.jar
deleted file mode 100755
index f775b1c..000
Binary files a/oas-validator/.mvn/wrapper/maven-wrapper.jar and /dev/null differ
diff --git a/oas-validator/.mvn/wrapper/maven-wrapper.properties 
b/oas-validator/.mvn/wrapper/maven-wrapper.properties
deleted file mode 100755
index eb91947..000
--- a/oas-validator/.mvn/wrapper/maven-wrapper.properties
+++ /dev/null
@@ -1 +0,0 @@
-distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.3/apache-maven-3.3.3-bin.zip
\ No newline at end of file
diff --git a/oas-validator/Jenkinsfile b/oas-validator/Jenkinsfile
deleted file mode 100755
index ea54d66..000
--- a/oas-validator/Jenkinsfile
+++ /dev/null
@@ -1,61 +0,0 @@
-pipeline {
-  agent any
-
-  triggers {
-// 每30分钟检查一下GIT仓库
-pollSCM '*/30 * * * *'
-  }
-
-  options {
-// 禁止因Multibranch pipeline index动作触发构建
-overrideIndexTriggers false
-// 禁止并发构建
-disableConcurrentBuilds()
-// 构建结果保留天数10天,最多保留10个
-buildDiscarder logRotator(daysToKeepStr: '30', numToKeepStr: '10')
-// 控制台打出时间戳
-// timestamps()
-// 构建超时设置:15分钟
-timeout(30)
-  }
-
-  stages {
-
-stage('Build & Test') {
-
-  steps {
-withMaven(
-  // Jenkins全局工具设置的Maven的名字
-  maven: 'Maven3',
-  // Jenkins全局工具设置的JDK的名字,有JDK6,JDK7,JDK8可选
-  jdk: 'JDK8',
-  // 指定maven本地仓库路径为项目working dir下的.local-m2-reop,可以避免因并发构建导致本地仓库混乱的问题
-  mavenLocalRepo: '.local-m2-repo'
-) {
-  sh 'mvn -f ./ clean install'
-}
-  }
-
-}
-
-
-  }
-
-  post {
-always {
-  // 发送邮件到本次change所包含的committer
-  emailext recipientProviders: [developers()],
-subject: "Pipeline [${currentBuild.fullDisplayName}] built 
${currentBuild.currentResult}",
-body: "More details: ${currentBuild.absoluteUrl}"
-
-}
-cleanup {
-  // 清空workspace,节省Jenkins服务器磁盘空间
-  echo 'Cleanup workspace'
-  withMaven(maven: 'Maven3', jdk: 'JDK8', mavenLocalRepo: 
'.local-m2-repo', publisherStrategy: 'EXPLICIT') {
-sh 'mvn -f ./ clean'
-  }
-
-}
-  }
-}
diff --git a/oas-validator/mvnw b/oas-validator/mvnw
deleted file mode 100755
index e96ccd5..000
--- a/oas-validator/mvnw
+++ /dev/null
@@ -1,227 +0,0 @@
-#!/bin/sh
-# 
-# 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.
-# 
-
-# 
-# Maven2 Start Up Batch script
-#
-# Required ENV vars:
-# --
-#   JAVA_HOME - location of a JDK home dir
-#
-# Optional ENV vars
-# -
-#   M2_HOME - location of maven2's installed home dir
-#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
-# e.g. to debug Maven itself, use
-#   set MAVEN_OPTS=-Xdebug 
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
-#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
-# --

[servicecomb-toolkit] 04/26: SCB-1553 Integrate oas-validator compliance check to cli Sub task: connect oas-validator pom.xml with toolkit pom.xml, so it's included in the CI.

2019-11-07 Thread ningjiang
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 6c89bc2b15c38935e0af8ee8585e40c830689080
Author: Daniel Qian 
AuthorDate: Wed Oct 30 15:19:39 2019 +0800

SCB-1553 Integrate oas-validator compliance check to cli
Sub task: connect oas-validator pom.xml with toolkit pom.xml,
so it's included in the CI.
---
 .../oas-validator-compatibility-spring/pom.xml |   5 +-
 oas-validator/oas-validator-compatibility/pom.xml  |   8 +-
 .../oas-validator-compliance-spring/pom.xml|   4 +-
 oas-validator/oas-validator-compliance/pom.xml |   4 +-
 oas-validator/oas-validator-core-spring/pom.xml|   5 +-
 oas-validator/oas-validator-core/pom.xml   |   5 +-
 oas-validator/oas-validator-test/pom.xml   |   5 +-
 oas-validator/oas-validator-web/pom.xml|  20 +-
 oas-validator/pom.xml  | 207 +
 pom.xml|   1 +
 10 files changed, 34 insertions(+), 230 deletions(-)

diff --git a/oas-validator/oas-validator-compatibility-spring/pom.xml 
b/oas-validator/oas-validator-compatibility-spring/pom.xml
index 913db0c..8a262a4 100755
--- a/oas-validator/oas-validator-compatibility-spring/pom.xml
+++ b/oas-validator/oas-validator-compatibility-spring/pom.xml
@@ -18,7 +18,6 @@
 
 http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
https://maven.apache.org/xsd/maven-4.0.0.xsd";>
-  4.0.0
 
   
 org.apache.servicecomb.toolkit
@@ -27,9 +26,9 @@
 ../pom.xml
   
 
-  org.apache.servicecomb.toolkit
+  4.0.0
+
   oas-validator-compatibility-spring
-  ${parent.version}
 
   
 
diff --git a/oas-validator/oas-validator-compatibility/pom.xml 
b/oas-validator/oas-validator-compatibility/pom.xml
index cb4bb4d..926f9c0 100755
--- a/oas-validator/oas-validator-compatibility/pom.xml
+++ b/oas-validator/oas-validator-compatibility/pom.xml
@@ -18,7 +18,6 @@
 
 http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
https://maven.apache.org/xsd/maven-4.0.0.xsd";>
-  4.0.0
 
   
 org.apache.servicecomb.toolkit
@@ -27,12 +26,9 @@
 ../pom.xml
   
 
-  org.apache.servicecomb.toolkit
-  oas-validator-compatibility
-  ${parent.version}
+  4.0.0
 
-  
-  
+  oas-validator-compatibility
 
   
 
diff --git a/oas-validator/oas-validator-compliance-spring/pom.xml 
b/oas-validator/oas-validator-compliance-spring/pom.xml
index d6a10d8..91ffb81 100755
--- a/oas-validator/oas-validator-compliance-spring/pom.xml
+++ b/oas-validator/oas-validator-compliance-spring/pom.xml
@@ -18,7 +18,6 @@
 
 http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
https://maven.apache.org/xsd/maven-4.0.0.xsd";>
-  4.0.0
 
   
 org.apache.servicecomb.toolkit
@@ -27,7 +26,8 @@
 ../pom.xml
   
 
-  org.apache.servicecomb.toolkit
+  4.0.0
+
   oas-validator-compliance-spring
 
   
diff --git a/oas-validator/oas-validator-compliance/pom.xml 
b/oas-validator/oas-validator-compliance/pom.xml
index 4b61abb..d1bd9a8 100755
--- a/oas-validator/oas-validator-compliance/pom.xml
+++ b/oas-validator/oas-validator-compliance/pom.xml
@@ -18,7 +18,6 @@
 
 http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
https://maven.apache.org/xsd/maven-4.0.0.xsd";>
-  4.0.0
 
   
 org.apache.servicecomb.toolkit
@@ -27,7 +26,8 @@
 ../pom.xml
   
 
-  org.apache.servicecomb.toolkit
+  4.0.0
+
   oas-validator-compliance
 
   
diff --git a/oas-validator/oas-validator-core-spring/pom.xml 
b/oas-validator/oas-validator-core-spring/pom.xml
index 5af317e..166649c 100755
--- a/oas-validator/oas-validator-core-spring/pom.xml
+++ b/oas-validator/oas-validator-core-spring/pom.xml
@@ -18,7 +18,6 @@
 
 http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
https://maven.apache.org/xsd/maven-4.0.0.xsd";>
-  4.0.0
 
   
 org.apache.servicecomb.toolkit
@@ -27,9 +26,9 @@
 ../pom.xml
   
 
-  org.apache.servicecomb.toolkit
+  4.0.0
+
   oas-validator-core-spring
-  jar
 
   
 
diff --git a/oas-validator/oas-validator-core/pom.xml 
b/oas-validator/oas-validator-core/pom.xml
index cc6ea34..92e381c 100755
--- a/oas-validator/oas-validator-core/pom.xml
+++ b/oas-validator/oas-validator-core/pom.xml
@@ -18,7 +18,6 @@
 
 http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
https://maven.apache.org/xsd/maven-4.0.0.xs

[servicecomb-toolkit] 05/26: SCB-1553 Integrate oas-validator compliance check to cli update LICENSE files

2019-11-07 Thread ningjiang
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 5fc4a873ff3740ede4ffd4e07293b3ba30291bc1
Author: Daniel Qian 
AuthorDate: Thu Oct 31 16:03:39 2019 +0800

SCB-1553 Integrate oas-validator compliance check to cli
update LICENSE files
---
 LICENSE|   0
 toolkit-distribution/src/release/LICENSE   | 202 +++--
 .../src/release/licenses/LICENSE-asm   |  27 +++
 .../src/release/licenses/LICENSE-cal10n|   0
 .../src/release/licenses/LICENSE-cc0   |  27 +++
 .../src/release/licenses/LICENSE-cddl  |   0
 .../licenses/{LICENSE-cddl => LICENSE-cddl-gplv2}  |   1 +
 .../src/release/licenses/LICENSE-commonmark|   0
 .../src/release/licenses/LICENSE-epl-v10   |   0
 .../src/release/licenses/LICENSE-hamcrest  |   0
 .../src/release/licenses/LICENSE-jopt  |  22 +++
 .../src/release/licenses/LICENSE-lombok|  19 ++
 .../src/release/licenses/LICENSE-mit   |  21 +++
 .../src/release/licenses/LICENSE-mockito   |  21 +++
 .../src/release/licenses/LICENSE-mozilla-v20   |   0
 .../src/release/licenses/LICENSE-slf4j |   0
 .../src/release/licenses/LICENSE-webjars   |  21 +++
 .../release/licenses/LICENSE-woodstox-stax2-api|   0
 .../src/release/licenses/NOTICE-airline|   0
 .../src/release/licenses/NOTICE-apache-commons-cli |   0
 .../release/licenses/NOTICE-apache-commons-codec   |   0
 .../licenses/NOTICE-servicecomb-java-chassis   |   0
 22 files changed, 343 insertions(+), 18 deletions(-)

diff --git a/LICENSE b/LICENSE
old mode 100755
new mode 100644
diff --git a/toolkit-distribution/src/release/LICENSE 
b/toolkit-distribution/src/release/LICENSE
index 6e988f1..cf82798 100755
--- a/toolkit-distribution/src/release/LICENSE
+++ b/toolkit-distribution/src/release/LICENSE
@@ -246,7 +246,10 @@ MIT license.
 For details, see http://www.slf4j.org
 You can find a copy of the License at licenses/LICENSE-slf4j
 
+* JUL to SLF4J bridge (org.slf4j:jul-to-slf4j:1.7.26 - http://www.slf4j.org)
+* SLF4J API Module (org.slf4j:slf4j-api:1.6.3 - http://www.slf4j.org)
 * SLF4J API Module (org.slf4j:slf4j-api:1.7.12 - http://www.slf4j.org)
+* SLF4J API Module (org.slf4j:slf4j-api:1.7.25 - http://www.slf4j.org)
 * SLF4J Extensions Module (org.slf4j:slf4j-ext:1.7.12 - http://www.slf4j.org)
 * SLF4J Simple Binding (org.slf4j:slf4j-simple:1.7.12 - http://www.slf4j.org)
 
@@ -256,6 +259,7 @@ For details, see 
https://github.com/hamcrest/JavaHamcrest/blob/master/LICENSE.tx
 You can find a copy of the License at licenses/LICENSE-hamcrest
 
 * Hamcrest Core (org.hamcrest:hamcrest-core:1.3 - 
https://github.com/hamcrest/JavaHamcrest/hamcrest-core)
+* Hamcrest library (org.hamcrest:hamcrest-library:1.3 - 
https://github.com/hamcrest/JavaHamcrest/hamcrest-library)
 
 ===
 This product bundles of Hamcrest which is licensed under BSD 3-Clause License
@@ -300,69 +304,231 @@ MIT license.
 You can find a copy of the License at licenses/LICENSE-cal10n
 
 * Compiler assisted localization library (CAL10N) - API 
(ch.qos.cal10n:cal10n-api:0.8.1 - http://cal10n.qos.ch/cal10n-api)
+* Compiler assisted localization library (CAL10N) - API 
(ch.qos.cal10n:cal10n-api:0.7.4 - http://cal10n.qos.ch/cal10n-api)
 
 
 This product bundles the following libraries which are licensed
 under the Apache License v2.
 For details, see their respective project links.
 
-* airline (io.airlift:airline:0.7 - https://github.com/airlift/airline)
 * A Jackson 2.x helper (com.github.jknack:handlebars-jackson2:4.1.2 - 
https://github.com/jknack/handlebars.java/handlebars-jackson2)
+* ASM based accessors helper used by json-smart 
(net.minidev:accessors-smart:1.2 - http://www.minidev.net/)
 * Apache Commons Codec (commons-codec:commons-codec:1.9 - 
http://commons.apache.org/proper/commons-codec/)
+* Apache Commons Collections (org.apache.commons:commons-collections4:4.3 - 
http://commons.apache.org/proper/commons-collections/)
 * Apache Commons Lang (org.apache.commons:commons-lang3:3.4 - 
http://commons.apache.org/proper/commons-lang/)
+* Apache Commons Lang (org.apache.commons:commons-lang3:3.8.1 - 
http://commons.apache.org/proper/commons-lang/)
 * Apache Commons Logging (commons-logging:commons-logging:1.2 - 
http://commons.apache.org/proper/commons-logging/)
 * Apache HttpClient (org.apache.httpcomponents:httpclient:4.5.2 - 
http://hc.apache.org/httpcomponents-client)
 * Apache HttpCore (org.apache.httpcomponents:httpcore:4.4.4 - 
http://hc.apache.org/httpcomponents-core-ga)
 * Apache Log4j (log4j:log4j:1.2.17 - http://logging.apache.org/log4j/1.2/)
 * Apache Log4j API (org.apache.lo

[servicecomb-toolkit] 22/26: SCB-1555 Integrate oas-validator compability check to cli Translate compatibility error message to english

2019-11-07 Thread ningjiang
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 
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

[servicecomb-toolkit] 11/26: SCB-1553 Integrate oas-validator compliance check to cli Add oas-validator to coverage test

2019-11-07 Thread ningjiang
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 deb82533500bae9db94653144362e819d70d64d9
Author: Daniel Qian 
AuthorDate: Fri Nov 1 16:34:53 2019 +0800

SCB-1553 Integrate oas-validator compliance check to cli
Add oas-validator to coverage test
---
 integration-tests/coverage-aggregate/pom.xml | 34 +++-
 1 file changed, 33 insertions(+), 1 deletion(-)

diff --git a/integration-tests/coverage-aggregate/pom.xml 
b/integration-tests/coverage-aggregate/pom.xml
index b9ade7f..f34941b 100755
--- a/integration-tests/coverage-aggregate/pom.xml
+++ b/integration-tests/coverage-aggregate/pom.xml
@@ -58,6 +58,38 @@
   org.apache.servicecomb.toolkit
   toolkit-maven-plugin
 
+
+
+  org.apache.servicecomb.toolkit
+  oas-validator-core
+  ${project.version}
+
+
+
+  org.apache.servicecomb.toolkit
+  oas-validator-core-spring
+
+
+
+  org.apache.servicecomb.toolkit
+  oas-validator-compliance
+
+
+
+  org.apache.servicecomb.toolkit
+  oas-validator-compliance-spring
+
+
+
+  org.apache.servicecomb.toolkit
+  oas-validator-compatibility
+
+
+
+  org.apache.servicecomb.toolkit
+  oas-validator-compatibility-spring
+
+
   
 
   
@@ -82,4 +114,4 @@
 
   
 
-
\ No newline at end of file
+



[servicecomb-toolkit] 15/26: SCB-1553 Integrate oas-validator compliance check to cli Fix too many logs cause travis ci broken issue.

2019-11-07 Thread ningjiang
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 3f107a7690c63d8e6e0dd7dde7a17edac9f26de5
Author: Daniel Qian 
AuthorDate: Mon Nov 4 16:22:00 2019 +0800

SCB-1553 Integrate oas-validator compliance check to cli
Fix too many logs cause travis ci broken issue.
---
 .../oas-validator-compatibility-spring/pom.xml |  2 --
 oas-validator/oas-validator-compatibility/pom.xml  |  3 ---
 .../src/test/resources/logback-test.xml| 22 ++
 .../oas-validator-compliance-spring/pom.xml|  2 --
 oas-validator/oas-validator-compliance/pom.xml |  9 +
 .../src/test/resources/logback-test.xml| 22 ++
 oas-validator/oas-validator-core-spring/pom.xml|  1 -
 oas-validator/oas-validator-test/pom.xml   |  1 -
 oas-validator/oas-validator-web/pom.xml|  5 -
 9 files changed, 45 insertions(+), 22 deletions(-)

diff --git a/oas-validator/oas-validator-compatibility-spring/pom.xml 
b/oas-validator/oas-validator-compatibility-spring/pom.xml
index 8a262a4..7a4c85b 100644
--- a/oas-validator/oas-validator-compatibility-spring/pom.xml
+++ b/oas-validator/oas-validator-compatibility-spring/pom.xml
@@ -35,13 +35,11 @@
 
   org.apache.servicecomb.toolkit
   oas-validator-compatibility
-  ${project.version}
 
 
 
   org.apache.servicecomb.toolkit
   oas-validator-core-spring
-  ${project.version}
 
 
 
diff --git a/oas-validator/oas-validator-compatibility/pom.xml 
b/oas-validator/oas-validator-compatibility/pom.xml
index 926f9c0..2e95188 100644
--- a/oas-validator/oas-validator-compatibility/pom.xml
+++ b/oas-validator/oas-validator-compatibility/pom.xml
@@ -35,21 +35,18 @@
 
   org.apache.servicecomb.toolkit
   oas-validator-core
-  ${project.version}
 
 
 
 
   org.apache.servicecomb.toolkit
   oas-validator-test
-  ${project.version}
   test
 
 
 
   org.apache.servicecomb.toolkit
   oas-validator-core-spring
-  ${project.version}
   test
 
 
diff --git 
a/oas-validator/oas-validator-compatibility/src/test/resources/logback-test.xml 
b/oas-validator/oas-validator-compatibility/src/test/resources/logback-test.xml
new file mode 100644
index 000..a1ba69a
--- /dev/null
+++ 
b/oas-validator/oas-validator-compatibility/src/test/resources/logback-test.xml
@@ -0,0 +1,22 @@
+
+
+
+
+  
+  
+
diff --git a/oas-validator/oas-validator-compliance-spring/pom.xml 
b/oas-validator/oas-validator-compliance-spring/pom.xml
index 91ffb81..5e4b0f9 100644
--- a/oas-validator/oas-validator-compliance-spring/pom.xml
+++ b/oas-validator/oas-validator-compliance-spring/pom.xml
@@ -35,13 +35,11 @@
 
   org.apache.servicecomb.toolkit
   oas-validator-compliance
-  ${project.version}
 
 
 
   org.apache.servicecomb.toolkit
   oas-validator-core-spring
-  ${project.version}
 
 
 
diff --git a/oas-validator/oas-validator-compliance/pom.xml 
b/oas-validator/oas-validator-compliance/pom.xml
index 0e40c26..33b4f42 100644
--- a/oas-validator/oas-validator-compliance/pom.xml
+++ b/oas-validator/oas-validator-compliance/pom.xml
@@ -39,7 +39,6 @@
 
   org.apache.servicecomb.toolkit
   oas-validator-core
-  ${project.version}
 
 
 
@@ -52,13 +51,7 @@
   slf4j-api
   provided
 
-
-
-  org.slf4j
-  jul-to-slf4j
-  provided
-
-
+
 
 
   org.apache.servicecomb.toolkit
diff --git 
a/oas-validator/oas-validator-compliance/src/test/resources/logback-test.xml 
b/oas-validator/oas-validator-compliance/src/test/resources/logback-test.xml
new file mode 100644
index 000..a1ba69a
--- /dev/null
+++ b/oas-validator/oas-validator-compliance/src/test/resources/logback-test.xml
@@ -0,0 +1,22 @@
+
+
+
+
+  
+  
+
diff --git a/oas-validator/oas-validator-core-spring/pom.xml 
b/oas-validator/oas-validator-core-spring/pom.xml
index 166649c..a03cfca 100644
--- a/oas-validator/oas-validator-core-spring/pom.xml
+++ b/oas-validator/oas-validator-core-spring/pom.xml
@@ -35,7 +35,6 @@
 
   org.apache.servicecomb.toolkit
   oas-validator-core
-  ${project.version}
 
 
 
diff --git a/oas-validator/oas-validator-test/pom.xml 
b/oas-validator/oas-validator-test/pom.xml
index e5b9c90..0260b32 100644
--- a/oas-validator/oas-validator-test/pom.xml
+++ b/oas-validator/oas-validator-test/pom.xml
@@ -35,7 +35,6 @@
 
   org.apache.servicecomb.toolkit
   oas-validator-core
-  ${project.version}
 
 
 
diff --git a/oas-validator/oas-validator-web/pom.xml 
b/oas-validator/oas-validator-web/pom.xml
index 5deaf60..f65b1c6 100644
--- a/oas-validator/oas-validator-web/pom.xml
+++ b/oas-validator/oas-validator-web/pom.xml
@@ -47,23 +47,18 @@
 
   org.apache.servicecomb.to

[servicecomb-toolkit] 09/26: SCB-1553 Integrate oas-validator compliance check to cli Add unit test for validator factories

2019-11-07 Thread ningjiang
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 318f31892f66d4523624e3b0eb79a7fba089d638
Author: Daniel Qian 
AuthorDate: Fri Nov 1 16:32:08 2019 +0800

SCB-1553 Integrate oas-validator compliance check to cli
Add unit test for validator factories
---
 .../factory/DefaultPathItemValidatorFactory.java   |  4 +-
 .../DefaultComponentsValidatorFactoryTest.java | 44 ++
 .../DefaultEncodingValidatorFactoryTest.java   | 44 ++
 .../factory/DefaultHeaderValidatorFactoryTest.java | 44 ++
 .../factory/DefaultInfoValidatorFactoryTest.java   | 44 ++
 .../DefaultMediaTypeValidatorFactoryTest.java  | 44 ++
 .../DefaultOasSpecValidatorFactoryTest.java| 41 
 .../DefaultOpenApiValidatorFactoryTest.java| 27 +
 .../DefaultOperationValidatorFactoryTest.java  | 44 ++
 .../DefaultParameterValidatorFactoryTest.java  | 44 ++
 .../DefaultPathItemValidatorFactoryTest.java   | 44 ++
 .../factory/DefaultPathsValidatorFactoryTest.java  | 44 ++
 .../DefaultRequestBodyValidatorFactoryTest.java| 44 ++
 .../DefaultResponseValidatorFactoryTest.java   | 44 ++
 .../DefaultResponsesValidatorFactoryTest.java  | 44 ++
 .../factory/DefaultSchemaValidatorFactoryTest.java | 44 ++
 .../DefaultSecuritySchemeValidatorFactoryTest.java | 44 ++
 .../factory/DefaultServerValidatorFactoryTest.java | 44 ++
 .../factory/DefaultTagValidatorFactoryTest.java| 43 +
 .../factory/ValidatorFactoryTestConfiguration.java | 26 +
 20 files changed, 799 insertions(+), 2 deletions(-)

diff --git 
a/oas-validator/oas-validator-compliance/src/main/java/org/apache/servicecomb/toolkit/oasv/compliance/factory/DefaultPathItemValidatorFactory.java
 
b/oas-validator/oas-validator-compliance/src/main/java/org/apache/servicecomb/toolkit/oasv/compliance/factory/DefaultPathItemValidatorFactory.java
index 8698317..4aa4b05 100644
--- 
a/oas-validator/oas-validator-compliance/src/main/java/org/apache/servicecomb/toolkit/oasv/compliance/factory/DefaultPathItemValidatorFactory.java
+++ 
b/oas-validator/oas-validator-compliance/src/main/java/org/apache/servicecomb/toolkit/oasv/compliance/factory/DefaultPathItemValidatorFactory.java
@@ -48,8 +48,8 @@ public class DefaultPathItemValidatorFactory implements 
PathItemValidatorFactory
 ArrayList validators = new ArrayList<>();
 
 // skeletons
-new PathItemOperationsValidator(operationValidatorFactory.create());
-new PathItemParametersValidator(parameterValidatorFactory.create());
+validators.add(new 
PathItemOperationsValidator(operationValidatorFactory.create()));
+validators.add(new 
PathItemParametersValidator(parameterValidatorFactory.create()));
 
 return Collections.unmodifiableList(validators);
   }
diff --git 
a/oas-validator/oas-validator-compliance/src/test/java/org/apache/servicecomb/toolkit/oasv/compliance/factory/DefaultComponentsValidatorFactoryTest.java
 
b/oas-validator/oas-validator-compliance/src/test/java/org/apache/servicecomb/toolkit/oasv/compliance/factory/DefaultComponentsValidatorFactoryTest.java
new file mode 100644
index 000..53642c3
--- /dev/null
+++ 
b/oas-validator/oas-validator-compliance/src/test/java/org/apache/servicecomb/toolkit/oasv/compliance/factory/DefaultComponentsValidatorFactoryTest.java
@@ -0,0 +1,44 @@
+/*
+ * 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.compliance.factory;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.util.List;
+
+import org.apache.servicecomb.toolkit.oasv.validation.api.ComponentsValidator;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextCon

[GitHub] [servicecomb-toolkit] WillemJiang commented on issue #38: SCB-1547 add oas-generator to generate openapi v3

2019-11-07 Thread GitBox
WillemJiang commented on issue #38: SCB-1547 add oas-generator to generate 
openapi v3
URL: 
https://github.com/apache/servicecomb-toolkit/pull/38#issuecomment-551057411
 
 
   @kakulisen  There is a big change recently, could you rebase your change ?


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [servicecomb-java-chassis] liangyuanpeng commented on issue #1365: Question of Distributed Tracing

2019-11-07 Thread GitBox
liangyuanpeng commented on issue #1365: Question of Distributed Tracing
URL: 
https://github.com/apache/servicecomb-java-chassis/issues/1365#issuecomment-551129039
 
 
Update
It is my wrong, my zipkin server should be 192.168.1.19


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [servicecomb-java-chassis] liangyuanpeng closed issue #1365: Question of Distributed Tracing

2019-11-07 Thread GitBox
liangyuanpeng closed issue #1365: Question of Distributed Tracing
URL: https://github.com/apache/servicecomb-java-chassis/issues/1365
 
 
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [servicecomb-pack] gene1101 opened a new issue #589: servicecomb的向前恢复和逆向补偿不可兼得吗?

2019-11-07 Thread GitBox
gene1101 opened a new issue #589: servicecomb的向前恢复和逆向补偿不可兼得吗?
URL: https://github.com/apache/servicecomb-pack/issues/589
 
 
   servicecomb的正向恢复和逆向补偿不可兼得吗?测试的时候发现,配置了向前恢复后,就不会执行逆向补偿方法了。


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [servicecomb-pack] coolbeevip commented on issue #589: servicecomb的向前恢复和逆向补偿不可兼得吗?

2019-11-07 Thread GitBox
coolbeevip commented on issue #589: servicecomb的向前恢复和逆向补偿不可兼得吗?
URL: 
https://github.com/apache/servicecomb-pack/issues/589#issuecomment-551340942
 
 
   你配置 @Compensable 的 retries 值是多少?


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [servicecomb-pack] gene1101 commented on issue #589: servicecomb的向前恢复和逆向补偿不可兼得吗?

2019-11-07 Thread GitBox
gene1101 commented on issue #589: servicecomb的向前恢复和逆向补偿不可兼得吗?
URL: 
https://github.com/apache/servicecomb-pack/issues/589#issuecomment-551359548
 
 
   > 你配置 @Compensable 的 retries 值是多少?
   
   我配置的是3次,测试发现向前恢复是有做,但是3次重试不成功后,saga直接就结束了,alaph端没有生成补偿命令出来。


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [servicecomb-pack] coolbeevip commented on issue #589: servicecomb的向前恢复和逆向补偿不可兼得吗?

2019-11-07 Thread GitBox
coolbeevip commented on issue #589: servicecomb的向前恢复和逆向补偿不可兼得吗?
URL: 
https://github.com/apache/servicecomb-pack/issues/589#issuecomment-551360433
 
 
   > > 你配置 @Compensable 的 retries 值是多少?
   > 
   > 我配置的是3次,测试发现向前恢复是有做,但是3次重试不成功后,saga直接就结束了,alaph端没有生成补偿命令出来。
   
   你用的什么版本?是传统模式还是状态机模式?


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [servicecomb-pack] gene1101 commented on issue #589: servicecomb的向前恢复和逆向补偿不可兼得吗?

2019-11-07 Thread GitBox
gene1101 commented on issue #589: servicecomb的向前恢复和逆向补偿不可兼得吗?
URL: 
https://github.com/apache/servicecomb-pack/issues/589#issuecomment-551363358
 
 
   > > > 你配置 @Compensable 的 retries 值是多少?
   > > 
   > > 
   > > 我配置的是3次,测试发现向前恢复是有做,但是3次重试不成功后,saga直接就结束了,alaph端没有生成补偿命令出来。
   > 
   > 你用的什么版本?是传统模式还是状态机模式?
   
   用的是0.6.0的版本,目前用了传统模式,状态机模式需要依赖的外部组件还是比较多。


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [servicecomb-pack] gene1101 edited a comment on issue #589: servicecomb的向前恢复和逆向补偿不可兼得吗?

2019-11-07 Thread GitBox
gene1101 edited a comment on issue #589: servicecomb的向前恢复和逆向补偿不可兼得吗?
URL: 
https://github.com/apache/servicecomb-pack/issues/589#issuecomment-551363358
 
 
   > > > 你配置 @Compensable 的 retries 值是多少?
   > > 
   > > 
   > > 我配置的是3次,测试发现向前恢复是有做,但是3次重试不成功后,saga直接就结束了,alaph端没有生成补偿命令出来。
   > 
   > 你用的什么版本?是传统模式还是状态机模式?
   
   用的是0.6.0的版本,目前用了传统模式,状态机模式需要依赖的外部组件还是比较多。
   
   io.grpc.StatusRuntimeException: CANCELLED: call already cancelled
   at io.grpc.Status.asRuntimeException(Status.java:517)
   at 
io.grpc.stub.ServerCalls$ServerCallStreamObserverImpl.onCompleted(ServerCalls.java:356)
   at 
org.apache.servicecomb.pack.alpha.server.tcc.callback.GrpcOmegaTccCallback.disconnect(GrpcOmegaTccCallback.java:51)
   at 
org.apache.servicecomb.pack.alpha.server.tcc.GrpcTccEventService.onDisconnected(GrpcTccEventService.java:100)
   at 
org.apache.servicecomb.pack.contract.grpc.TccEventServiceGrpc$MethodHandlers.invoke(TccEventServiceGrpc.java:646)
   at 
io.grpc.stub.ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.onHalfClose(ServerCalls.java:171)
   at 
io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed(ServerCallImpl.java:283)
   at 
io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed.runInContext(ServerImpl.java:707)
   at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
   at 
io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
   at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   at java.lang.Thread.run(Thread.java:748)
   
   
   服务端抛出了异常也很奇怪,出现TCC的Omega回调


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [servicecomb-pack] coolbeevip commented on issue #589: servicecomb的向前恢复和逆向补偿不可兼得吗?

2019-11-07 Thread GitBox
coolbeevip commented on issue #589: servicecomb的向前恢复和逆向补偿不可兼得吗?
URL: 
https://github.com/apache/servicecomb-pack/issues/589#issuecomment-551369270
 
 
   以前我一直没有关注过前向恢复,我看了一下代码,如你所说前向恢复可能不会进行补偿,我看了一下前向恢复的类 
https://github.com/apache/servicecomb-pack/blob/9064e550c9b754bd61031dc3beae90a5ba34be75/omega/omega-transaction/src/main/java/org/apache/servicecomb/pack/omega/transaction/ForwardRecovery.java
 在方法调用前并没有发送 TxStartedEvent,只是在失败后会发送 TxAbortedEvent。
   
   而对于后台查询TxEvent表判断哪些子事务需要补偿时,好想必须找到 TxAbortedEvent 对应的 TxStartedEvent 
才会插入一个补偿命令到命令表 COMMAND
   
   至于为什么这么考虑,我也不确定这么做的理由,@WillemJiang 你可以看一下这个问题吗


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [servicecomb-pack] coolbeevip commented on issue #589: servicecomb的向前恢复和逆向补偿不可兼得吗?

2019-11-07 Thread GitBox
coolbeevip commented on issue #589: servicecomb的向前恢复和逆向补偿不可兼得吗?
URL: 
https://github.com/apache/servicecomb-pack/issues/589#issuecomment-551369878
 
 
   
   
   
   
   > > > > 你配置 @Compensable 的 retries 值是多少?
   > > > 
   > > > 
   > > > 我配置的是3次,测试发现向前恢复是有做,但是3次重试不成功后,saga直接就结束了,alaph端没有生成补偿命令出来。
   > > 
   > > 
   > > 你用的什么版本?是传统模式还是状态机模式?
   > 
   > 用的是0.6.0的版本,目前用了传统模式,状态机模式需要依赖的外部组件还是比较多。
   > 
   > io.grpc.StatusRuntimeException: CANCELLED: call already cancelled
   > at io.grpc.Status.asRuntimeException(Status.java:517)
   > at 
io.grpc.stub.ServerCalls$ServerCallStreamObserverImpl.onCompleted(ServerCalls.java:356)
   > at 
org.apache.servicecomb.pack.alpha.server.tcc.callback.GrpcOmegaTccCallback.disconnect(GrpcOmegaTccCallback.java:51)
   > at 
org.apache.servicecomb.pack.alpha.server.tcc.GrpcTccEventService.onDisconnected(GrpcTccEventService.java:100)
   > at 
org.apache.servicecomb.pack.contract.grpc.TccEventServiceGrpc$MethodHandlers.invoke(TccEventServiceGrpc.java:646)
   > at 
io.grpc.stub.ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.onHalfClose(ServerCalls.java:171)
   > at 
io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed(ServerCallImpl.java:283)
   > at 
io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed.runInContext(ServerImpl.java:707)
   > at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
   > at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
   > at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   > at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   > at java.lang.Thread.run(Thread.java:748)
   > 
   > 服务端抛出了异常也很奇怪,出现TCC的Omega回调
   
   你是否也使用了TCC的注解?


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [servicecomb-pack] gene1101 commented on issue #589: servicecomb的向前恢复和逆向补偿不可兼得吗?

2019-11-07 Thread GitBox
gene1101 commented on issue #589: servicecomb的向前恢复和逆向补偿不可兼得吗?
URL: 
https://github.com/apache/servicecomb-pack/issues/589#issuecomment-551377336
 
 
   > > > > > 你配置 @Compensable 的 retries 值是多少?
   > > > > 
   > > > > 
   > > > > 我配置的是3次,测试发现向前恢复是有做,但是3次重试不成功后,saga直接就结束了,alaph端没有生成补偿命令出来。
   > > > 
   > > > 
   > > > 你用的什么版本?是传统模式还是状态机模式?
   > > 
   > > 
   > > 用的是0.6.0的版本,目前用了传统模式,状态机模式需要依赖的外部组件还是比较多。
   > > io.grpc.StatusRuntimeException: CANCELLED: call already cancelled
   > > at io.grpc.Status.asRuntimeException(Status.java:517)
   > > at 
io.grpc.stub.ServerCalls$ServerCallStreamObserverImpl.onCompleted(ServerCalls.java:356)
   > > at 
org.apache.servicecomb.pack.alpha.server.tcc.callback.GrpcOmegaTccCallback.disconnect(GrpcOmegaTccCallback.java:51)
   > > at 
org.apache.servicecomb.pack.alpha.server.tcc.GrpcTccEventService.onDisconnected(GrpcTccEventService.java:100)
   > > at 
org.apache.servicecomb.pack.contract.grpc.TccEventServiceGrpc$MethodHandlers.invoke(TccEventServiceGrpc.java:646)
   > > at 
io.grpc.stub.ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.onHalfClose(ServerCalls.java:171)
   > > at 
io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed(ServerCallImpl.java:283)
   > > at 
io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed.runInContext(ServerImpl.java:707)
   > > at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
   > > at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
   > > at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   > > at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   > > at java.lang.Thread.run(Thread.java:748)
   > > 服务端抛出了异常也很奇怪,出现TCC的Omega回调
   > 
   > 你是否也使用了TCC的注解?
   
   我没有使用TCC注解。
   
   
   另外定位到一个问题,servicecomb里面使用了kyro做序列化,我这边定义的参数是没有无参构造器,这个反序列化会有问题。
   
   
![image](https://user-images.githubusercontent.com/15373196/68449268-75b20a00-0221-11ea-9df6-7d4661902aca.png)
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [servicecomb-java-chassis] GuoYL123 opened a new pull request #1376: ServerListFilterExt add switch

2019-11-07 Thread GitBox
GuoYL123 opened a new pull request #1376: ServerListFilterExt add switch
URL: https://github.com/apache/servicecomb-java-chassis/pull/1376
 
 
   Follow this checklist to help us incorporate your contribution quickly and 
easily:
   
- [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually 
before you start working on it).  Trivial changes like typos do not require a 
JIRA issue.  Your pull request should address just this issue, without pulling 
in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line 
and body.
- [ ] Format the pull request title like `[SCB-XXX] Fixes bug in 
ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA 
issue.
- [ ] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
- [ ] Run `mvn clean install -Pit` to make sure basic checks pass. A more 
thorough check will be performed on your pull request automatically.
- [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   ---
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [servicecomb-java-chassis] coveralls commented on issue #1376: ServerListFilterExt add switch

2019-11-07 Thread GitBox
coveralls commented on issue #1376: ServerListFilterExt add switch
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/1376#issuecomment-551386351
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/26848478/badge)](https://coveralls.io/builds/26848478)
   
   Coverage decreased (-0.008%) to 85.484% when pulling 
**d26a6fc98149ad857d051f46942b391fcd7f5d4a on GuoYL123:master** into 
**be1b0bbb36c4467cea68fd4b2a16daa6202e3efe on apache:master**.
   


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [servicecomb-java-chassis] kenzhaoyihui opened a new issue #1377: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'producerProviderManager':

2019-11-07 Thread GitBox
kenzhaoyihui opened a new issue #1377: 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'producerProviderManager':
URL: https://github.com/apache/servicecomb-java-chassis/issues/1377
 
 
   Hello, I am the starter with  servicecomb 1.3.0.
   When I use the sample `springmvc` to learn , I found the error .
   ```
   Exception in thread "main" 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'producerProviderManager': Unsatisfied dependency 
expressed through field 'producerProviderList'; nested exception is 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'restProducerProvider': Unsatisfied dependency 
expressed through field 'producerSchemaFactory'; nested exception is 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'producerSchemaFactory': Unsatisfied dependency 
expressed through field 'compositeSwaggerGeneratorContext'; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'compositeSwaggerGeneratorContext' defined in URL 
[jar:file:/D:/repository/org/apache/servicecomb/swagger-generator-core/1.3.0/swagger-generator-core-1.3.0.jar!/org/apache/servicecomb/swagger/generator/core/CompositeSwaggerGeneratorContext.class]:
 Instantiation of bean failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[org.apache.servicecomb.swagger.generator.core.CompositeSwaggerGeneratorContext]:
 Constructor threw exception; nested exception is 
java.util.ServiceConfigurationError: 
org.apache.servicecomb.swagger.generator.core.SwaggerGeneratorContext: Provider 
org.apache.servicecomb.swagger.generator.jaxrs.JaxrsSwaggerGeneratorContext 
could not be instantiated
at 
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:586)
at 
org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
at 
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:364)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1269)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
at 
org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)
at 
org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:93)
at 
org.apache.servicecomb.foundation.common.utils.BeanUtils.init(BeanUtils.java:54)
at 
org.apache.servicecomb.foundation.common.utils.BeanUtils.init(BeanUtils.java:47)
   
   other errors:
   
   Caused by: java.lang.NoSuchMethodError: 
com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V
   
   Caused by: java.util.ServiceConfigurationError: 
org.apache.servicecomb.swagger.generator.core.SwaggerGeneratorContext: Provider 
org.apache.servicecomb.swagger.generator.jaxrs.JaxrsSwaggerGeneratorContext 
could not be instantiated
   
   
   Error creating bean with name 'compositeSwaggerGeneratorContext' defined in 
URL 
[jar:file:/D:/repository/org/apache/servicecomb/swagger-generator-core/1.3..0.jar!/org/apache/servicecomb/swagger/generator/core/CompositeSwaggerGeneratorContext.class]:
 Instantiation of bean failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[org.apache.servicecomb.swagger.generator.core.CompositeSwaggerGeneratorContext]:
 Constructor threw exception; nested exception is 
jav

[GitHub] [servicecomb-java-chassis] solomoni0999 commented on issue #1359: ServiceComb Java-Chassis 1.2.1版本RestServletInitializer的onStartup方法需要增加factory的对象null判断

2019-11-07 Thread GitBox
solomoni0999 commented on issue #1359: ServiceComb Java-Chassis 
1.2.1版本RestServletInitializer的onStartup方法需要增加factory的对象null判断
URL: 
https://github.com/apache/servicecomb-java-chassis/issues/1359#issuecomment-551422134
 
 
   @liubao68 @jbonofre @WillemJiang  check it,tks


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services