[ https://issues.apache.org/jira/browse/SCB-106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16430155#comment-16430155 ]
liubao commented on SCB-106: ---------------------------- Tested with latest version, this problem has been resolved. > using @PostMapping and @RequestMapping(method=POST) given different interface > definitions > ----------------------------------------------------------------------------------------- > > Key: SCB-106 > URL: https://issues.apache.org/jira/browse/SCB-106 > Project: Apache ServiceComb > Issue Type: Bug > Reporter: liubao > Priority: Major > > @RestSchema(schemaId = "test") > public class ComplexService { > @RequestMapping(path = "/", method = RequestMethod.POST) > public ResponseEntity<String> custerInfo(@RequestBody CustomerInfoWrapper > info, HttpServletRequest request) { > ResponseEntity<String> result = > ResponseEntity.ok(info.getData().getName()); > return result; > } > } > given this schema: > basePath: "/ComplexService" > consumes: > - "application/json" > produces: > - "application/json" > paths: > /: > post: > operationId: "custerInfo" > parameters: > - in: "body" > name: "info" > required: false > schema: > $ref: "#/definitions/CustomerInfoWrapper" > responses: > 200: > description: "response of 200" > schema: > type: "string" > but > @RestSchema(schemaId = "test") > public class ComplexService { > @PostMapping(path = "/") > public ResponseEntity<String> custerInfo(@RequestBody CustomerInfoWrapper > info, HttpServletRequest request) { > ResponseEntity<String> result = > ResponseEntity.ok(info.getData().getName()); > return result; > } > } > given: > basePath: "/ComplexService" > consumes: > - "application/json" > produces: > - "application/json" > paths: > /custerInfo: > post: > operationId: "custerInfo" > parameters: > - in: "body" > name: "info" > required: false > schema: > $ref: "#/definitions/CustomerInfoWrapper" > responses: > 200: > description: "response of 200" > schema: > $ref: "#/definitions/ResponseEntityString" > definitions: > CustomerInfo: > type: "object" > properties: > name: > type: "string" > x-java-class: "com.huawei.paas.cse.demo.springmvc.server.CustomerInfo" > CustomerInfoWrapper: > type: "object" > properties: > data: > $ref: "#/definitions/CustomerInfo" > x-java-class: > "com.huawei.paas.cse.demo.springmvc.server.CustomerInfoWrapper" > ResponseEntity: > type: "object" > properties: > headers: > type: "object" > additionalProperties: > type: "array" > items: > type: "string" > body: > type: "object" > statusCode: > type: "string" > enum: > - "CONTINUE" > - "SWITCHING_PROTOCOLS" > - "PROCESSING" > - "CHECKPOINT" > - "OK" > - "CREATED" > - "ACCEPTED" > - "NON_AUTHORITATIVE_INFORMATION" > - "NO_CONTENT" > - "RESET_CONTENT" > - "PARTIAL_CONTENT" > - "MULTI_STATUS" > - "ALREADY_REPORTED" > - "IM_USED" > - "MULTIPLE_CHOICES" > - "MOVED_PERMANENTLY" > .... .... ignored -- This message was sent by Atlassian JIRA (v7.6.3#76005)