mdeuser commented on a change in pull request #2458: wsk CLI should tolerate 
APIs that do not yet have a mapped action
URL: 
https://github.com/apache/incubator-openwhisk/pull/2458#discussion_r126011762
 
 

 ##########
 File path: tools/cli/go-whisk/whisk/api.go
 ##########
 @@ -545,21 +545,15 @@ func validateApiPath(path 
map[string]*ApiSwaggerOperationV2) error {
 }
 
 func validateApiOperation(opName string, op *ApiSwaggerOperationV2) error {
-    if len(op.OperationId) == 0 {
-        Debug(DbgError, "validateApiResponse: No operationId field in 
operation %v\n", op)
+    if (op.XOpenWhisk != nil && len(op.OperationId) == 0) {
+        Debug(DbgError, "validateApiOperation: No operationId field in 
operation %v\n", op)
         errMsg := wski18n.T("Missing operationId field in API configuration 
for operation {{.op}}",
             map[string]interface{}{"op": opName})
         whiskErr := MakeWskError(errors.New(errMsg), EXITCODE_ERR_NETWORK, 
DISPLAY_MSG, NO_DISPLAY_USAGE)
         return whiskErr
     }
-    if op.XOpenWhisk == nil {
 
 Review comment:
   That's an indication of an action-less API.
 
----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to