Repository navigation
Fix: add compatibility route for document download under /v1 - #14663
Conversation
📝 WalkthroughWalkthroughThis PR adds backward-compatibility support for a deprecated document download endpoint ( ChangesBackward-Compatible Document Download Endpoint
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly Related PRs
Suggested Labels
Suggested Reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/references/http_api_reference.md`:
- Line 6885: The documented deprecated endpoint path uses the placeholder
`{doc_id}` but the compatibility route in code is
`/v1/document/download/{attachment_id}`; update the API reference entry for the
GET download endpoint to use `{attachment_id}` everywhere it appears (the
endpoint path and any inline examples/description) so the placeholder matches
the implemented route and avoids migration confusion.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 308e5eb7-3096-4ea4-9ff1-3008a112e8f6
📒 Files selected for processing (2)
api/apps/backward_compat.pydocs/references/http_api_reference.md
|
|
||
| :::caution DEPRECATED | ||
| The previous endpoint `GET /api/v1/document/download/{doc_id}` is deprecated. Please use this endpoint instead. | ||
| The previous endpoint `GET /v1/document/download/{doc_id}` is deprecated. Please use this endpoint instead. |
There was a problem hiding this comment.
Use the same path parameter name as the compatibility route.
Line 6885 still says {doc_id}, but the compatibility endpoint added in code is /v1/document/download/{attachment_id}. Please align the placeholder to avoid migration confusion.
✏️ Suggested doc fix
-The previous endpoint `GET /v1/document/download/{doc_id}` is deprecated. Please use this endpoint instead.
+The previous endpoint `GET /v1/document/download/{attachment_id}` is deprecated. Please use this endpoint instead.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| The previous endpoint `GET /v1/document/download/{doc_id}` is deprecated. Please use this endpoint instead. | |
| The previous endpoint `GET /v1/document/download/{attachment_id}` is deprecated. Please use this endpoint instead. |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/references/http_api_reference.md` at line 6885, The documented
deprecated endpoint path uses the placeholder `{doc_id}` but the compatibility
route in code is `/v1/document/download/{attachment_id}`; update the API
reference entry for the GET download endpoint to use `{attachment_id}`
everywhere it appears (the endpoint path and any inline examples/description) so
the placeholder matches the implemented route and avoids migration confusion.
|
LGTM |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #14663 +/- ##
=======================================
Coverage 94.16% 94.16%
=======================================
Files 10 10
Lines 703 703
Branches 112 112
=======================================
Hits 662 662
Misses 25 25
Partials 16 16 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…low#14663) ### What problem does this PR solve? add compatibility route for document download under /v1 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
…low#14663) ### What problem does this PR solve? add compatibility route for document download under /v1 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
What problem does this PR solve?
add compatibility route for document download under /v1
Type of change