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 2022/01/27 02:02:51 UTC

[GitHub] [servicecomb-java-chassis] david6969xin opened a new pull request #2702: [SCB-2380] optimize swaager load logic

david6969xin opened a new pull request #2702:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2702


   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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #2702: [SCB-2380] optimize swaager load logic

Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2702:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2702#discussion_r791468176



##########
File path: swagger/swagger-generator/generator-core/src/main/java/org/apache/servicecomb/swagger/generator/core/AbstractSwaggerGenerator.java
##########
@@ -311,6 +314,21 @@ protected void scanMethods() {
         throw new IllegalStateException(
             String.format("OperationId must be unique. method=%s:%s.", cls.getName(), method.getName()));
       }
+      Map<String, Model> originsDefinitions = swagger.getDefinitions();
+      if (!CollectionUtils.isEmpty(originsDefinitions)) {
+        originsDefinitions.forEach((key, value) -> {
+          if (definitions.containsKey(key) && !value.equals(definitions.get(key))) {
+            throw new IllegalArgumentException(
+                "the parameter typeName '" + key + "' duplicate in '" + this.cls.getName()
+                    + "', need to rename it");
+          }
+        });
+        definitions.putAll(originsDefinitions);
+      }
+      swagger.setDefinitions(null);

Review comment:
       It's a bit complicated. 
   
   Maybe you can have a very simple solution to extend Swagger `public void addDefinition(String key, Model model)` method




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

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] david6969xin commented on pull request #2702: [SCB-2380] optimize swaager load logic

Posted by GitBox <gi...@apache.org>.
david6969xin commented on pull request #2702:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2702#issuecomment-1022774576


   retrigger cl


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

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] codecov-commenter edited a comment on pull request #2702: [SCB-2380] optimize swaager load logic

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2702:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2702#issuecomment-1019925624


   # [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#2702](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3145e2f) into [master](https://codecov.io/gh/apache/servicecomb-java-chassis/commit/79db194f7b5a08bbc298e36ed03e465bd78bd85f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (79db194) will **increase** coverage by `0.00%`.
   > The diff coverage is `88.88%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702/graphs/tree.svg?width=650&height=150&src=pr&token=KXfDcr9rX2&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff            @@
   ##             master    #2702   +/-   ##
   =========================================
     Coverage     77.22%   77.23%           
   - Complexity     1412     1413    +1     
   =========================================
     Files          1608     1608           
     Lines         42976    42983    +7     
     Branches       3643     3644    +1     
   =========================================
   + Hits          33190    33196    +6     
   + Misses         8263     8262    -1     
   - Partials       1523     1525    +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ger/generator/core/AbstractOperationGenerator.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3dhZ2dlci9zd2FnZ2VyLWdlbmVyYXRvci9nZW5lcmF0b3ItY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvc3dhZ2dlci9nZW5lcmF0b3IvY29yZS9BYnN0cmFjdE9wZXJhdGlvbkdlbmVyYXRvci5qYXZh) | `88.37% <71.42%> (ø)` | |
   | [...agger/generator/core/AbstractSwaggerGenerator.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3dhZ2dlci9zd2FnZ2VyLWdlbmVyYXRvci9nZW5lcmF0b3ItY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvc3dhZ2dlci9nZW5lcmF0b3IvY29yZS9BYnN0cmFjdFN3YWdnZXJHZW5lcmF0b3IuamF2YQ==) | `87.05% <100.00%> (-1.33%)` | :arrow_down: |
   | [...thentication/consumer/RSAConsumerTokenManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aGFuZGxlcnMvaGFuZGxlci1wdWJsaWNrZXktYXV0aC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvYXV0aGVudGljYXRpb24vY29uc3VtZXIvUlNBQ29uc3VtZXJUb2tlbk1hbmFnZXIuamF2YQ==) | `70.96% <0.00%> (-6.46%)` | :arrow_down: |
   | [.../servicecomb/registry/discovery/DiscoveryTree.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Zm91bmRhdGlvbnMvZm91bmRhdGlvbi1yZWdpc3RyeS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvcmVnaXN0cnkvZGlzY292ZXJ5L0Rpc2NvdmVyeVRyZWUuamF2YQ==) | `96.49% <0.00%> (-3.51%)` | :arrow_down: |
   | [...egistry/client/http/ServiceRegistryClientImpl.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2VydmljZS1yZWdpc3RyeS9yZWdpc3RyeS1zZXJ2aWNlLWNlbnRlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvc2VydmljZXJlZ2lzdHJ5L2NsaWVudC9odHRwL1NlcnZpY2VSZWdpc3RyeUNsaWVudEltcGwuamF2YQ==) | `70.88% <0.00%> (-0.39%)` | :arrow_down: |
   | [...e/servicecomb/schemadiscovery/SchemaDiscovery.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2VydmljZS1yZWdpc3RyeS9yZWdpc3RyeS1zY2hlbWEtZGlzY292ZXJ5L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZXJ2aWNlY29tYi9zY2hlbWFkaXNjb3ZlcnkvU2NoZW1hRGlzY292ZXJ5LmphdmE=) | `53.65% <0.00%> (+2.43%)` | :arrow_up: |
   | [...b/core/provider/consumer/SyncResponseExecutor.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29yZS9wcm92aWRlci9jb25zdW1lci9TeW5jUmVzcG9uc2VFeGVjdXRvci5qYXZh) | `84.61% <0.00%> (+5.30%)` | :arrow_up: |
   | [...b/core/invocation/timeout/PassingTimeStrategy.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvY29yZS9pbnZvY2F0aW9uL3RpbWVvdXQvUGFzc2luZ1RpbWVTdHJhdGVneS5qYXZh) | `100.00% <0.00%> (+5.55%)` | :arrow_up: |
   | [...e/servicecomb/transport/highway/HighwayClient.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-dHJhbnNwb3J0cy90cmFuc3BvcnQtaGlnaHdheS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvdHJhbnNwb3J0L2hpZ2h3YXkvSGlnaHdheUNsaWVudC5qYXZh) | `96.61% <0.00%> (+6.77%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [79db194...3145e2f](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #2702: [SCB-2380] optimize swaager load logic

Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2702:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2702#discussion_r791468176



##########
File path: swagger/swagger-generator/generator-core/src/main/java/org/apache/servicecomb/swagger/generator/core/AbstractSwaggerGenerator.java
##########
@@ -311,6 +314,21 @@ protected void scanMethods() {
         throw new IllegalStateException(
             String.format("OperationId must be unique. method=%s:%s.", cls.getName(), method.getName()));
       }
+      Map<String, Model> originsDefinitions = swagger.getDefinitions();
+      if (!CollectionUtils.isEmpty(originsDefinitions)) {
+        originsDefinitions.forEach((key, value) -> {
+          if (definitions.containsKey(key) && !value.equals(definitions.get(key))) {
+            throw new IllegalArgumentException(
+                "the parameter typeName '" + key + "' duplicate in '" + this.cls.getName()
+                    + "', need to rename it");
+          }
+        });
+        definitions.putAll(originsDefinitions);
+      }
+      swagger.setDefinitions(null);

Review comment:
       It's a bit complicated. 
   
   Maybe you can have a very simple solution to extend Swagger `public void addDefinition(String key, Model model)` method




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

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] david6969xin closed pull request #2702: [SCB-2380] optimize swaager load logic

Posted by GitBox <gi...@apache.org>.
david6969xin closed pull request #2702:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2702


   


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

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] david6969xin commented on pull request #2702: [SCB-2380] optimize swaager load logic

