Skip to content

Feat | Add OpenAPI documentation for OAuth2RocketChatSSOApiController v1#112

Open
matiasperrone-exo wants to merge 3 commits intomainfrom
feat/openapi----api-v1---oauth2rocketchatssoapicontroller
Open

Feat | Add OpenAPI documentation for OAuth2RocketChatSSOApiController v1#112
matiasperrone-exo wants to merge 3 commits intomainfrom
feat/openapi----api-v1---oauth2rocketchatssoapicontroller

Conversation

@matiasperrone-exo
Copy link
Contributor

@matiasperrone-exo matiasperrone-exo added the documentation Improvements or additions to documentation label Feb 12, 2026
@matiasperrone-exo matiasperrone-exo self-assigned this Feb 12, 2026
@matiasperrone-exo matiasperrone-exo added the documentation Improvements or additions to documentation label Feb 12, 2026
@matiasperrone-exo matiasperrone-exo marked this pull request as ready for review February 12, 2026 21:13
@matiasperrone-exo matiasperrone-exo force-pushed the feat/openapi----api-v1---oauth2rocketchatssoapicontroller branch from 1292905 to 5ce71f5 Compare February 17, 2026 21:32
Copy link

@martinquiroga-exo martinquiroga-exo left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@caseylocker caseylocker left a comment

Choose a reason for hiding this comment

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

The RocketChatUserProfileSchema is created but never referenced from the endpoint's HTTP_OK response — the response uses a bare new OA\JsonContent() instead. An orphaned empty schema adds noise to the generated spec without providing value to API consumers.

Either wire it up by adding ref: '#/components/schemas/RocketChatUserProfile' to the JsonContent and marking the schema with additionalProperties: true (since the response proxies Rocket Chat's dynamic payload), or delete RocketChatUserProfileSchema.php entirely and keep the descriptive comment on the empty JsonContent.

Copy link
Contributor

@caseylocker caseylocker left a comment

Choose a reason for hiding this comment

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

See "red:" -> "ref:" comment.

For the empty rocket chat schema property just add a flag for additionalproperties so that it isn't empty. We don't control it but we don't want to just kick the can.

#[OA\Schema(
      schema: 'RocketChatUserProfile',
      type: 'object',
      additionalProperties: true,
      description: 'Rocket Chat SSO user profile. The response structure is the "data" portion of the Rocket Chat /api/v1/login endpoint response and is defined by the external Rocket Chat server.'
  )]

User's need to know that at least there are properties and they should refer to the docs for them.

@matiasperrone-exo matiasperrone-exo force-pushed the feat/openapi----api-v1---oauth2rocketchatssoapicontroller branch from 2327f13 to 210a47c Compare February 24, 2026 19:39
@matiasperrone-exo
Copy link
Contributor Author

matiasperrone-exo commented Feb 24, 2026

Thanks @caseylocker for the comments. Now is ready to review again.
The typo "red" instead of "ref" and the suggested description were incorporated.

Copy link
Contributor

@caseylocker caseylocker left a comment

Choose a reason for hiding this comment

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

LGTM

@matiasperrone-exo matiasperrone-exo force-pushed the feat/openapi----api-v1---oauth2rocketchatssoapicontroller branch from 210a47c to 23ee8d2 Compare March 17, 2026 19:32
@coderabbitai
Copy link

coderabbitai bot commented Mar 17, 2026

Warning

Rate limit exceeded

@matiasperrone-exo has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 9 minutes and 17 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6f9b43cb-ec80-48b8-9418-c7fcabab15c0

📥 Commits

Reviewing files that changed from the base of the PR and between 6d23f7f and 23ee8d2.

📒 Files selected for processing (3)
  • app/Http/Controllers/Api/OAuth2/OAuth2RocketChatSSOApiController.php
  • app/Swagger/Models/RocketChatUserProfileSchema.php
  • app/Swagger/Security/OAuth2RocketChatSSOApiControllerSecuritySchema.php
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/openapi----api-v1---oauth2rocketchatssoapicontroller
📝 Coding Plan
  • Generate coding plan for human review comments

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

@matiasperrone-exo
Copy link
Contributor Author

Rebased

@github-actions
Copy link

📘 OpenAPI / Swagger preview

➡️ https://OpenStackweb.github.io/openstackid/openapi/pr-112/

This page is automatically updated on each push to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants