Skip to content

fix(api): align OpenAPI watchlist schema with API behavior - #3635

Open
Jocelyn017 wants to merge 3 commits into
seerr-team:developfrom
Jocelyn017:fix/watchlist-api-schema
Open

Jocelyn017 wants to merge 3 commits into
seerr-team:developfrom
Jocelyn017:fix/watchlist-api-schema

Conversation

@Jocelyn017

@Jocelyn017 Jocelyn017 commented Oct 20, 2026 •

Copy link
Copy Markdown

Description

Update the OpenAPI spec to match the watchlist API and filtered user responses. The watchlist create request now documents the required mediaType (movie or tv), and its response documents the returned mediaType and 201 status. The User schema no longer requires email when filtered responses omit it.

How Has This Been Tested?

  • Parsed the OpenAPI YAML and checked the watchlist request and response contract.
  • Ran git diff --check.
  • Manually tried the local watchlist endpoint with and without mediaType; requests without it returned a validation error.
curl -L "https://seerr.domain.net/api/v1/watchlist" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H "X-Api-Key: xxxxx" \
  -d '{"tmdbId":1422,"mediaType":"movie"}'

Screenshots / Logs (if applicable)

Not applicable.

Checklist:

  • I have read and followed the contribution guidelines.
  • Disclosed any use of AI (see our policy)
  • I have updated the documentation accordingly.
  • All new and existing tests passed.
  • Successful build pnpm build
  • Translation keys pnpm i18n:extract
  • Database migration (if required)

Summary by CodeRabbit

  • API Updates
    • Watchlist creation now requires a TMDB ID and media type (movie or tv).
    • Rating key and title remain optional when creating a watchlist item.
    • Watchlist responses now use mediaType instead of type and include complete read-only details.
    • User responses no longer require an email address.

@Jocelyn017
Jocelyn017 requested a review from a team as a code owner October 20, 2026 08:29
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9a813c82-f4f2-4f47-8e4d-5f3dda8a7bdd
📥 Commits

Reviewing files that changed from the base of the PR and between 0461f9b and 3613206.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • No new commits to review - use @coderabbitai full review for a full pass

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fb5439d0-7fc3-4f01-b5f5-bd109ae31ceb
📥 Commits

Reviewing files that changed from the base of the PR and between d8a5626 and 0461f9b.

📒 Files selected for processing: 1
  • seerr-api.yml

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📝 Walkthrough

The OpenAPI specification updates the watchlist request and response schemas, replaces type with mediaType, and removes email from the required User properties.

Changes: OpenAPI Contract Alignment

Layer / File(s) Summary
Watchlist and user schema contracts
seerr-api.yml
The Watchlist schema uses mediaType, marks response fields read-only, and declares required response fields. The new WatchlistCreate schema requires tmdbId and mediaType. The User schema no longer requires email.
Watchlist creation operation
seerr-api.yml
The POST /watchlist request body now references WatchlistCreate.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Possibly related issues

  • seerr-team/seerr#3298: The updated watchlist contract requires mediaType, matching the reported API behavior.
  • seerr-team/seerr#3634: The User schema no longer requires email, matching filtered nested user responses.

Suggested reviewers: 0xsysr3ll, fallenbagel

Merge Risk: ⚪ Minimal · up to 0461f

The documented watchlist and User response contracts align with the inspected API paths. No issue identified here needs to be fixed before merge.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title accurately identifies the primary watchlist OpenAPI schema changes and their purpose. It does not mention the related User schema change, but the title remains specific and relevant.
Linked Issues check Passed The PR satisfies both active linked issues. For [#3634], User.required no longer contains email, so filtered nested users may omit that field. For [#3298], WatchlistCreate requires tmdbId and …
Out of Scope Changes check Passed The changes are limited to the OpenAPI User schema and the watchlist request and response schemas. Read-only response fields, response requirements, and the separate WatchlistCreate schema support…
Full details: Linked Issues check

Explanation

The PR satisfies both active linked issues. For [#3634], User.required no longer contains email, so filtered nested users may omit that field. For [#3298], WatchlistCreate requires tmdbId and mediaType, restricts mediaType to movie or tv, and the POST /watchlist request references this schema. The Watchlist response schema documents mediaType and the endpoint has a 201 response.

Full details: Out of Scope Changes check

Explanation

The changes are limited to the OpenAPI User schema and the watchlist request and response schemas. Read-only response fields, response requirements, and the separate WatchlistCreate schema support the contract correction in [#3298]. No unrelated change is demonstrated.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the schema lines
mediaType now clearly shines
Watchlist fields stand in their place
Missing emails leave no trace
Create requests hop in tune
Contracts bloom beneath the moon

Comment @coderabbitai help to get the list of available commands.

@fallenbagel fallenbagel changed the title fix(watchlist api schema): align OpenAPI watchlist schema with API behavior fix(api): align OpenAPI watchlist schema with API behavior Oct 20, 2026
@fallenbagel

fallenbagel commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Thanks for the PR.

The checklist has "Disclosed any use of AI" ticked, but the description has no AI disclosure section. Our AI assistance policy asks for a disclosure on every PR, including when no AI was used. Ticking the box doesn't count as a disclosure on its own.

Please edit the description to add a short statement. If you used AI, say which tool and what you used it for (writing the spec changes, drafting the description, testing, etc.). If you didn't use any, say so explicitly.

Also, the title only mentions the watchlist schema, but the PR changes the User schema too. Please update it to cover the overall change, for example fix(api): align OpenAPI spec with watchlist and user API behavior. EDIT: #3425 already handles the watchlist part. Please remove that part from this PR and only keep the User part as otherwise this is duplicate.

Once that's added I'll take a look at the changes.

@github-actions github-actions Bot added the merge conflict Cannot merge due to merge conflicts label Oct 20, 2026
@github-actions

Copy link
Copy Markdown

This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.

@github-actions github-actions Bot removed the merge conflict Cannot merge due to merge conflicts label Oct 21, 2026
Comment thread seerr-api.yml
application/json:
schema:
$ref: '#/components/schemas/WatchlistRequest'
$ref: '#/components/schemas/WatchlistCreate'

@fallenbagel fallenbagel Oct 23, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is undoing what #3425 did and duplicating what #3425 did under a different name. It already fixed watchlist as mentioned in my previous comment.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

seerr-api no longer always returns email when it's marked as required in the spec Outdated Openapi Yaml file ?

2 participants