esi / esi-issues

Issue tracking and feature requests for ESI
https://esi.evetech.net/
207 stars 23 forks source link

ID Array Conventions #380

Open itshouldntdothis opened 7 years ago

itshouldntdothis commented 7 years ago

Conventions

Description

Where an array of ids is returned inside an object define them as ids.

Example

GET /v2/universe/systems/30000003/

stargates > stargate_ids
moons > moon_ids
{
  "planets": [
    {
      "planet_id": 40000041,
      "moons": [ 40000042 ]
    },
    {
      "planet_id": 40000123,
      "moons": [ 40000125, 40000127, 40000128 ]
    }
  ],
  "stargates": [ 50000342, 50000343, 50000344, 50000345 ],
  ...otherFields
}
=>
{
  "planets": [
    {
      "planet_id": 40000041,
      "moon_ids": [ 40000042 ]
    },
    {
      "planet_id": 40000123,
      "moon_ids": [ 40000125, 40000127, 40000128 ]
    }
  ],
  "stargate_ids": [ 50000342, 50000343, 50000344, 50000345 ],
  ...otherFields
}

Routes / Resolution

CarbonAlabel commented 6 years ago

GitHub doesn't seem to have a reaction smiley for expressing ambivalence, so this comment will have to do: While I don't consider this convention necessary, or particularly desirable, I do not have any strong feelings against it either.