Feat | Add OpenAPI documentation for OAuth2RocketChatSSOApiController v1#112
Feat | Add OpenAPI documentation for OAuth2RocketChatSSOApiController v1#112matiasperrone-exo wants to merge 3 commits intomainfrom
Conversation
1292905 to
5ce71f5
Compare
caseylocker
left a comment
There was a problem hiding this comment.
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.
app/Http/Controllers/Api/OAuth2/OAuth2RocketChatSSOApiController.php
Outdated
Show resolved
Hide resolved
caseylocker
left a comment
There was a problem hiding this comment.
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.
2327f13 to
210a47c
Compare
|
Thanks @caseylocker for the comments. Now is ready to review again. |
Task:
Ref: https://app.clickup.com/t/86b8e6k1y