Posted by GitBox <gi...@apache.org>.
david6969xin commented on pull request #2702:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2702#issuecomment-1024812058


   retrigger cl


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

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] liubao68 closed pull request #2702: [SCB-2380] optimize swaager load logic

Posted by GitBox <gi...@apache.org>.
liubao68 closed pull request #2702:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2702


   


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

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] codecov-commenter commented on pull request #2702: [SCB-2380] optimize swaager load logic

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #2702:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2702#issuecomment-1019925624


   # [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#2702](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (82d5212) into [master](https://codecov.io/gh/apache/servicecomb-java-chassis/commit/79db194f7b5a08bbc298e36ed03e465bd78bd85f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (79db194) will **decrease** coverage by `0.00%`.
   > The diff coverage is `75.00%`.
   
   > :exclamation: Current head 82d5212 differs from pull request most recent head cd28c65. Consider uploading reports for the commit cd28c65 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702/graphs/tree.svg?width=650&height=150&src=pr&token=KXfDcr9rX2&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #2702      +/-   ##
   ============================================
   - Coverage     77.22%   77.22%   -0.01%     
   - Complexity     1412     1413       +1     
   ============================================
     Files          1608     1608              
     Lines         42976    42988      +12     
     Branches       3643     3645       +2     
   ============================================
   + Hits          33190    33198       +8     
   - Misses         8263     8265       +2     
   - Partials       1523     1525       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ger/generator/core/AbstractOperationGenerator.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3dhZ2dlci9zd2FnZ2VyLWdlbmVyYXRvci9nZW5lcmF0b3ItY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvc3dhZ2dlci9nZW5lcmF0b3IvY29yZS9BYnN0cmFjdE9wZXJhdGlvbkdlbmVyYXRvci5qYXZh) | `88.37% <71.42%> (ø)` | |
   | [...agger/generator/core/AbstractSwaggerGenerator.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3dhZ2dlci9zd2FnZ2VyLWdlbmVyYXRvci9nZW5lcmF0b3ItY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvc3dhZ2dlci9nZW5lcmF0b3IvY29yZS9BYnN0cmFjdFN3YWdnZXJHZW5lcmF0b3IuamF2YQ==) | `87.23% <76.92%> (-1.14%)` | :arrow_down: |
   | [.../servicecomb/registry/discovery/DiscoveryTree.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Zm91bmRhdGlvbnMvZm91bmRhdGlvbi1yZWdpc3RyeS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvcmVnaXN0cnkvZGlzY292ZXJ5L0Rpc2NvdmVyeVRyZWUuamF2YQ==) | `96.49% <0.00%> (-3.51%)` | :arrow_down: |
   | [...ecomb/provider/pojo/PojoConsumerMetaRefresher.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHJvdmlkZXJzL3Byb3ZpZGVyLXBvam8vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL3Byb3ZpZGVyL3Bvam8vUG9qb0NvbnN1bWVyTWV0YVJlZnJlc2hlci5qYXZh) | `75.60% <0.00%> (-2.44%)` | :arrow_down: |
   | [...e/servicecomb/schemadiscovery/SchemaDiscovery.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2VydmljZS1yZWdpc3RyeS9yZWdpc3RyeS1zY2hlbWEtZGlzY292ZXJ5L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZXJ2aWNlY29tYi9zY2hlbWFkaXNjb3ZlcnkvU2NoZW1hRGlzY292ZXJ5LmphdmE=) | `53.65% <0.00%> (+2.43%)` | :arrow_up: |
   | [...ache/servicecomb/foundation/common/net/IpPort.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Zm91bmRhdGlvbnMvZm91bmRhdGlvbi1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2ZvdW5kYXRpb24vY29tbW9uL25ldC9JcFBvcnQuamF2YQ==) | `86.66% <0.00%> (+3.33%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [79db194...cd28c65](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/2702?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] david6969xin removed a comment on pull request #2702: [SCB-2380] optimize swaager load logic

Posted by GitBox <gi...@apache.org>.
david6969xin removed a comment on pull request #2702:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2702#issuecomment-1024811898


   retrigger cl


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

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] david6969xin commented on pull request #2702: [SCB-2380] optimize swaager load logic

Posted by GitBox <gi...@apache.org>.
david6969xin commented on pull request #2702:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2702#issuecomment-1024811898


   retrigger cl


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

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #2702: [SCB-2380] optimize swaager load logic

Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2702:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2702#discussion_r801240271



##########
File path: swagger/swagger-generator/generator-core/src/main/java/org/apache/servicecomb/swagger/generator/core/AbstractSwaggerGenerator.java
##########
@@ -81,9 +84,25 @@
 
   protected String httpMethod;
 
+
+  class SwaggerExt extends Swagger {
+    @Override
+    public void addDefinition(String key, Model model) {
+      if (this.definitions == null) {
+        this.definitions = new LinkedHashMap<>();
+      }
+      if (this.definitions.containsKey(key) && !this.definitions.get(key).equals(model)) {
+        throw new IllegalArgumentException(
+            "the parameter typeName " + key + " duplicate in " + cls.getName()
+                + ", need to rename it");

Review comment:
       throw new IllegalArgumentException("Model name can not be same for different class. Name=“ + key + ", Class=" + cls.getName);




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

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] david6969xin commented on pull request #2702: [SCB-2380] optimize swaager load logic

Posted by GitBox <gi...@apache.org>.
david6969xin commented on pull request #2702:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2702#issuecomment-1022954162


   retrigger cl


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

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #2702: [SCB-2380] optimize swaager load logic

Posted by GitBox <gi...@apache.org>.
liubao68 commented on a change in pull request #2702:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2702#discussion_r801240431



##########
File path: swagger/swagger-generator/generator-core/src/test/java/org/apache/servicecomb/swagger/generator/core/TestSwaggerUtils.java
##########
@@ -247,7 +247,7 @@ public void should_ignore_httpServletRequest() {
   @Test
   public void testRepeatOperation() {
     UnitTestSwaggerUtils.testException(
-        "OperationId must be unique. method=org.apache.servicecomb.swagger.generator.core.schema.RepeatOperation:add.",
+        "generate swagger operation failed, method=org.apache.servicecomb.swagger.generator.core.schema.RepeatOperation:add.",

Review comment:
       Why this test case fail? Seam not related to this PR. 




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

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] david6969xin closed pull request #2702: [SCB-2380] optimize swaager load logic

Posted by GitBox <gi...@apache.org>.
david6969xin closed pull request #2702:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2702


   


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

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] david6969xin closed pull request #2702: [SCB-2380] optimize swaager load logic

Posted by GitBox <gi...@apache.org>.
david6969xin closed pull request #2702:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2702


   


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

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] liubao68 commented on pull request #2702: [SCB-2380] optimize swaager load logic

Posted by GitBox <gi...@apache.org>.
liubao68 commented on pull request #2702:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2702#issuecomment-1081634037


   This improvement may cause other more problems, do not fix 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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org