Skip to content

docs: add user memory API responses - #555

Open
nightcityblade wants to merge 3 commits into
labsai:mainfrom
nightcityblade:fix/issue-548
Open

nightcityblade wants to merge 3 commits into
labsai:mainfrom
nightcityblade:fix/issue-548

Conversation

@nightcityblade

@nightcityblade nightcityblade commented Jun 19, 2026 •

Copy link
Copy Markdown

Summary

Adds missing OpenAPI @APIResponse annotations to the user memory REST interface so generated API docs include expected status codes.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • ♻️ Refactoring (no functional changes)
  • 🔧 Chore (dependency updates, CI changes, etc.)

Related Issue

Closes #548

Changes Made

  • Imported APIResponse in IRestUserMemoryStore.
  • Added success response annotations for all user memory endpoints.
  • Added documented 400/404 responses where the implementation returns those statuses.

How to Test

  1. Review IRestUserMemoryStore OpenAPI annotations.
  2. Generate or inspect Swagger/OpenAPI output for the user memory endpoints.
  3. Run ./mvnw compile.

Checklist

  • My code follows the project's code style
  • I have added tests that prove my fix/feature works
  • Existing tests pass locally (./mvnw clean verify -DskipITs)
  • I have updated documentation if needed
  • My commit messages follow conventional commits
  • I have not committed any secrets, API keys, or tokens
  • This PR has a clear, focused scope (one concern per PR)

Note: I attempted ./mvnw compile, but the first run was still resolving a large dependency tree after several minutes, so I stopped it before completion.

Summary by CodeRabbit

  • Documentation
    • Added comprehensive OpenAPI response metadata annotations across memory management REST endpoints, clarifying expected HTTP status codes (e.g., 200, 204, 400, 404) and improving overall API specification clarity.

@coderabbitai

coderabbitai Bot commented Jun 19, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

Next included review available in 3 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 9517232a-9343-418f-9ac2-cdfaea55ec38

📥 Commits

Reviewing files that changed from the base of the PR and between c0d5c37 and 7aae07b.

📒 Files selected for processing (1)
  • src/main/java/ai/labs/eddi/configs/properties/IRestUserMemoryStore.java
📝 Walkthrough

Walkthrough

IRestUserMemoryStore gains an APIResponse import and @APIResponse annotations on all nine REST endpoint declarations, documenting expected HTTP response codes (200, 204, 400, 404) for getAllMemories, getVisibleMemories, searchMemories, getMemoriesByCategory, getMemoryByKey, upsertMemory, deleteMemory, deleteAllForUser, and countMemories. No method signatures or request mappings are changed.

Changes

OpenAPI Response Documentation for IRestUserMemoryStore

Layer / File(s) Summary
@APIResponse annotations across all endpoints
src/main/java/ai/labs/eddi/configs/properties/IRestUserMemoryStore.java
Adds APIResponse import and annotates all nine endpoint declarations with appropriate response codes and descriptions (200 for GETs and upsert, 204 for deletes, 400 for bad upsert input, 404 for missing resource lookups).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related issues

  • #548 – This PR directly fulfills the acceptance criteria: all 9 methods in IRestUserMemoryStore now have @APIResponse annotations covering GET (200, 404), POST/PUT (200, 400), and DELETE (204, 404) status codes.
  • #550 – The same pattern of adding @APIResponse annotations to config REST interfaces is applied here, consistent with the broader OpenAPI coverage initiative described in that issue.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs: add user memory API responses' clearly and concisely describes the main change—adding OpenAPI response documentation to the user memory interface.
Linked Issues check ✅ Passed All nine methods in IRestUserMemoryStore received appropriate @APIResponse annotations following the established pattern, addressing the core requirement of issue #548.
Out of Scope Changes check ✅ Passed The pull request contains only changes to IRestUserMemoryStore.java for adding @APIResponse annotations, which is directly scoped to the linked issue requirements.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 `@src/main/java/ai/labs/eddi/configs/properties/IRestUserMemoryStore.java`:
- Line 54: Add `@APIResponse` annotations to the searchMemories and
getMemoriesByCategory method declarations in the IRestUserMemoryStore interface
to document the additional HTTP response codes that the implementations produce.
Specifically, add `@APIResponse` annotations for HTTP 403 (Forbidden) which
corresponds to when ownershipValidator.validateUserAccess() throws
ForbiddenException, and HTTP 500 (Internal Server Error) which corresponds to
when IResourceStore.ResourceStoreException is caught and wrapped in
InternalServerErrorException. These annotations should be placed above the
method signatures to match the actual implementation behavior.
🪄 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: c257970d-f5d4-4b21-ae21-7c4c8fe72712

📥 Commits

Reviewing files that changed from the base of the PR and between bd1b859 and c55031f.

📒 Files selected for processing (1)
  • src/main/java/ai/labs/eddi/configs/properties/IRestUserMemoryStore.java

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.

docs: add @APIResponse annotations to IRestUserMemoryStore

2 participants