Skip to content

Rename puzzle_image to image on results responses - #185

Open
puzzlerushse wants to merge 1 commit into
MySpeedPuzzling:mainfrom
puzzlerushse:fix/results-puzzle-image-field-name
Open

Rename puzzle_image to image on results responses#185
puzzlerushse wants to merge 1 commit into
MySpeedPuzzling:mainfrom
puzzlerushse:fix/results-puzzle-image-field-name

Conversation

@puzzlerushse

Copy link
Copy Markdown

Summary

MyResultsResponseProvider and PlayerResultsResponseProvider were the only two API responses still calling this field puzzle_imageCompetitionDetailResponseProvider already maps the same underlying $puzzle->puzzleImage to image (live in production today), matching how manufacturer_name and pieces_count are already unprefixed in this same results response despite also being facts about the puzzle, not the result.

puzzle_id and puzzle_name keep their prefix since they'd otherwise be ambiguous against this response's own time_id, but nothing else in the payload could be confused with "image", so this fits the existing no-prefix pattern rather than introducing a new one.

Test plan

  • Confirm GET /api/v1/me/results and GET /api/v1/players/{id}/results now return image instead of puzzle_image

MyResultsResponseProvider and PlayerResultsResponseProvider were the
only two API responses still calling this field puzzle_image -
CompetitionDetailResponseProvider already maps the same underlying
$puzzle->puzzleImage to image (already live in production), matching
how manufacturer_name and pieces_count are already unprefixed in this
same results response despite also being facts about the puzzle, not
the result. puzzle_id and puzzle_name keep their prefix since they'd
otherwise be ambiguous against this response's own time_id, but
nothing else in the payload could be confused with "image", so it
fits the existing no-prefix pattern rather than needing a new one.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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.

1 participant