Inconsistency between cloud API and emulator API on function calls
acchou opened this issue · 0 comments
acchou commented
Environment details
- OS: MacOSX High Sierra 10.13.4 (17E202)
- Node.js version: v6.11.5
- npm version: 3.10.10
- @google-cloud/functions-emulator version: 1.0.0-beta.4
Steps to reproduce
- When calling
projects.locations.functions.call
, the public google cloud function api expects arguments like:
gapi.projects.locations.functions.call({
name,
requestBody
})
where requestBody
is of type Schema$CallFunctionRequest
:
interface Schema$CallFunctionRequest {
/**
* Input to be passed to the function.
*/
data?: string;
}
When using the cloud emulator API, the data
field only works when it is passed an object, not a string. The live google functions API only allows a string, not an object.