Skip to content

Conversation

@andrestejerina97
Copy link
Contributor

@andrestejerina97 andrestejerina97 self-assigned this Oct 31, 2025
@andrestejerina97 andrestejerina97 force-pushed the feature/add-summit-attendee-note-swagger branch 4 times, most recently from c86fe47 to ec8716a Compare November 14, 2025 16:34
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.

Wrong namespace as per project standards:
App\Swagger\security should be App\Swagger\schemas

As per project standards tag "AttendeeNotes" should be "Attendee Notes" - Title Case.

The anyOf is incorrectly used for expandable properties.

//  Current (invalid)
anyOf: [
    new OA\Property(property: 'author_id', type: 'integer', ...),
    new OA\Property(property: 'author', type: 'AdminMember', ...),
    ...
]
// Fix - Document in properties
properties: [
    new OA\Property(property: 'id', type: 'integer'),
    new OA\Property(property: 'created', type: 'integer', description: 'Unix timestamp'),
    new OA\Property(property: 'last_edited', type: 'integer', description: 'Unix timestamp'),
    new OA\Property(property: 'content', type: 'string', description: 'Note content'),
    new OA\Property(property: 'author_id', type: 'integer', description: 'Author member ID. Replaced by author object when using ?expand=author'),
    new OA\Property(property: 'owner_id', type: 'integer', description: 'Owner attendee ID. Replaced by owner object when using ?expand=owner'),
    new OA\Property(property: 'ticket_id', type: 'integer', nullable: true, description: 'Ticket ID. Replaced by ticket object when using ?expand=ticket'),
]

@matiasperrone-exo
Copy link
Contributor

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

@matiasperrone-exo matiasperrone-exo force-pushed the feature/add-summit-attendee-note-swagger branch from ec8716a to 4a1b1a0 Compare December 5, 2025 21:16
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.

Let's make it easy. Here's the new block of code for app/Swagger/SummitAttendeeNoteSchemas.php.

#[OA\Schema(
    schema: 'SummitAttendeeNote',
    type: 'object',
    description: 'Note attached to an attendee (admin view with email)',
    required: ['id', 'created', 'last_edited', 'content'],
    properties: [
        new OA\Property(property: 'id', type: 'integer'),
        new OA\Property(property: 'created', type: 'integer', description: 'Unix timestamp'),
        new OA\Property(property: 'last_edited', type: 'integer', description: 'Unix timestamp'),
        new OA\Property(property: 'content', type: 'string', description: 'Note content'),
        new OA\Property(property: 'author_id', type: 'integer', example: 123, description: 'Author member ID. Replaced by author object when using ?expand=author'),
        new OA\Property(property: 'owner_id', type: 'integer', example: 456, description: 'Owner attendee ID. Replaced by owner object when using ?expand=owner'),
        new OA\Property(property: 'ticket_id', type: 'integer', example: 789, nullable: true, description: 'Ticket ID. Replaced by ticket object when using ?expand=ticket'),
    ]
)]
class SummitAttendeeNoteSchema {}

@matiasperrone-exo
Copy link
Contributor

Sorry @caseylocker this one shouldn't been moved as it was not ready yet.
I added the requested code, and moved such schema into its own file to follow the new structure.

Please review it again. thanks.

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 approved. @smarcet if you agree please merge.

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 404d652 into main Dec 8, 2025
5 checks passed
@matiasperrone-exo matiasperrone-exo added the documentation Improvements or additions to documentation label Dec 9, 2025
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