[
https://issues.apache.org/jira/browse/SCB-841?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16608648#comment-16608648
]
ASF GitHub Bot commented on SCB-841:
------------------------------------
liubao68 commented on a change in pull request #871: [SCB-841] move string type
test case from demo to integration-test
URL:
https://github.com/apache/incubator-servicecomb-java-chassis/pull/871#discussion_r216185929
##########
File path:
integration-tests/it-producer/src/main/java/org/apache/servicecomb/it/schema/DefaultValueSpringmvcSchema.java
##########
@@ -64,4 +64,43 @@ public int intHeaderRequire(@RequestHeader(name = "input",
required = true, defa
public int intFormRequire(int input) {
return input;
}
+
+ //string
+ @GetMapping("stringQuery")
+ public String stringQuery(@RequestParam(value = "input", defaultValue =
"string") String input) {
+ return input;
+ }
+
+ @GetMapping("stringHeader")
+ public String stringHeader(@RequestHeader(value = "input", defaultValue =
"string") String input) {
+ return input;
+ }
+
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "input", dataType = "string", paramType =
"form", value = "", defaultValue = "string", required = false)})
+ @PostMapping(path = "stringForm")
+ public String stringForm(String input) {
+ return input;
+ }
+
+ // springmvc rule: required should be false because defaultValue have value
+ @GetMapping(path = "stringQueryRequire")
+ public String stringQueryRequire(
+ @RequestParam(name = "input", required = true, defaultValue = "string")
String input) {
+ return input;
+ }
+
+ // springmvc rule: required should be false because defaultValue have value
+ @GetMapping(path = "stringHeaderRequire")
+ public String stringHeaderRequire(
+ @RequestHeader(name = "input", required = true, defaultValue = "string")
String input) {
+ return input;
+ }
+
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "input", dataType = "string", paramType =
"form", value = "a required form param", required = true, defaultValue =
"string")})
+ @PostMapping(path = "stringFormRequire")
+ public String stringFormRequire(String input) {
Review comment:
This test case is confusion, because it has two parameters named "input",
one is body(json string) and the other is form. How would this work?
----------------------------------------------------------------
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]
> [SCB-841] move string type test case from demo to integration-test
> ------------------------------------------------------------------
>
> Key: SCB-841
> URL: https://issues.apache.org/jira/browse/SCB-841
> Project: Apache ServiceComb
> Issue Type: Improvement
> Components: Java-Chassis
> Reporter: 何一乐
> Assignee: 何一乐
> Priority: Minor
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)