You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/06/07 00:52:00 UTC

[GitHub] wujimin closed pull request #752: [SCB-646] if local swagger exists, not generate swagger according to class

wujimin closed pull request #752: [SCB-646] if local swagger exists, not generate swagger according to class
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/752
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/core/src/main/java/org/apache/servicecomb/core/definition/schema/ProducerSchemaFactory.java b/core/src/main/java/org/apache/servicecomb/core/definition/schema/ProducerSchemaFactory.java
index 5f51eead9..1334332f7 100644
--- a/core/src/main/java/org/apache/servicecomb/core/definition/schema/ProducerSchemaFactory.java
+++ b/core/src/main/java/org/apache/servicecomb/core/definition/schema/ProducerSchemaFactory.java
@@ -107,8 +107,8 @@ protected SchemaMeta createSchema(ProducerSchemaContext context) {
     }
 
     // 根据class动态产生契约
-    SwaggerGenerator generator = generateSwagger(context);
     if (swagger == null) {
+      SwaggerGenerator generator = generateSwagger(context);
       swagger = generator.getSwagger();
       String swaggerContent = getSwaggerContent(swagger);
       LOGGER.info("generate swagger for {}/{}/{}, swagger: {}",


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services