Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not all Universe Detail Endpoints contain their own id in response #1122

Open
14 of 18 tasks
rayanth opened this issue Jun 13, 2019 · 2 comments
Open
14 of 18 tasks

Not all Universe Detail Endpoints contain their own id in response #1122

rayanth opened this issue Jun 13, 2019 · 2 comments

Comments

@rayanth
Copy link
Contributor

rayanth commented Jun 13, 2019

Related to #273 but provides more info, and additional endpoints.

In some frameworks it is less efficient to try to match results to requests than it is to simply have the id in the response. This also greatly improves readability of code, makes threading easier, and assists in creating foreign-key relations on the receiving end. There are three /universe/ endpoints that do NOT return their ID in the response.

Inconsistency

Most Universe endpoints contain their own id:

  • /universe/categories/{category_id} -- contains category_id in response
  • /universe/constellations/{constellation_id} -- contains constellation_id in response
  • /universe/graphics/{graphic_id) -- contains graphic_id in response
  • /universe/groups/{group_id} -- contains group_id in response
  • /universe/moons/{moon_id} -- contains moon_id in response
  • /universe/planets/{planet_id} -- contains planet_id in response
  • /universe/regions/{region_id} -- contains region_id in response
  • /universe/stargates/{starget_id} -- contains stargate_id in response
  • /universe/stations/{station_id} -- contains station_id in response
  • /universe/systems/{system_id} -- contains system_id in response
  • /universe/types/{type_id} -- contains type_id in response.

These detail end points do NOT:

  • /universe/asteroid_belts/{asteroid_belt_id} -- missing asteroid_belt_id from response
  • /universe/stars/{star_id} -- missing star_id from response
  • /universe/structures/{structure_id} -- missing structure_id from response

Routes

  • GET /v1/universe/asteroid_belts/{asteroid_belt_id}/
  • GET /v1/universe/stars/{star_id}/
  • GET /v2/universe/structures/{structure_id}/

Resolution

Add noted id's to the three endpoints in Universe that are missing them.

Checklist

@Blacksmoke16
Copy link
Member

IIRC I think they would be more inclined to remove the id from the ones that include as opposed to adding it to the ones it's missing from.

@gitAskur
Copy link
Contributor

We would be more inclined to remove these id's from the responses, as they should be contained in the context of the request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants