You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/10/09 19:33:10 UTC

[GitHub] mdeuser commented on a change in pull request #4056: apigateway should always append request.path if response type is http

mdeuser commented on a change in pull request #4056: apigateway should always append request.path if response type is http
URL: https://github.com/apache/incubator-openwhisk/pull/4056#discussion_r223793275
 
 

 ##########
 File path: core/routemgmt/common/apigw-utils.js
 ##########
 @@ -566,7 +566,7 @@ function setActionOperationInvocationDetails(swagger, endpoint, operationId, res
   var caseIdx = getCaseOperationIdx(caseArr, operationId);
   var operations = [operationId];
   _.set(swagger, 'x-ibm-configuration.assembly.execute[0].operation-switch.case['+caseIdx+'].operations', operations);
-  _.set(swagger, 'x-ibm-configuration.assembly.execute[0].operation-switch.case['+caseIdx+'].execute[0].invoke.target-url',  makeWebActionBackendUrl(endpoint.action, responsetype, getPathParameters(endpoint.gatewayPath)));
+  _.set(swagger, 'x-ibm-configuration.assembly.execute[0].operation-switch.case['+caseIdx+'].execute[0].invoke.target-url',  makeWebActionBackendUrl(endpoint.action, responsetype) + (responsetype === 'http' ? "$(request.path)" : ""));
 
 Review comment:
   recommend moving `+ (responsetype === 'http' ? "$(request.path)" ` into the `makeWebActionBackendUrl` function

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


With regards,
Apache Git Services