project Utilities / File Location Listing avatar

utilities/file_location_listing#38: Nest results within the API Response Format



Issue Information

Issue Type: issue
Status: closed
Reported By: btasker
Assigned To: btasker

Milestone: v0.2.3
Created: 07-Jan-24 11:12



Description

Currently, the search endpoint returns a simple JSON list of results:

[
    { blah },
    { foo }
]

This doesn't leave any room for the API to communicate additional information about the search (or, perhaps, return an error message etc).

It might, perhaps be better to change that to be more like

{
  "results" : [
    { blah },
    { foo }
  ]
}

So that additional attributes can be added at the top-level



Toggle State Changes

Activity


assigned to @btasker

This, obviously, would be backwards incompatible.

I don't currently have a pressing need for this change. But, currently, I am definitely the only user of the codebase - it's probably better to make this change now (and set us up for any future need) than to find it's needed later only to find that someone else has started using it.

changed title from Nest results with the API Response Format to Nest results with{+in+} the API Response Format

verified

mentioned in commit 88e9b44edff377fe9c56e8cbe9737f83fe3ffb96

Commit: 88e9b44edff377fe9c56e8cbe9737f83fe3ffb96 
Author: B Tasker                            
                            
Date: 2024-01-07T11:59:28.000+00:00 

Message

feat: nest results one attribute down in JSON responses (utilities/file_location_listing#38)

+7 -3 (10 lines changed)
verified

mentioned in commit search_notes@4ffa33d18b6789cae13024e69162cb7f02cbf603

Commit: search_notes@4ffa33d18b6789cae13024e69162cb7f02cbf603 
Author: B Tasker                            
                            
Date: 2024-01-07T17:10:48.000+00:00 

Message

Update search_locations.py to reflect API changes in utilities/file_location_listing#38

+1 -1 (2 lines changed)

mentioned in issue #39