hummingbird-me / kitsu-tools

:hammer: The tools we use to build Kitsu, the coolest platform for anime and manga
https://kitsu.io
Apache License 2.0
2.09k stars 264 forks source link

Question related to User Object's waifu_or_husbando #764

Closed qgustavor closed 7 years ago

qgustavor commented 7 years ago

The documentation for the User Object says:

waifu_or_husbando Can be one of Waifu, Husbando.

By reading it I assumed this value cannot be different from those two values, but it don't happen for this user: https://hummingbird.me/users/AsterPiano (the value is The duce).

What is the intended behavior, allowing any value (as it's stored as a string) or only those two values?

wopian commented 7 years ago

It's an unintended loophole from shitty freelancer code ;)

https://hummingbird.me/users/wopian

qgustavor commented 7 years ago

Should the documentation be updated with this detail?

cybrox commented 7 years ago

I don't think there's much value in that. For now, we are focusing on the future main version, the more time we can put into that instead of fixing/documenting not security relevant mistakes from the past, the better.

If you want to fix/document it, feel free to create a PR, though.

Btw, the commit @wopian referred to is 3ad5943191885a4ddb03f7f4767815197ba3eedc

qgustavor commented 7 years ago

Well, if the focus is the new version I think fixing it now isn't important. The documentation is a wiki, so the PR isn't needed, I can just edit it. How about one of those? (I don't know what's the most appropriate)

waifu_or_husbando can be one of Waifu, Husbando (in some cases, other values). waifu_or_husbando can be one of Waifu, Husbando, or other values. waifu_or_husbando for most users is one of Waifu, Husbando.

matthewdias commented 7 years ago

Well you're not actually supposed to be able to have something else, so maybe best to leave it out of the wiki.

NuckChorris commented 7 years ago

The wiki can document the sorry state of our normalization for now, I don't see any problem with that

cybrox commented 7 years ago

@qgustavor I added the note from your first suggestion to the wiki. Thanks for mentioning this. I do agree on that it is no problem to have that stated there and might avoid any confusion if someone is attempting to get (and validate) those values from the API.

Eh, at least we support non-binary concepts, I guess 😉