-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for set-variable in operation-switch (#282)
- Loading branch information
1 parent
c389313
commit 8ad9bbb
Showing
5 changed files
with
308 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"version": "1.0", | ||
"title": "Hello World API" | ||
}, | ||
"basePath": "/whisk2", | ||
"schemes": [ | ||
"https" | ||
], | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"paths": { | ||
"/bye": { | ||
"get": { | ||
"operationId": "getBye", | ||
"description": "Returns a greeting to the user!", | ||
"responses": { | ||
"200": { | ||
"description": "Returns the greeting.", | ||
"schema": { | ||
"type": "string" | ||
} | ||
}, | ||
"400": { | ||
"description": "Invalid characters in \"user\" were provided." | ||
} | ||
} | ||
}, | ||
"post": { | ||
"operationId": "postBye", | ||
"description": null | ||
} | ||
} | ||
}, | ||
"securityDefinitions": {}, | ||
"security": [], | ||
"x-ibm-rate-limit": [], | ||
"x-gateway-configuration": { | ||
"assembly": { | ||
"execute": [ | ||
{ | ||
"operation-switch": { | ||
"case": [ | ||
{ | ||
"operations": [ | ||
"getBye" | ||
], | ||
"execute": [ | ||
{ | ||
"set-variable": { | ||
"actions": [ | ||
{ | ||
"set": "message.headers.foo", | ||
"value": "bar" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"set-variable": { | ||
"actions": [ | ||
{ | ||
"set": "message.headers.hello", | ||
"value": "world" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"invoke": { | ||
"target-url": "https://openwhisk.ng.bluemix.net/api/some/action/path.http", | ||
"verb": "keep" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"operations": [ | ||
"postBye" | ||
], | ||
"execute": [ | ||
{ | ||
"invoke": { | ||
"target-url": "https://openwhisk.ng.bluemix.net/api/[email protected]/demo/createuser", | ||
"verb": "keep" | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"otherwise": [] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
Oops, something went wrong.