develpoerX commented on a change in pull request #2014:
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/2014#discussion_r512453525



##########
File path: 
service-registry/src/main/java/org/apache/servicecomb/serviceregistry/task/MicroserviceRegisterTask.java
##########
@@ -261,6 +263,24 @@ private boolean compareAndReRegisterSchema(Entry<String, 
String> localSchemaEntr
       String scSchemaContent = srClient.getSchema(microservice.getServiceId(), 
scSchema.getSchemaId());
       String localSchemaContent = localSchemaEntry.getValue();
 
+      if (!StringUtils.isEmpty(scSchemaContent) && 
!StringUtils.isEmpty(localSchemaContent)) {
+        Swagger scSwagger = SwaggerUtils.parseSwagger(scSchemaContent);
+        Swagger localSwagger = SwaggerUtils.parseSwagger(localSchemaContent);
+        if (scSwagger.equals(localSwagger)) {
+          return true;
+        }
+        if (ServiceRegistryConfig.INSTANCE.isIgnoreSwaggerDifference()) {

Review comment:
       done. I have put it behind EQUALS block. 




----------------------------------------------------------------
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:
[email protected]


Reply via email to