Skip to content

Conversation

@matiasperrone-exo
Copy link
Contributor

@matiasperrone-exo matiasperrone-exo added the documentation Improvements or additions to documentation label Oct 20, 2025
@matiasperrone-exo matiasperrone-exo self-assigned this Oct 20, 2025
@matiasperrone-exo matiasperrone-exo added the review Need reviewing from the developer label Nov 10, 2025
@matiasperrone-exo matiasperrone-exo removed the review Need reviewing from the developer label Nov 24, 2025
@matiasperrone-exo matiasperrone-exo force-pushed the feature/openapi-documentation--oauth2summitproposedscheduleapicontroller branch from 5843018 to 17a1d9f Compare November 26, 2025 22:41
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

As per our decision to limit sub schemas to keep this as simple as possible, and since the use of anyOf is incorrect here...
Remove the anyOf blocks and keep only the _id properties with descriptions noting expansion behavior.

@matiasperrone-exo matiasperrone-exo force-pushed the feature/openapi-documentation--oauth2summitproposedscheduleapicontroller branch from 17a1d9f to 99634aa Compare December 3, 2025 20:59
@matiasperrone-exo
Copy link
Contributor Author

Thanks @caseylocker for the comments. Now is ready to review again

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.

Invalid OpenAPI types in SummitProposedScheduleSchemas.php
The idea here was not to keep the invalid types, like 'type: "SummitAbstractLocation"' or change them to refs but simplify it to describe the expansion.
Like this:

#[OA\Schema(
    schema: "SummitProposedScheduleAllowedLocation",
    properties: [
        new OA\Property(property: "id", type: "integer", example: 1),
        new OA\Property(property: "created", type: "integer", description: "Unix timestamp", example: 1640995200),
        new OA\Property(property: "last_edited", type: "integer", description: "Unix timestamp", example: 1640995200),
        new OA\Property(property: "allowed_timeframes", type: "array", items: new OA\Items(type: "integer"), description: "Array of SummitProposedScheduleAllowedDay IDs. Full objects when ?expand=allowed_timeframes"),
        new OA\Property(property: "location_id", type: "integer", example: 10, description: "SummitAbstractLocation ID. Full object in 'location' property when ?expand=location"),
        new OA\Property(property: "track_id", type: "integer", example: 5, description: "PresentationCategory ID. Full object in 'track' property when ?expand=track"),
    ]
)]
class SummitProposedScheduleAllowedLocation {}

@matiasperrone-exo matiasperrone-exo force-pushed the feature/openapi-documentation--oauth2summitproposedscheduleapicontroller branch from ca6492b to c752645 Compare December 5, 2025 15:28
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.

The getProposedScheduleEvents endpoint only requires OAuth2 authentication (via the api middleware from RouteServiceProvider), not admin group membership.

Remove the x: ['required-groups' => [...]] block since the route does not have auth.user middleware. The endpoint only requires OAuth2 authentication, not group-based authorization.

@matiasperrone-exo
Copy link
Contributor Author

The getProposedScheduleEvents endpoint only requires OAuth2 authentication (via the api middleware from RouteServiceProvider), not admin group membership.

Remove the x: ['required-groups' => [...]] block since the route does not have auth.user middleware. The endpoint only requires OAuth2 authentication, not group-based authorization.

Hello @caseylocker, thanks for your comments, according with the seeder (which is our main source of information) that is not correct:

image

Do you want that I dig deeper?
Or just remove such groups even when the seeder says otherwise?

@caseylocker
Copy link

The getProposedScheduleEvents endpoint only requires OAuth2 authentication (via the api middleware from RouteServiceProvider), not admin group membership.
Remove the x: ['required-groups' => [...]] block since the route does not have auth.user middleware. The endpoint only requires OAuth2 authentication, not group-based authorization.

Hello @caseylocker, thanks for your comments, according with the seeder (which is our main source of information) that is not correct:

image Do you want that I dig deeper? Or just remove such groups even when the seeder says otherwise?

Looks like you're correct. Good catch @matiasperrone-exo. Please ignore that request.
I would like to see the raw response codes use the constants instead though.
So please update any instance of the following at the 7 instances:
"response: 200" should be "Response::HTTP_OK"
"response: 201" should be "Response::HTTP_CREATED"
"response: 204" should be "Response::HTTP_NO_CONTENT"

@smarcet smarcet force-pushed the main branch 4 times, most recently from c6ecdd0 to 728ae67 Compare December 17, 2025 00:43
@matiasperrone-exo matiasperrone-exo force-pushed the feature/openapi-documentation--oauth2summitproposedscheduleapicontroller branch from 2e8122c to 32ea909 Compare December 17, 2025 15:32
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.

This is approved.

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 9d982ca into main Dec 22, 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.

6 participants