googleapis / googleapis/google-api-nodejs-client
The `Schema$GoogleCloudMlV1__PredictRequest` type does not match what the API expects
- Lingua principale
- TypeScript
- Stelle
- 12.2k
- Fork
- 2k
- Merge medio
- 1g 9h
- PR unite (30g)
- 24
Descrizione
#### 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]]}"}}\'' },
```
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start with the TypeScript signature for google.ml('v1').predict() and the Schema$GoogleCloudMlV1__PredictRequest type. Compare the request shape produced from requestBody with the API error, which expects a JSON object containing instances. Done means the typed request can send that payload and the API accepts it.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- gcp, nodejs, typescript
- Ambito
- api, machine-learning
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 32/100