Closed sb-aigh closed 1 year ago
When creating a V2 entity (via BatchRequest containing POST), the mockserver returns a response like the following:
--batch_e9b6-2912-a683 Content-Type: multipart/mixed; boundary=changeset_dfd9-54ec-be88 --changeset_dfd9-54ec-be88 Content-Type: application/http Content-Transfer-Encoding: binary HTTP/1.1 201 Created sap-tenantid: tenant-default Location: MyEntitySet() dataserviceversion: 2.0 cache-control: no-store, no-cache content-type: application/json {"d":{"uuid":"0c241e36-7e4c-44b4-a748-3bf31fcc2135","name":"my name","description":"my description","isActive":true,"__metadata":{"id":"/odata/v2/MyService/MyEntitySet()","uri":"/odata/v2/MyService/MyEntitySet()","type":"MyService.MyEntitySet"}}} --changeset_dfd9-54ec-be88-- --batch_e9b6-2912-a683--
The response payload contains the key (-> uuid) with some generated value, but the metadata id and uri as well as the Location property in the header section do not contain any key (just ()).
()
The batch request response shall contain:
--batch_e9b6-2912-a683 Content-Type: multipart/mixed; boundary=changeset_dfd9-54ec-be88 --changeset_dfd9-54ec-be88 Content-Type: application/http Content-Transfer-Encoding: binary HTTP/1.1 201 Created sap-tenantid: tenant-default Location: MyEntitySet(guid'0c241e36-7e4c-44b4-a748-3bf31fcc2135') dataserviceversion: 2.0 cache-control: no-store, no-cache content-type: application/json {"d":{"uuid":"0c241e36-7e4c-44b4-a748-3bf31fcc2135","name":"my name","description":"my description","isActive":true,"__metadata":{"id":"/odata/v2/MyService/MyEntitySet(guid'0c241e36-7e4c-44b4-a748-3bf31fcc2135')","uri":"/odata/v2/MyService/MyEntitySet(guid'0c241e36-7e4c-44b4-a748-3bf31fcc2135')","type":"MyService.MyEntitySet"}}} --changeset_dfd9-54ec-be88-- --batch_e9b6-2912-a683--
In my example the key is of type Edm.Guid hence the response key is guid('xyz').
2.1.114
Most likely fixed by [@sap-ux/ui5-middleware-fe-mockserver@2.1.115]
Description
When creating a V2 entity (via BatchRequest containing POST), the mockserver returns a response like the following:
The response payload contains the key (-> uuid) with some generated value, but the metadata id and uri as well as the Location property in the header section do not contain any key (just
()
).Expected results
The batch request response shall contain:
In my example the key is of type Edm.Guid hence the response key is guid('xyz').
Version/Components/Environment
2.1.114