-
Notifications
You must be signed in to change notification settings - Fork 2
Feature | Extend Swagger Coverage for controller OAuth2SummitPresentationActionApiController
#391
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
Conversation
93df54d to
aac6838
Compare
4af6cc1 to
aa008ca
Compare
d8c91c9 to
51bc32c
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.
'oauth2_security_scope' nonexistant issue again. Please resubmit when fixed/added.
|
@caseylocker The security schema for the controller was created and placed into its own file |
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.
Namespace issue.
namespace App\Swagger\schemas; // ← Correct (not App\Swagger\Security)
Missing operationId on Both Endpoints
operationId: 'completePresentationAction', // ← Add this
operationId: 'incompletePresentationAction', // ← Add this
Invalid anyOf Usage for Expandable Properties in SummitPresentationSchemas.php
anyOf means 'value must match exactly ONE of these schemas' (for polymorphism). Expandable properties are not polymorphic - they're conditionally included based on query parameters. The following example with also fix the invalid type references.
// Example of fix
properties: [
new OA\Property(property: 'id', type: 'integer', example: 1),
new OA\Property(property: 'is_completed', type: 'boolean', example: true),
new OA\Property(property: 'created', type: 'integer', example: 1633024800, description: 'Unix timestamp when created'),
new OA\Property(property: 'last_edited', type: 'integer', example: 1633111200, description: 'Unix timestamp when last updated'),
new OA\Property(
property: 'presentation_id',
type: 'integer',
example: 10,
description: 'Presentation ID. Use ?expand=presentation to get full object'
),
new OA\Property(
property: 'type_id',
type: 'integer',
example: 5,
description: 'Action type ID. Use ?expand=type to get full object'
),
new OA\Property(
property: 'created_by_id',
type: 'integer',
nullable: true,
example: 42,
description: 'Created by user ID. Use ?expand=created_by to get full object'
),
new OA\Property(
property: 'updated_by_id',
type: 'integer',
nullable: true,
example: 42,
description: 'Updated by user ID. Use ?expand=updated_by to get full object'
),
],
|
@caseylocker please review this PR again. The related "expand" and "relations" where introduced as mentioned. The missing, and not included Models are: |
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.
@matiasperrone-exo Looks good, approved. @smarcet if you agree please merge.
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/86b6wkh3m