Skip to content

fix(storage): include destination ID and key in move responses - #1748

Open
hsusul wants to merge 2 commits into
supabase:masterfrom
hsusul:fix/rest-move-response-fields
Open

hsusul wants to merge 2 commits into
supabase:masterfrom
hsusul:fix/rest-move-response-fields

Conversation

@hsusul

@hsusul hsusul commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Why

Clients need the destination ID and key from a successful POST /object/move. The response schema filters both fields out. A same-path move also returns a row that omits name.

Fixes #1747.

What changed

Declare Id and Key in the route's 200 response schema. Use the validated destination key for Key, including when the source and destination paths match. Keep the existing message and version fields.

Verification

  • The new Fastify route test and three updated PostgreSQL-backed tests failed on the original route because the response omitted Id and Key.
  • All 13 move integration tests passed on PostgreSQL 18 after the fix, including same-path moves and a move by source version.
  • All 4,224 unit tests passed. npm run lint, npm run build, and git diff --check passed.

@hsusul
hsusul requested a review from a team as a code owner November 23, 2026 21:15
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 45267893485

Coverage remained the same at 88.458%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 18774
Covered Lines: 17115
Line Coverage: 91.16%
Relevant Branches: 11767
Covered Branches: 9901
Branch Coverage: 84.14%
Branches in Coverage %: Yes
Coverage Strength: 1284.0 hits per line

💛 - Coveralls

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

REST move response drops destination Id and Key

2 participants