'lastVolume' & 'lastChapter' manga attribute

Staff
Super Moderator
Joined
Aug 19, 2020
Messages
786
https://api.mangadex.org/docs/redoc.html#tag/Manga/operation/get-manga-id
  • Why is the 'lastVolume' and 'lastChapter' manga attribute a string and not a number.
  • Why is the 'lastVolume' and 'lastChapter' default value an empty string and not null
I know that there is cursed v3 that are strings, but it would have been better to just yeet the data (and maybe create a list of the yeeted data with the manga id). There is no value in keeping data that is being removed by data contributors anyways.
 
Contributor
Joined
Jan 19, 2018
Messages
488
They are strings because there is real data that is just that cursed.

Cannot remember the titles of the top of my head but there are chapters with letters as part of their number (i.e ch. 3a) so in theory you could have a last chapter/volume that contains a non numeric character.
 
Staff
Super Moderator
Joined
Aug 19, 2020
Messages
786
Cannot remember the titles of the top of my head but there are chapters with letters as part of their number (i.e ch. 3a) so in theory you could have a last chapter/volume that contains a non numeric character.
Yep, and this data could've just been yeeted. It's wrong in most cases anyways and will be replaced by contributors.
 
Staff
Super Moderator
Joined
Aug 19, 2020
Messages
786
Why is the 'lastVolume' and 'lastChapter' default value an empty string and not null
Now that I read a bit into the definition on not existing values for my 'year' attribute post
And the JSON:API specification specifies multiple times that an api should return null if the value doesn't exist, e.g the link specification.
And when we go further down the rabbit hole we come to the json definition.
RFC 4627 and json.org specifically added null to represent the value of "nothing".
 
Staff
Super Moderator
Joined
Aug 19, 2020
Messages
786
They are strings because there is real data that is just that cursed.

Cannot remember the titles of the top of my head but there are chapters with letters as part of their number (i.e ch. 3a) so in theory you could have a last chapter/volume that contains a non numeric character.
Also posting my message here from a conversation on Discord:
the last chapter & volume value is for the MD chapter number and not for the author chapter number
e.g. cases where there is:
  • season 1
  • season 2a
  • season 2b
it's this on MD:
  • volume 1
  • volume 2
  • volume 3
so I really don't get why the author's numbering matters for these values
my example is based on this manhua that I fixed recently.
 

Users who are viewing this thread

Top