Uploaded image for project: 'RAML Module Builder'
  1. RAML Module Builder
  2. RMB-679

Move totalRecords property to the top of query responses for all query APIs

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open (View Workflow)
    • Priority: TBD
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Template:
    • Sprint:
      CP: Non-roadmap backlog
    • Development Team:
      Core: Platform

      Description

      I have noticed that for query APIs that stream the results, the totalRecords property appears at the top of the response, and it appears at the bottom of the response for those that don't. Can you move it to the top for all of them?

      Actual result:

      {
        "instances" : [
          { 1st instance ... },
          { 2nd instance ... },
          { 3rd instance ... }
        ],
        "totalRecords" : 2318037
      }
      

      Expected result:

      {
        "totalRecords" : 2318037,
        "instances" : [
          { 1st instance ... },
          { 2nd instance ... },
          { 3rd instance ... }
        ]
      }
      
      

      This would make it easier to implement client code. In my code, I read the data as a stream regardless of whether the back end is streaming the data. It would make it a lot easier to work with, if the totalRecords property was consistently at the top of the response. If you are reading the data as a stream, you can't just lookup the property like using a dictionary lookup. You are using a lower-level API and are reading JSON tokens one by one.

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                Unassigned Unassigned
                Reporter:
                jemiller Jon Miller
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:

                    TestRail: Runs

                      TestRail: Cases