Repository navigation
fix(api): mark response fields the live API can omit or null as nullish - #1102
Draft
michaldrabik wants to merge 1 commit into
Draft
michaldrabik wants to merge 1 commit into
michaldrabik wants to merge 1 commit into
Conversation
michaldrabik
force-pushed
the
fix/api-response-nullability
branch
from
November 23, 2026 07:29
e30966e to
01cb6f6
Compare
Five response fields were typed stricter than what the live API returns: - settings user.email can be absent - favorited_by and recommended_by on recommendations can be absent - season first_aired is null for seasons without an air date - progress reset_at holds a datetime while a rewatch is in progress - remove ratings not_found echoes ids only, never a rating
michaldrabik
force-pushed
the
fix/api-response-nullability
branch
from
November 30, 2026 07:58
01cb6f6 to
62f0d6c
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Five response fields were typed stricter than what the live API returns, so a valid response failed to parse or was mistyped.
user.email: now nullish. The API can leave it out.favorited_by/recommended_by:.nullable()->.nullish()for movies and shows. The keys are not always present.first_aired:.optional()->.nullish(). It isnullfor seasons without an air date. The doc comment that sat inside.optional(...)moves aboveupdated_at, the field it describes.reset_at: wasz.null(), now a nullish UTC datetime. It holds a datetime while a rewatch is in progress.not_found: now the ids-onlymediaItemsNotFoundSchema. A remove request carries norating, so the echo cannot have one, yet the previous schema required it.Type changes
All changes loosen response types. Code that reads these fields as non-null needs a null check after upgrading:
emailin settings:string->string | null | undefinedfavorited_by/recommended_by:T[] | null->T[] | null | undefinedfirst_aired:string | undefined->string | null | undefinedreset_at:null->string | null | undefinednot_foundentries:ratingandrated_atare gone,idsis optionalNo version bump in this PR.
Test plan
cd projects/api && bun run checkcd projects/api && bun run testbun run lintandbun run format:checkbun run openapi:validate