Create a gist now

Instantly share code, notes, and snippets.

Public APIs for OpenWhisk Actions using API Connect.
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