Repository navigation
docs: fix stale endpoint references left over from the /agent split - #96
Conversation
Final cleanup sweep after PRs #93/#94/#95. - README.md endpoint reference table still listed the pre-split paths (/tickets/{id}/assign, /tickets/{id}/close) and was missing /resolve and the accept/my-assignments rows entirely. Rebuilt the table into three sections (Public, Tickets, Agent) matching the current routes, and corrected the auth column for POST/GET /tickets — auth there has always been optional (see oauth2_scheme_optional in tickets.py), the table just never reflected that. - app/api/admin.py docstring referenced the old agent self-assign path in a comment; updated to /agent/tickets/{id}/assign. Nothing behavioral changed. Full suite: 667 passed, 0 failed.
📝 WalkthroughWalkthroughThe API documentation adds ChangesAPI documentation
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 `@README.md`:
- Line 561: Update the GET /tickets README description to accurately document
visibility for anonymous callers, regular authenticated users, Agents, and
Admins, reflecting the behavior implemented in the tickets endpoint.
🪄 Autofix
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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 7474936f-ae49-4d00-af3b-98c6d2e11d5e
📒 Files selected for processing (2)
README.mdapp/api/admin.py
| | `POST` | `/tickets` | Create new support ticket | ✅ | | ||
| | `GET` | `/tickets` | List user tickets | ✅ | | ||
| | `POST` | `/tickets` | Create new support ticket | Optional | | ||
| | `GET` | `/tickets` | List tickets (own tickets if authenticated) | Optional | |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
Document the Agent/Admin listing behavior.
Line 561 says authenticated callers receive only their own tickets. In app/api/tickets.py:133-208, Agent and Admin callers receive all tickets. Update the description to cover anonymous, regular-user, Agent, and Admin behavior.
Proposed wording
-| `GET` | `/tickets` | List tickets (own tickets if authenticated) | Optional |
+| `GET` | `/tickets` | List visible tickets: empty for anonymous callers, own tickets for regular users, all tickets for Agents/Admins | Optional |📝 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.
| | `GET` | `/tickets` | List tickets (own tickets if authenticated) | Optional | | |
| | `GET` | `/tickets` | List visible tickets: empty for anonymous callers, own tickets for regular users, all tickets for Agents/Admins | Optional | |
🤖 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 `@README.md` at line 561, Update the GET /tickets README description to
accurately document visibility for anonymous callers, regular authenticated
users, Agents, and Admins, reflecting the behavior implemented in the tickets
endpoint.
What
Final cleanup pass after #93 / #94 / #95 - fixes leftover references to the pre-split ticket-action paths.
How
README.md's endpoint reference table still listed/tickets/{id}/assignand/tickets/{id}/close(pre-refactor: split agent-only ticket actions into their own router #94 paths), and never listed/resolve,/agent/tickets/{id}/accept, or/agent/my-assignmentsat all. Rebuilt it into three sections - Public, Ticket, Agent - matching the actual current routes.POST/GET /ticketssaid "Required" (checkmark) - that's been wrong since ticket creation/listing got optional auth (oauth2_scheme_optionalintickets.py). Fixed to "Optional".app/api/admin.pyhad a docstring comparing itself to "the agent self-assign endpoint (POST /tickets/{id}/assign)" - updated to the current/agent/tickets/{id}/assign.Testing
Full suite: 667 passed, 0 failed. No behavior changes - docs and a docstring only.
Notes for reviewer
Not urgent, but the README table being wrong undercuts the whole point of #93/#94 (making things easy to find/integrate), so didn't want to leave it stale.
Summary by CodeRabbit
POST /resolveendpoint, which answers and classifies messages without creating tickets.