the-orange-alliance/toa-angular-old

API Docs Return types wrong

CrispyBacon1999 opened this issue · 1 comments

Describe the bug
The api docs show some of the data return types correctly, but the api doesn't match what is actually returned for some endpoints. Specifically /event/:event-key, /team/:team-key, /match/:match-key.
These endpoints return an array containing a single object instead of the documented object type.

Steps to reproduce the issue

  1. Use api/event/:event-key
  2. Look at the json data returned

Expected behavior
Endpoints should return Team, not Team[]

This is the intended response. To normalize the responses of the API, even single object requests return in a 1-object array. The API docs will be updated to reflect this.