commercetools / commercetools/commercetools-api-reference

Format of InventoryEntryCreated message doesn't match the spec

Aperta
#277 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
RAML
Stelle
66
Fork
33
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

According the the spec and [docs](https://docs.commercetools.com/api/projects/messages#inventoryentry-created) the `inventoryEntry` field of the `InventoryEntryCreated` message should contain an [InventoryEntry](https://docs.commercetools.com/api/projects/inventory#inventoryentry).

The messages API instead returns the following structure (didn't check the format in subscriptions yet):

```json
{
"id": "00000000-0000-0000-0000-000000000000",
"version": 1,
"versionModifiedAt": "2022-11-17T13:59:00.080Z",
"sequenceNumber": 1,
"resource": {
"typeId": "inventory-entry",
"id": "11111111-1111-1111-1111-111111111111"
},
"resourceVersion": 1,
"resourceUserProvidedIdentifiers": {
"sku": "my-sku"
},
"type": "InventoryEntryCreated",
"inventoryEntry": {
"type": "InventoryEntryCreated",
"inventoryEntryId": "11111111-1111-1111-1111-111111111111",
"sku": "my-sku",
"supplyChannel": {
"typeId": "channel",
"id": "22222222-2222-2222-2222-222222222222"
},
"quantityOnStock": 123,
"restockableInDays": 2,
"messageId": {
"id": "00000000-0000-0000-0000-000000000000",
"sequenceNumber": 1
}
},
"createdAt": "2022-11-17T13:59:00.080Z",
"lastModifiedAt": "2022-11-17T13:59:00.080Z",
"lastModifiedBy": {
"isPlatformClient": false,
"clientId": "client-id"
},
"createdBy": {
"isPlatformClient": false,
"clientId": "client-id"
}
}
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia confrontando la definizione di InventoryEntryCreated nella documentazione di riferimento dell’API con i messaggi collegati e la documentazione di InventoryEntry. Verifica se la stessa discrepanza è presente anche per subscriptions, come indicato nell’issue. Il lavoro è completato quando lo schema documentato e la struttura del messaggio restituito corrispondono, incluso il campo inventoryEntry.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Ambito
api, documentation
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.