Skip to content

docs: add DELETE /api/chats reference#88

Open
arpitgupta1214 wants to merge 2 commits intomainfrom
codex/arpit-docs-delete-chats-endpoint
Open

docs: add DELETE /api/chats reference#88
arpitgupta1214 wants to merge 2 commits intomainfrom
codex/arpit-docs-delete-chats-endpoint

Conversation

@arpitgupta1214
Copy link
Copy Markdown
Collaborator

@arpitgupta1214 arpitgupta1214 commented Mar 30, 2026

Summary

  • document DELETE /api/chats in OpenAPI
  • add Chat Delete endpoint page in docs navigation
  • add api-reference/chat/delete.mdx
  • align delete chat schema to use id in request/response

Summary by CodeRabbit

  • New Features

    • Added a new endpoint to delete chats via the API, with full request validation and comprehensive error handling.
  • Documentation

    • Added API reference documentation for the delete chat endpoint, including request parameters, response formats, and error scenarios.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 30, 2026

📝 Walkthrough

Walkthrough

A new DELETE /api/chats API endpoint is documented by introducing an MDX documentation page, adding OpenAPI specification with request and response schemas, and integrating the new page into the documentation navigation structure.

Changes

Cohort / File(s) Summary
API Endpoint Documentation
api-reference/chat/delete.mdx
New MDX documentation page defining the "Delete Chat" endpoint with OpenAPI route mapping (delete /api/chats).
OpenAPI Specification
api-reference/openapi.json
New DELETE /api/chats operation with request body schema (DeleteChatRequest), success response (DeleteChatResponse), and error response schemas (DeleteChatErrorResponse) for HTTP status codes 400, 404, and 500.
Documentation Navigation
docs.json
Navigation configuration updated to include the new api-reference/chat/delete page in the Chat section alongside existing chat endpoints.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A delete endpoint hops into view,
With schemas and specs, all shiny and new,
Docs updated with care, the navigation aligned,
Our API now cleaner, one chat at a time!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs: add DELETE /api/chats reference' clearly and specifically describes the main change: adding documentation for the DELETE /api/chats endpoint to the API reference.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/arpit-docs-delete-chats-endpoint

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
api-reference/openapi.json (1)

1248-1248: Prefer behavior-focused endpoint docs over internal cascade details.

The delete description exposes internal record cleanup details that are likely to change; documenting only contract-level behavior will reduce docs drift.

✏️ Suggested wording
-        "description": "Delete a chat room by ID. This operation also removes related room records (memory emails, memories, room-report links, and segment-room links) before deleting the room itself.",
+        "description": "Delete a chat room by ID. Related chat-linked resources are cleaned up as part of the operation.",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@api-reference/openapi.json` at line 1248, Update the "description" field for
the Delete chat room endpoint in api-reference/openapi.json to remove internal
cascade/cleanup details and instead state only the observable contract-level
behavior (e.g., that the room and its associated data will be removed). Replace
the current long internal-detail string with a concise, behavior-focused
sentence in the description field so docs don't expose implementation details.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@api-reference/chat/delete.mdx`:
- Line 3: The OpenAPI frontmatter on the page uses an incorrect format: change
the frontmatter key/value on the "openapi" line so it follows the required
literal format openapi: 'METHOD /path' (e.g., include the HTTP method and path
in single quotes) — update the existing openapi line to use the exact quoted
format to satisfy the parser.

---

Nitpick comments:
In `@api-reference/openapi.json`:
- Line 1248: Update the "description" field for the Delete chat room endpoint in
api-reference/openapi.json to remove internal cascade/cleanup details and
instead state only the observable contract-level behavior (e.g., that the room
and its associated data will be removed). Replace the current long
internal-detail string with a concise, behavior-focused sentence in the
description field so docs don't expose implementation details.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1822eda9-97df-4af0-931d-f234ee493996

📥 Commits

Reviewing files that changed from the base of the PR and between c8e2aa5 and ee47a45.

📒 Files selected for processing (3)
  • api-reference/chat/delete.mdx
  • api-reference/openapi.json
  • docs.json

@@ -0,0 +1,4 @@
---
title: 'Delete Chat'
openapi: delete /api/chats
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Use the required OpenAPI frontmatter format on Line 3.

Please align the field to the documented format (openapi: 'METHOD /path') to avoid parser/config inconsistencies.

Suggested fix
-openapi: delete /api/chats
+openapi: 'DELETE /api/chats'

As per coding guidelines, API reference MDX pages should include OpenAPI spec reference in format: openapi: 'METHOD /path'.

📝 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.

Suggested change
openapi: delete /api/chats
openapi: 'DELETE /api/chats'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@api-reference/chat/delete.mdx` at line 3, The OpenAPI frontmatter on the page
uses an incorrect format: change the frontmatter key/value on the "openapi" line
so it follows the required literal format openapi: 'METHOD /path' (e.g., include
the HTTP method and path in single quotes) — update the existing openapi line to
use the exact quoted format to satisfy the parser.

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