[
https://issues.apache.org/jira/browse/SCB-904?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16611425#comment-16611425
]
ASF GitHub Bot commented on SCB-904:
------------------------------------
liubao68 commented on a change in pull request #902: [SCB-904] SpringMVC
@RequestHeader do not support value,only support name
URL:
https://github.com/apache/incubator-servicecomb-java-chassis/pull/902#discussion_r216869666
##########
File path:
swagger/swagger-generator/generator-springmvc/src/main/java/org/apache/servicecomb/swagger/generator/springmvc/processor/annotation/RequestHeaderAnnotationProcessor.java
##########
@@ -32,7 +32,11 @@ public HeaderParameter createParameter() {
@Override
public String getAnnotationParameterName(Object annotation) {
- return ((RequestHeader) annotation).name();
+ String name = ((RequestHeader) annotation).name();
+ if (name == null || name.isEmpty()) {
+ name = ((RequestHeader) annotation).value();
Review comment:
Should consider about RequestParam, CookieValue, etc. And please add
integration tests in integration-tests.
----------------------------------------------------------------
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:
[email protected]
> SpringMVC @RequestHeader do not support value,only support name
> ---------------------------------------------------------------
>
> Key: SCB-904
> URL: https://issues.apache.org/jira/browse/SCB-904
> Project: Apache ServiceComb
> Issue Type: Bug
> Components: Java-Chassis
> Reporter: WeiChao
> Assignee: WeiChao
> Priority: Major
> Fix For: java-chassis-1.1.0
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)