Skip to content

Refactor suggestion: Wrap all responses on a data field #303

@0xDones

Description

@0xDones

The json payload returned by some calls is redundant, for example:

/v4/character/<name>

# Before
{
  "character": {
    "character": {
    ...
    }
}

# After
{
  "data": {
    "character": {
    ...
    }
}

/v4/boostablebosses

# Before
{
  "boostable_bosses": {
    "boostable_boss_list": [
    ]
}

# After
{
  "data": {
    "boostable_bosses": [
    ]
}

It makes more sense to always return a data field with the data we are expecting. This is a step towards standardization of the api responses.

In addition, the information field is irrelevant in most of the cases, the status header would be enough for status code and the api information could have a dedicated endpoint if we want to retrieve this information.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions