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/01/30 15:06:11 UTC

[GitHub] jessealva commented on a change in pull request #170: WIP: Initial code checkin for path parameter support

jessealva commented on a change in pull request #170: WIP: Initial code checkin for path parameter support
URL: https://github.com/apache/incubator-openwhisk-cli/pull/170#discussion_r164769429
 
 

 ##########
 File path: commands/api.go
 ##########
 @@ -93,6 +93,22 @@ func isValidRelpath(relpath string) (error, bool) {
 	return nil, true
 }
 
+func hasPathParameters(path string) bool {
+	return (strings.Count(path, "{") > 0) || (strings.Count(path, "}") > 0)
 
 Review comment:
   Nope, the path is something like `"/users/{user}/balance"`, so we're checking for balanced brackets.  But now that you bring it up, I think Mark and I had discussed changing this strategy up a bit so that the logic uses regex instead.  

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