You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/07/20 21:42:28 UTC
[GitHub] mdeuser opened a new issue #3888: api swagger validation throws
exception on an api using the x-require-whisk-auth header
mdeuser opened a new issue #3888: api swagger validation throws exception on an api using the x-require-whisk-auth header
URL: https://github.com/apache/incubator-openwhisk/issues/3888
Normally, the related swagger section defining the need for the api gw to inject the x-require-whisk-auth header looks like:
```
"execute": [
{
"invoke": {
"target-url": "https://openwhisk.ng.bluemix.net/api/v1/web/NAMESPACE/PACKAGE/ACTION.json",
"verb": "keep"
}
},
{
"set-variable": {
"actions": [
{
"set": "message.headers.X-Require-Whisk-Auth",
"value": "XXXXXXXXXXXX"
}
]
}
}
],
```
if the `set-variable` object comes before the `invoke` object in this `execute` array, an exception is thrown by the swagger validation logic in the apimgmt/createApi web action.
```
error: Unable to create API: API creation failure: Cannot read property 'target-url' of undefined
```
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services