0

This is the response Object I am getting:

{
    "data": {

        "19fba609-f306-5a4a-962f-758c4ec1b510": [

            {

                "t": "2022-05-10T09:31:44.175104298Z",

                "v": 3

            },

            {

                "t": "2022-05-12T19:42:47.384567752Z",

                "v": 4

            }

        ]

    }
}

This is the spec I can come up with:

data:
  type: object
  properties:
    deviceId:
      type: array
      items:
        type: object
        properties:
          t:
            type: string
            description: Timestamp of point value
          v:
            type: string
            description: Point value

I am getting the value of deviceId.What do I write in the spec in place of deviceId? I cannot change the api response in any way.

Dev Gourav
  • 91
  • 7
  • 1
    Your `data` object is a string-to-object map. Please see the linked Q&As to learn how to define maps. – Helen May 18 '22 at 09:06

0 Answers0