blob: 79b5bdc489b8ae6bba5df44d50ec38f1245de0d8 [file] [log] [blame]
{
"swagger": "2.0",
"info": {
"version": "1.0",
"title": "Hello World API"
},
"basePath": "/whisk",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/hello": {
"get": {
"operationId": "getHello",
"description": "Returns a greeting to the user!",
"x-openwhisk": {
"namespace": "greend@us.ibm.com_dev",
"package": "demo",
"action": "hello",
"url": "https://openwhisk.ng.bluemix.net/api/some/action/path.http"
},
"parameters": [
{
"name": "user",
"in": "path",
"type": "string",
"required": true,
"description": "The name of the user to greet."
}
],
"responses": {
"200": {
"description": "Returns the greeting.",
"schema": {
"type": "string"
}
},
"400": {
"description": "Invalid characters in \"user\" were provided."
}
}
},
"post": {
"operationId": "postHello",
"description": null,
"x-openwhisk": {
"package": "demo",
"action": "createUser",
"url": "https://openwhisk.ng.bluemix.net/api/user@us.ibm.com/demo/createuser"
}
}
}
},
"securityDefinitions": {
"client_id": {
"type": "apiKey",
"name": "X-Api-Key",
"in": "header"
},
"google": {
"type": "oauth2",
"flow": "tokenIntrospect",
"x-tokenintrospect": {
"url": "https://www.googleapis.com/oauth2/v3/tokeninfo"
}
}
},
"security": [
{
"client_id": [],
"client_secret": []
}
],
"x-ibm-rate-limit": [
{
"unit": "minute",
"units": 3,
"rate": 100
}
],
"x-ibm-configuration": {
"assembly": {
"execute": [
{
"set-variable": {
"actions": [
{
"set": "message.headers.Authorization",
"value": "Basic xxx"
}
]
}
},
{
"operation-switch": {
"case": [
{
"operations": [
"getHello"
],
"execute": [
{
"proxy": {
"target-url": "https://openwhisk.ng.bluemix.net/api/some/action/path.http",
"verb": "keep"
}
}
]
},
{
"operations": [
"postHello"
],
"execute": [
{
"proxy": {
"target-url": "https://openwhisk.ng.bluemix.net/api/user@us.ibm.com/demo/createuser",
"verb": "keep"
}
}
]
}
],
"otherwise": []
}
}
]
}
}
}