Skip to content

feat: Add OpenAPI Support to e2e.getUsersOfRoomWithoutKey API#36786

Open
ahmed-n-abdeltwab wants to merge 7 commits intoRocketChat:developfrom
ahmed-n-abdeltwab:feat/openapi-e2e-getUsersOfRoomWithoutKey
Open

feat: Add OpenAPI Support to e2e.getUsersOfRoomWithoutKey API#36786
ahmed-n-abdeltwab wants to merge 7 commits intoRocketChat:developfrom
ahmed-n-abdeltwab:feat/openapi-e2e-getUsersOfRoomWithoutKey

Conversation

@ahmed-n-abdeltwab
Copy link
Contributor

@ahmed-n-abdeltwab ahmed-n-abdeltwab commented Aug 25, 2025

Description:
This PR integrates OpenAPI support into the Rocket.Chat API, migrate of Rocket.Chat API endpoints to the new OpenAPI pattern. The update includes improved API documentation, enhanced type safety, and response validation using AJV.

Key Changes:

  • Implemented the new pattern and added AJV-based JSON schema validation for API.
  • Uses the ExtractRoutesFromAPI utility from the TypeScript definitions to dynamically derive the routes from the endpoint specifications.
  • Enabled Swagger UI integration for this API.
  • Route Methods Chaining for the endpoints.
  • This does not introduce any breaking changes to the endpoint logic.

Issue Reference:
Relates to #34983, part of the ongoing OpenAPI integration effort.

Testing:

  • Verified that the API response schemas are correctly documented in Swagger UI.
  • All tests passed without any breaking changes
$ 
    

Endpoints:

Get Users of Room Without E2E key

Looking forward to your feedback! 🚀

Summary by CodeRabbit

  • New Features

    • Enabled OpenAPI support for e2e endpoints with improved API documentation and developer experience.
  • Refactor

    • Updated e2e endpoints to use modern route definition patterns for better maintainability and clarity.
    • Enhanced validation mechanisms for API requests and responses with improved type safety.
    • Reorganized internal endpoint structure to streamline request handling and optimize delegation patterns.
  • Chores

    • Updated version information in release documentation.

✏️ Tip: You can customize this high-level summary in your review settings.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Aug 25, 2025

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Aug 25, 2025

🦋 Changeset detected

Latest commit: 3664495

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 40 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/rest-typings Patch
@rocket.chat/api-client Patch
@rocket.chat/core-services Patch
@rocket.chat/ddp-client Patch
@rocket.chat/http-router Patch
@rocket.chat/models Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/federation-matrix Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/abac Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/livechat Patch
@rocket.chat/mock-providers Patch
@rocket.chat/cron Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch
@rocket.chat/ui-client Patch
@rocket.chat/media-calls Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/ui-voip Patch
@rocket.chat/core-typings Patch
@rocket.chat/apps Patch
@rocket.chat/model-typings Patch
@rocket.chat/license Patch
@rocket.chat/pdf-worker Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov
Copy link

codecov bot commented Aug 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.84%. Comparing base (9e92b49) to head (3664495).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #36786      +/-   ##
===========================================
- Coverage    70.86%   70.84%   -0.03%     
===========================================
  Files         3160     3160              
  Lines       109775   109775              
  Branches     19709    19709              
===========================================
- Hits         77795    77765      -30     
- Misses       29957    29980      +23     
- Partials      2023     2030       +7     
Flag Coverage Δ
e2e 60.33% <ø> (ø)
e2e-api 47.81% <ø> (-1.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ahmed-n-abdeltwab ahmed-n-abdeltwab marked this pull request as ready for review August 27, 2025 10:14
@ahmed-n-abdeltwab ahmed-n-abdeltwab requested review from a team as code owners August 27, 2025 10:14
@ahmed-n-abdeltwab
Copy link
Contributor Author

👍 @cardoso

Copy link
Member

@cardoso cardoso left a comment

Choose a reason for hiding this comment

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

@ggazzo 👍

@ahmed-n-abdeltwab
Copy link
Contributor Author

Looks fine

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 29, 2026

Walkthrough

Parameter validation definitions for the E2E endpoint are relocated from the shared packages/rest-typings module to application-specific code in apps/meteor. Type definitions, AJV schemas, and validators are now locally defined within the endpoint implementation.

Changes

Cohort / File(s) Summary
Parameter Validation Migration
apps/meteor/app/api/server/v1/e2e.ts
Added local type definitions and AJV schema/validator for e2eGetUsersOfRoomWithoutKeyParamsGET. Removed import dependency on the shared rest-typings parameter validator. Refactored endpoint routes to combine GET and POST operations within the API chain.
Rest-Typings Cleanup
packages/rest-typings/src/v1/e2e.ts, packages/rest-typings/src/index.ts
Removed /v1/e2e.getUsersOfRoomWithoutKey endpoint type definition from E2eEndpoints. Removed export of e2eGetUsersOfRoomWithoutKeyParamsGET module from the public API surface.
Removed Files
packages/rest-typings/src/v1/e2e/e2eGetUsersOfRoomWithoutKeyParamsGET.ts
Deleted the entire parameter definition file, including exported type, AJV validator, and JSON schema.
Documentation
.changeset/nice-squids-smoke.md
Changeset documenting patch version bumps and OpenAPI support migration for e2e endpoints.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • KevLehman
  • sampaiodiego

Poem

🐰 Hop hop, validation moved with care,
From shared package to app layer,
Local schemas, validators true,
Cleaner boundaries, endpoints anew!
E2E keys dancing, refactored with flair,
Code organization springs everywhere! 🌱

🚥 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 'feat: Add OpenAPI Support to e2e.getUsersOfRoomWithoutKey API' directly and clearly summarizes the main objective of the pull request, accurately reflecting the primary changes across all modified files.
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 docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

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