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 2019/01/16 22:47:01 UTC

[GitHub] mdeuser commented on a change in pull request #4221: during api create, correctly handle non-default (i.e. "_") namespaces

mdeuser commented on a change in pull request #4221: during api create, correctly handle non-default (i.e. "_") namespaces
URL: https://github.com/apache/incubator-openwhisk/pull/4221#discussion_r248480500
 
 

 ##########
 File path: core/routemgmt/common/apigw-utils.js
 ##########
 @@ -853,7 +853,8 @@ function updateNamespace(apidoc, namespace) {
     if (apidoc.action) {
       // The action namespace does not have to match the CLI user's namespace
       // If it is different, leave it alone; otherwise use the replacement namespace
-      if (apidoc.namespace === apidoc.action.namespace) {
+      // And only replace when the namespace is the default '_' which needs replacement
+      if (apidoc.namespace === apidoc.action.namespace && apidoc.namespace === '_') {
 
 Review comment:
   good question.  there are two "namespace" values at play here.  one is the .wskprops namespace `apidoc.namespace` and the other is the namespace of the target action `apidoc.action.namespace`.  i believe your suggestion would also work.  the case where the action namespace is `_` while the target namespace is non-default is unusual and i believe not possible with the cli.

----------------------------------------------------------------
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