Lists in JSON responses do not have root level keys

Bug #1389402 reported by Melissa Kam
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Solum
Triaged
Low
Amit

Bug Description

For Example:
GET /assemblies
[
    {
        "status": "READY",
        "plan_uri": "http://localhost:9003/v1/plans/a5e679bb-0f53-4245-ab71-db095664a22a",
        "user_id": "04320243e439452a8193038219fc6a91",
        "name": "test",
        "application_uri": null,
        "tags": null,
        "uri": "http://localhost:9003/v1/assemblies/a1acbbff-4ae4-4311-9d6e-58412d7b0751",
        "trigger_uri": "http://localhost:9003/v1/triggers/ba443545-0160-4ff8-a842-ca71020fb6a7",
        "uuid": "a1acbbff-4ae4-4311-9d6e-58412d7b0751",
        "project_id": "d2248cc77b944ac6b0cb8b05587bfe8f",
        "type": "assembly",
        "description": null
    },
    {
        "status": "READY",
        "plan_uri": "http://localhost:9003/v1/plans/f08dec2f-d68d-44b8-b241-959bc488ce73",
        "user_id": "04320243e439452a8193038219fc6a91",
        "name": "test_pass",
        "application_uri": null,
        "tags": null,
        "uri": "http://localhost:9003/v1/assemblies/25b46dff-a384-4011-959f-8dbca2ea0419",
        "trigger_uri": "http://localhost:9003/v1/triggers/30700505-5b0a-4ad2-b3bb-15b522d92776",
        "uuid": "25b46dff-a384-4011-959f-8dbca2ea0419",
        "project_id": "d2248cc77b944ac6b0cb8b05587bfe8f",
        "type": "assembly",
        "description": null
    }
]

However, the list should have a key associated with it as show below. This will be necessary when pagination is implemented and other attributes such as "next" and "previous" are added.

{
   "assemblies": [
       {
           "status": "READY",
           "plan_uri": "http://localhost:9003/v1/plans/a5e679bb-0f53-4245-ab71-db095664a22a",
           "user_id": "04320243e439452a8193038219fc6a91",
           "name": "test",
           "application_uri": null,
           "tags": null,
           "uri": "http://localhost:9003/v1/assemblies/a1acbbff-4ae4-4311-9d6e-58412d7b0751",
           "trigger_uri": "http://localhost:9003/v1/triggers/ba443545-0160-4ff8-a842-ca71020fb6a7",
           "uuid": "a1acbbff-4ae4-4311-9d6e-58412d7b0751",
           "project_id": "d2248cc77b944ac6b0cb8b05587bfe8f",
           "type": "assembly",
           "description": null
       },
      {
           "status": "READY",
           "plan_uri": "http://localhost:9003/v1/plans/f08dec2f-d68d-44b8-b241-959bc488ce73",
           "user_id": "04320243e439452a8193038219fc6a91",
           "name": "test_pass",
           "application_uri": null,
           "tags": null,
           "uri": "http://localhost:9003/v1/assemblies/25b46dff-a384-4011-959f-8dbca2ea0419",
           "trigger_uri": "http://localhost:9003/v1/triggers/30700505-5b0a-4ad2-b3bb-15b522d92776",
           "uuid": "25b46dff-a384-4011-959f-8dbca2ea0419",
           "project_id": "d2248cc77b944ac6b0cb8b05587bfe8f",
           "type": "assembly",
           "description": null
     }
  ]
}

tags: added: low-hanging-fruit
Changed in solum:
assignee: nobody → Deepak Bhaskaran (dbhaskaran)
Revision history for this message
Adrian Otto (aotto) wrote :

 Deepak Bhaskaran, please re-claim this bug if you plan to work on it.

Changed in solum:
assignee: Deepak Bhaskaran (dbhaskaran) → nobody
milestone: none → 2015.1.1
importance: Undecided → Low
status: New → Triaged
Amit (mail2amit19)
Changed in solum:
assignee: nobody → Amit (mail2amit19)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.