ohsome-api icon indicating copy to clipboard operation
ohsome-api copied to clipboard

Change 'groupByObject" to 'groupByObjectId' in JSON response

Open bonaparten opened this issue 5 years ago • 4 comments

The value of groupByObject in a JSON response represents the ID of the object, not the object itself. groupByObject should be changed to groupByObjectId or something similar.

bonaparten avatar Nov 18 '20 14:11 bonaparten

Relevant code line: https://github.com/GIScience/ohsome-api/blob/73ce61a590efa7b026a949ab09f380a5f13ef477/src/main/java/org/heigit/ohsome/ohsomeapi/output/dataaggregationresponse/groupbyresponse/GroupByObject.java#L21

in class GroupByObject

FabiKo117 avatar Nov 18 '20 15:11 FabiKo117

see also https://github.com/GIScience/ohsome-api/commit/360508a6be35a4b0c2d6a9e731d911f1840d3d9e, https://github.com/GIScience/ohsome-api/pull/57#issuecomment-728838052 and #80

tyrasd avatar Nov 18 '20 16:11 tyrasd

what would you do with the multi-groupBy requests, like /groupBy/boundary/groupBy/tag/ for example. currently, those look like this:

    "groupByObject" : [ "Heidelberg", "highway=tertiary" ]

Would you name those groupByObjectIds or groupByObjectsIds perhaps?

tyrasd avatar Nov 18 '20 16:11 tyrasd

We've decided in a 2.0 release meeting that we want to call this response object simply group for all the /groupBy responses.

FabiKo117 avatar Apr 14 '21 08:04 FabiKo117