Skip to content

Conversation

@matiasperrone-exo
Copy link
Contributor

@matiasperrone-exo matiasperrone-exo self-assigned this Oct 1, 2025
@smarcet smarcet force-pushed the main branch 5 times, most recently from c94fc68 to 9a8387b Compare October 2, 2025 17:58
@matiasperrone-exo matiasperrone-exo added the documentation Improvements or additions to documentation label Oct 7, 2025
@matiasperrone-exo matiasperrone-exo force-pushed the feature/add-openapi-documentation-to-controller---apis---protected---main---oauth2organizationsapicontroller branch from ee73837 to c678bdb Compare October 8, 2025 21:12
@matiasperrone-exo matiasperrone-exo changed the title Feature | Extend Swagger Coverage for controller Apis/Protected/Main/OAuth2OrganizationsApiController.php Feature | Extend Swagger Coverage for controller OAuth2OrganizationsApiController Oct 13, 2025
@matiasperrone-exo matiasperrone-exo force-pushed the feature/add-openapi-documentation-to-controller---apis---protected---main---oauth2organizationsapicontroller branch 2 times, most recently from 4991df1 to 25001af Compare October 14, 2025 17:14
Copy link

@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.

There is at least one breaking error here. Description follows:

Line 56-61: Invalid Response References
Error: References #/components/responses/400, etc. which don't exist in the OpenAPI spec
Fix: Replace with inline descriptions:
new OA\Response(response: 400, description: "Bad Request"),
new OA\Response(response: 401, description: "Unauthorized"),
new OA\Response(response: 403, description: "Forbidden"),
new OA\Response(response: 412, description: "Precondition Failed - Validation Error"),
new OA\Response(response: 422, description: "Unprocessable Entity"),
new OA\Response(response: 500, description: "Server Error"),

Line 45: Inconsistent Tag Naming. This is the same issue that we've seen before. Just make it Title Case.
Current: tags: ['organizations'] (lowercase)
Expected: tags: ['Organizations'] (Title Case - matches line 88 and project convention)

Line 44: I don't find 'oauth2_security_scope' defined anywhere.
security: [['oauth2_security_scope' => ...]]

@matiasperrone-exo matiasperrone-exo force-pushed the feature/add-openapi-documentation-to-controller---apis---protected---main---oauth2organizationsapicontroller branch from 25001af to 1808543 Compare October 31, 2025 14:29
@matiasperrone-exo matiasperrone-exo force-pushed the feature/add-openapi-documentation-to-controller---apis---protected---main---oauth2organizationsapicontroller branch from 9cb7b1a to 8ec4fad Compare November 7, 2025 18:16
@matiasperrone-exo
Copy link
Contributor Author

@caseylocker @smarcet the security scope was updated with the right value.

@matiasperrone-exo matiasperrone-exo added the review Need reviewing from the developer label Nov 10, 2025
@matiasperrone-exo matiasperrone-exo force-pushed the feature/add-openapi-documentation-to-controller---apis---protected---main---oauth2organizationsapicontroller branch from 4b8e02d to fe755b2 Compare November 11, 2025 21:21
Copy link

@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.

@matiasperrone
IGNORE THIS - Name space issue: namespace App\Swagger\Schemas; needs to be namespace App\Swagger\Security;
I didn't take into account pr 385

In OAuth2OrganizationsApiController.php: the POST endpoint is missing operationId (but GET has it). It's also missing a description.

In app/Swagger/schemas.php you missing the type: 'object' declaration in the allOf for PaginatedOrganizationsResponse.

@matiasperrone-exo matiasperrone-exo removed the review Need reviewing from the developer label Nov 18, 2025
@matiasperrone-exo matiasperrone-exo force-pushed the feature/add-openapi-documentation-to-controller---apis---protected---main---oauth2organizationsapicontroller branch from 7d5c9df to 70777d4 Compare November 20, 2025 22:04
Copy link

@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.

@matiasperrone-exo there's a capitalization issue with the namespace in OrganizationsAuthSchema.php
// Current (WRONG)
namespace App\Swagger\Schemas; // Capital 'S'
// Required (CORRECT)
namespace App\Swagger\schemas; // Lowercase 's'

Also needs and operationId.
#[OA\Post(
path: '/api/v1/organizations',
operationId: 'createOrganization', // ← ADD THIS
summary: 'Creates a new organization',
// ...
)]

Once those 2 items are fixed it should be good to go.

@matiasperrone-exo matiasperrone-exo force-pushed the feature/add-openapi-documentation-to-controller---apis---protected---main---oauth2organizationsapicontroller branch from 43ecd3a to 1176042 Compare December 4, 2025 21:09
Copy link

@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.

Good to go.

Copy link
Collaborator

@smarcet smarcet left a comment

Choose a reason for hiding this comment

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

LGTM

@smarcet smarcet merged commit 84831d2 into main Dec 8, 2025
5 checks passed
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.

5 participants