Skip to content

fix(api): document ratings response variants - #890

Open
kevincador wants to merge 1 commit into
masterfrom
fix/ratings-response-variants
Open

fix(api): document ratings response variants#890
kevincador wants to merge 1 commit into
masterfrom
fix/ratings-response-variants

Conversation

@kevincador

Copy link
Copy Markdown
Contributor

Summary

Correct the ratings endpoint contracts and documentation to represent both
response forms:

  • The default response returns rating, votes, and distribution at the top
    level.
  • extended=all returns a nested trakt object plus supported external rating
    providers.

Closes #872

Changes

  • Constrain the ratings extended query parameter to all.
  • Model both existing response shapes using codegen-safe optional fields.
  • Add named default and extendedAll OpenAPI response examples.
  • Document supported providers for movies, shows, seasons, and episodes.
  • Mark extended-only provider blocks, including metascore, as optional.

Risk

Low. The response type is widened to represent both payloads already returned
by the API. Generated clients cannot statically select a response shape from a
query parameter, so the two variants are distinguished through named examples
and endpoint documentation.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation: Get movie ratings

1 participant