Created
May 3, 2016 08:16
-
-
Save jthomas/5136d53028e53d0e3ab86cfc3fc29869 to your computer and use it in GitHub Desktop.
Public APIs for OpenWhisk Actions using API Connect.
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
swagger: '2.0' | |
info: | |
version: 1.0.0 | |
title: hello_name | |
x-ibm-name: hello_name | |
host: $(catalog.host) | |
basePath: / | |
paths: | |
/hello_name: | |
get: | |
responses: | |
'200': | |
description: 200 OK | |
schema: | |
$ref: '#/definitions/whisk_response' | |
parameters: | |
- $ref: '#/parameters/name' | |
securityDefinitions: {} | |
security: [] | |
x-ibm-configuration: | |
assembly: | |
execute: | |
- map: | |
title: map | |
inputs: | |
input: | |
schema: | |
type: string | |
variable: request.parameters.name | |
outputs: | |
output: | |
schema: | |
properties: | |
name: | |
type: string | |
name: name | |
type: object | |
title: output | |
variable: message.body | |
actions: | |
- set: output.name | |
from: input | |
- invoke: | |
target-url: 'https://openwhisk.ng.bluemix.net/api/v1/namespaces/NAMESPACE/actions/hello_action?blocking=true' | |
username: USERNAME | |
password: PASSWORD | |
verb: POST | |
output: whisk_invoke | |
- map: | |
title: map | |
inputs: | |
input: | |
schema: | |
type: object | |
variable: whisk_invoke.body.response.result | |
content: application/json | |
outputs: | |
output: | |
schema: | |
$ref: '#/definitions/whisk_response' | |
variable: message.body | |
actions: | |
- set: output.result | |
from: input | |
gateway: datapower-gateway | |
parameters: | |
name: | |
name: name | |
type: string | |
required: false | |
in: query | |
definitions: | |
whisk_response: | |
properties: | |
result: | |
type: object |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment