kapua icon indicating copy to clipboard operation
kapua copied to clipboard

GET device not returning connection and lastEvent type

Open mmgspr opened this issue 2 years ago • 0 comments

Describe the bug When doing a GET device request using ?fetchAttributes=connection&fetchAttributes=lastEvent as parameters, the response's body doesn't contain the "type" field of both connection and lastEvent. Requesting them using their own requests (/{scopeId}/deviceconnections/{connectionId} and /{scopeId}/devices/{deviceId}/events/{deviceEventId}) do return you the "type" field.

To Reproduce Steps to reproduce the behavior:

  1. Request a device using /{scopeId}/devices/{deviceId} and adding the parameters ?fetchAttributes=connection&fetchAttributes=lastEvent after the deviceId.
  2. Inspect the response's body and find the "connection" and "lastEvent" fields.
  3. See error

Expected behavior The response's body containing all the fields (including the "type").

Screenshots If applicable, add screenshots to help explain your problem. GET device's body: screenshot1 GET connection's body: screenshot2 GET event's body screenshot3

Version of Kapua 1.5.2

Type of deployment [X ] Docker [ ] Openshift (in its variants) [ ] Others

Main component affected [ ] Console (in case of console please report info on which browser you encountered the problem) [X] REST API [ ] Message Broker [ ] - Others

mmgspr avatar Jul 08 '22 07:07 mmgspr