-
Notifications
You must be signed in to change notification settings - Fork 2
Feature | Extend Swagger Coverage for controller OAuth2SummitProposedScheduleApiController
#422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature | Extend Swagger Coverage for controller OAuth2SummitProposedScheduleApiController
#422
Conversation
5843018 to
17a1d9f
Compare
caseylocker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
17a1d9f to
99634aa
Compare
|
Thanks @caseylocker for the comments. Now is ready to review again |
caseylocker
left a comment
There was a problem hiding this 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 {}
ca6492b to
c752645
Compare
caseylocker
left a comment
There was a problem hiding this 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.
Hello @caseylocker, thanks for your comments, according with the seeder (which is our main source of information) that is not correct:
Do you want that I dig deeper? |
Looks like you're correct. Good catch @matiasperrone-exo. Please ignore that request. |
c6ecdd0 to
728ae67
Compare
…eduleApiController`
…schema, fix path routes and change schema to be defined as requested
2e8122c to
32ea909
Compare
caseylocker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is approved.
smarcet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM


Task:
Ref: https://app.clickup.com/t/86b6wkha7