swapi icon indicating copy to clipboard operation
swapi copied to clipboard

Inconsistent Data

Open tbone849 opened this issue 9 years ago • 5 comments

A few character's species and homeworlds are listed as an empty array, whereas it would be more beneficial to be listed as 'unknown'.

people/82, people/2, and people/75: species and homeworlds are empty arrays

starships/3/ - length includes a comma, whereas all other number data doesn't include commas starships/11/ - speed includes km unit and should just be a number

tbone849 avatar Feb 04 '16 13:02 tbone849

I have the same problem, getting some 404 errors when I tried to fetch a random vehicle/starship id into the url: /vehicle/id.

Awesome API though ;)

vladinator1000 avatar Jul 07 '16 01:07 vladinator1000

@tbone849 why would you prefer a different type of response? Wouldn't you prefer a consistent data type, such as an array, but that has zero values?

phalt avatar Jul 07 '16 11:07 phalt

@phalt Haven't looked at this in a while, but upon further review, you are right that a response that has no value should return an empty array (such as people/75 has an empty array for species, vehicles, and starships). I think the "inconsistent data" remark was meant more towards the starship errors at the bottom of the my original comment.

tbone849 avatar Jul 07 '16 12:07 tbone849

@tbone849 aha yes, I see. I should try and normalise them. I might be able to find time this weekend to do it.

phalt avatar Jul 07 '16 12:07 phalt

@savovs Sounds like you are having a different problem the the one I had. You might want to open a new issue.

tbone849 avatar Jul 07 '16 12:07 tbone849