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

Inconsistency API response #179

Open
RezkyRizaldi opened this issue Nov 16, 2022 · 4 comments
Open

Inconsistency API response #179

RezkyRizaldi opened this issue Nov 16, 2022 · 4 comments

Comments

@RezkyRizaldi
Copy link

When you request to /characters/amber, the response contains

{
  ...
  gender: "Female",
  specialDish: "Outrider's Champion Steak!",
  ...
}

which in the other request it doesn't exists.

And in some endpoints e.g. /characters/keqing or /characters/jean the response contain

{
  outfits: [
    {
      ...
    }
  ]
}

which in the other request isn't present.

And other things like:

  • nation key in /characters/aloy has 'Unknown' string value
  • birthday key in /characters/traveler(s) is missing
  • affilation key in /characters/traveler(s) has 'Not affilated to any Nation' string value

Is it better that if the missing key should be nullable instead of undefined or having an empty string?

@arktn
Copy link
Contributor

arktn commented Dec 5, 2022

I'll look into it! 👍

@arktn
Copy link
Contributor

arktn commented Dec 7, 2022

* `affilation` key in `/characters/traveler`(s) has `'Not affilated to any Nation'` string value

Is it better that if the missing key should be nullable instead of undefined or having an empty string?

These API responses are made for clarity, for example "Not affiliated to any Nation" is still information about the character returning a null-able value here could mean that the affiliation is not known or hasn't been added yet or that there is none so the current output provides more clarity.

@RezkyRizaldi
Copy link
Author

RezkyRizaldi commented Dec 7, 2022

* `affilation` key in `/characters/traveler`(s) has `'Not affilated to any Nation'` string value

Is it better that if the missing key should be nullable instead of undefined or having an empty string?

These API responses are made for clarity, for example "Not affiliated to any Nation" is still information about the character returning a null-able value here could mean that the affiliation is not known or hasn't been added yet or that there is none so the current output provides more clarity.

I think it's better to make a new key-value for example affiliated with a boolean value or something that can be processed and consumed flexibly.

But it will make a breaking changes for the stucture.

@RickDeb2004
Copy link

hello, I am debanjan mukherjee ,I would like to change the api and can make it more responsive .I have some projects on that .If you assign me I can do that.

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

No branches or pull requests

3 participants