Skip to content

fixes #269: Improve completeness, accuracy and consistency of the OpenAPI documentation - #270

Merged
Fishbowler merged 1 commit into
igniterealtime:mainfrom
guusdk:269_openapi-documentation
Sep 25, 2026
Merged

Fishbowler merged 1 commit into
igniterealtime:mainfrom
guusdk:269_openapi-documentation

Conversation

@guusdk

@guusdk guusdk commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Adds the missing @Produces and response schema to the room affiliations endpoint; declares the ErrorResponse body on error responses that lacked it; documents 401 and 500 on every authenticated endpoint (without a body for 401, as authentication failures do not return one). Adds the missing error cases for creating and updating users and for retrieving a user's groups. Fixes copy-paste errors and typos in descriptions, and makes summaries, punctuation and tag descriptions consistent across services.

Summary by CodeRabbit

  • Documentation
    • Updated the REST API reference with clearer endpoint and parameter descriptions.
    • Documented authentication, validation, not-found, authorization, and server-error responses across API endpoints, including their error response formats.
    • No endpoint behavior changed.

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Warning

Review limit reached

Next included review available in 49 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review 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: 23fab437-2441-476c-b85b-a17b0351c8dc

📥 Commits

Reviewing files that changed from the base of the PR and between d9ffce7 and 952a12d.

📒 Files selected for processing (17)
  • changelog.html
  • src/java/org/jivesoftware/openfire/plugin/rest/service/ClusteringService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/GroupService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/MUCRoomAffiliationsService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/MUCRoomService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/MUCServiceService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/MessageService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/MsgArchiveService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/SecurityAuditLogService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/SessionService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/StatisticsService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/SystemService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/UserGroupService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/UserLockoutService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/UserRosterService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/UserService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/UserVCardService.java

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 1631e7ee-310d-45cf-b8fb-6a14d46bf567

📥 Commits

Reviewing files that changed from the base of the PR and between 35a943d and d9ffce7.

📒 Files selected for processing (17)
  • changelog.html
  • src/java/org/jivesoftware/openfire/plugin/rest/service/ClusteringService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/GroupService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/MUCRoomAffiliationsService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/MUCRoomService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/MUCServiceService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/MessageService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/MsgArchiveService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/SecurityAuditLogService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/SessionService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/StatisticsService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/SystemService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/UserGroupService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/UserLockoutService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/UserRosterService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/UserService.java
  • src/java/org/jivesoftware/openfire/plugin/rest/service/UserVCardService.java

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The pull request updates OpenAPI response annotations and descriptions across REST services. It documents authentication and server-error responses, associates selected error responses with ErrorResponse, and revises endpoint and parameter descriptions. Endpoint implementations and signatures are unchanged.

Changes

REST API OpenAPI documentation

Layer / File(s) Summary
Clustering, groups, and system endpoints
changelog.html, src/java/org/jivesoftware/openfire/plugin/rest/service/ClusteringService.java, GroupService.java, SystemService.java
Adds or updates documented error responses and schemas for clustering, group, and system-property endpoints. Revises descriptions and records issue #269 in the changelog.
Multi-user chat endpoints
src/java/org/jivesoftware/openfire/plugin/rest/service/MUCRoomAffiliationsService.java, MUCRoomService.java, MUCServiceService.java
Revises response annotations, parameter descriptions, summaries, and other OpenAPI text for MUC operations. Some 401 response annotations no longer declare an ErrorResponse body.
User, roster, and vCard endpoints
src/java/org/jivesoftware/openfire/plugin/rest/service/UserGroupService.java, UserLockoutService.java, UserRosterService.java, UserService.java, UserVCardService.java
Adds or updates documented error responses and schemas for user, group-membership, lockout, roster, and vCard operations. Revises endpoint and parameter descriptions.
Messaging, audit, session, and statistics endpoints
src/java/org/jivesoftware/openfire/plugin/rest/service/MessageService.java, MsgArchiveService.java, SecurityAuditLogService.java, SessionService.java, StatisticsService.java
Documents authentication and server-error responses for message, archive, audit-log, session, and statistics endpoints. Selected responses reference ErrorResponse.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Other

Suggested reviewers: fishbowler

Merge Risk: ⚪ Minimal · up to d9ffc

The documentation updates introduce no established runtime or API risk requiring action before merge.

Security Architecture Review

Security architecture risk: 🔵 Low · up to d9ffc

The response documentation changes how API clients see success and error responses. One room-affiliations endpoint also newly declares its supported response formats. No security bypass or expanded endpoint access was identified, but the effect on content negotiation has not been verified in a deployed runtime.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The newly declared response formats could affect content negotiation for the room-affiliations GET endpoint; no change to its attacker-controlled path parameters or reachability was identified in the scoped comparison.

Trust Boundaries and Controls

  • inferred — The changed 401 annotations do not themselves change authentication controls. The component that emits authentication failures was not verified, so the documented absence of a 401 body remains unconfirmed here.
🚥 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 62 functions across 16 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: improving the completeness, accuracy, and consistency of the OpenAPI documentation.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 62 functions across 16 files. (1 skipped: 1 unsupported.)

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

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.

@Fishbowler Fishbowler left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good. But crikey, so many of those lines are just adding a period. A couple of nits below.

…ncy of the OpenAPI documentation

Adds the missing @produces and response schema to the room affiliations endpoint;
declares the ErrorResponse body on error responses that lacked it;
documents 401 and 500 on every authenticated endpoint (without the ErrorResponse body for 401: the body of an authentication failure is generated by the web server, not by the plugin).
Adds the missing error cases for creating and updating users and for retrieving a user's groups.
Fixes copy-paste errors and typos in descriptions, and makes summaries, punctuation and tag descriptions consistent across services.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@guusdk
guusdk force-pushed the 269_openapi-documentation branch from d9ffce7 to 952a12d Compare September 25, 2026 19:32
@Fishbowler
Fishbowler merged commit 28f0721 into igniterealtime:main Sep 25, 2026
6 checks passed
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.

2 participants