googleapis / googleapis/google-api-nodejs-client
The `Schema$GoogleCloudMlV1__PredictRequest` type does not match what the API expects
- Dominant language
- TypeScript
- Stars
- 12.2k
- Forks
- 2k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 24
Description
#### Environment details
- OS: Linux
- Node.js version: 10.16.3
- npm version: 6.9.0
- `googleapis` version: 47.0.0
#### Steps to reproduce
1. Use Typescript to call `google.ml('v1').predict()`. The `predict()` expects a property `requestBody` of type `Schema$GoogleCloudMlV1__PredictRequest`.
2. Implementing this involves wrapping the expected payload in string called 'data'
3. The API responses with
```
'Invalid request. The service expects the request to be a valid JSON object with a list-valued attribute called `instances`, i.e. `{"instances": [...]}`. The received request was:\nb\'{"httpBody":{"data":"{\\\\"instances\\\\":[[1,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,525,965,5280]]}"}}\'' },
```
Contributor guide
Assessment
This issue has not been assessed yet.