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 2020/08/03 11:31:49 UTC

[GitHub] [servicecomb-java-chassis] yhs0092 opened a new pull request #1907: [SCB-2058] fix SpringMVC provider not support non-file-type RequestPart problem

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


   - add MultipartFilePropertyCreator to enable ModelConverters resolving MultipartFile param
   - make RequestPartAnnotationProcessor recognize non-file-type RequestPart param
   
   See details in https://github.com/apache/servicecomb-java-chassis/issues/1902


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] coveralls edited a comment on pull request #1907: [SCB-2058] fix SpringMVC provider not support non-file-type RequestPart problem

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


   
   [![Coverage Status](https://coveralls.io/builds/32526254/badge)](https://coveralls.io/builds/32526254)
   
   Coverage increased (+0.04%) to 86.31% when pulling **64de0454a7ef64e662e9267374ff235d9a106a13 on yhs0092:SpringMVC-style-provider-not-support-non-file-type-RequestPart** into **ad9516dfad410a4162a7180336306200f410c0c1 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:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] coveralls edited a comment on pull request #1907: [SCB-2058] fix SpringMVC provider not support non-file-type RequestPart problem

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


   
   [![Coverage Status](https://coveralls.io/builds/32527005/badge)](https://coveralls.io/builds/32527005)
   
   Coverage increased (+0.02%) to 86.294% when pulling **64de0454a7ef64e662e9267374ff235d9a106a13 on yhs0092:SpringMVC-style-provider-not-support-non-file-type-RequestPart** into **ad9516dfad410a4162a7180336306200f410c0c1 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:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #1907: [SCB-2058] fix SpringMVC provider not support non-file-type RequestPart problem

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



##########
File path: swagger/swagger-generator/generator-springmvc/src/main/java/org/apache/servicecomb/swagger/generator/springmvc/processor/annotation/RequestPartAnnotationProcessor.java
##########
@@ -56,11 +57,34 @@ public HttpParameterType getHttpParameterType(RequestPart parameterAnnotation) {
   @Override
   public void fillParameter(Swagger swagger, Operation operation, FormParameter formParameter, Type type,
       RequestPart requestPart) {
-    Property property = new FileProperty();
-    if (TypeFactory.defaultInstance().constructType(type).isContainerType()) {
-      property = new ArrayProperty(new FileProperty());
-    }
+    Property property = resolveParamProperty(type);

Review comment:
       Seems RequestPartAnnotationProcessor can inherit from AbstractSpringmvcSerializableParameterProcessor




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] liubao68 merged pull request #1907: [SCB-2058] fix SpringMVC provider not support non-file-type RequestPart problem

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


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] yhs0092 commented on a change in pull request #1907: [SCB-2058] fix SpringMVC provider not support non-file-type RequestPart problem

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



##########
File path: swagger/swagger-generator/generator-springmvc/src/main/java/org/apache/servicecomb/swagger/generator/springmvc/processor/annotation/RequestPartAnnotationProcessor.java
##########
@@ -56,11 +57,34 @@ public HttpParameterType getHttpParameterType(RequestPart parameterAnnotation) {
   @Override
   public void fillParameter(Swagger swagger, Operation operation, FormParameter formParameter, Type type,
       RequestPart requestPart) {
-    Property property = new FileProperty();
-    if (TypeFactory.defaultInstance().constructType(type).isContainerType()) {
-      property = new ArrayProperty(new FileProperty());
-    }
+    Property property = resolveParamProperty(type);

Review comment:
       Done, please review 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:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] yhs0092 commented on a change in pull request #1907: [SCB-2058] fix SpringMVC provider not support non-file-type RequestPart problem

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



##########
File path: swagger/swagger-generator/generator-springmvc/src/main/java/org/apache/servicecomb/swagger/generator/springmvc/processor/annotation/RequestPartAnnotationProcessor.java
##########
@@ -56,11 +57,34 @@ public HttpParameterType getHttpParameterType(RequestPart parameterAnnotation) {
   @Override
   public void fillParameter(Swagger swagger, Operation operation, FormParameter formParameter, Type type,
       RequestPart requestPart) {
-    Property property = new FileProperty();
-    if (TypeFactory.defaultInstance().constructType(type).isContainerType()) {
-      property = new ArrayProperty(new FileProperty());
-    }
+    Property property = resolveParamProperty(type);

Review comment:
       Done




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] coveralls commented on pull request #1907: [SCB-2058] fix SpringMVC provider not support non-file-type RequestPart problem

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


   
   [![Coverage Status](https://coveralls.io/builds/32501773/badge)](https://coveralls.io/builds/32501773)
   
   Coverage increased (+0.01%) to 86.346% when pulling **cad862e9fd8c1ee4dad8d7e79f8f6795bc29434b on yhs0092:SpringMVC-style-provider-not-support-non-file-type-RequestPart** into **70756fe76d0157dddf5890a0718b858deb17fad7 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:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] liubao68 commented on a change in pull request #1907: [SCB-2058] fix SpringMVC provider not support non-file-type RequestPart problem

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



##########
File path: swagger/swagger-generator/generator-springmvc/src/main/java/org/apache/servicecomb/swagger/generator/springmvc/processor/annotation/RequestPartAnnotationProcessor.java
##########
@@ -56,11 +57,34 @@ public HttpParameterType getHttpParameterType(RequestPart parameterAnnotation) {
   @Override
   public void fillParameter(Swagger swagger, Operation operation, FormParameter formParameter, Type type,
       RequestPart requestPart) {
-    Property property = new FileProperty();
-    if (TypeFactory.defaultInstance().constructType(type).isContainerType()) {
-      property = new ArrayProperty(new FileProperty());
-    }
+    Property property = resolveParamProperty(type);

Review comment:
       actually I mean fillParameter can call super.fillParameter, because jaxrs works fine by doing this. 




----------------------------------------------------------------
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:
users@infra.apache.org