Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

50 changes: 50 additions & 0 deletions app/Swagger/Models/AdminPresentationSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php

namespace App\Swagger\schemas;

use OpenApi\Attributes as OA;

#[OA\Schema(
schema: 'AdminPresentation',
type: 'object',
description: 'Represents a presentation with admin-specific fields including statistics and selection data',
allOf: [
new OA\Schema(ref: '#/components/schemas/Presentation'),
new OA\Schema(
type: 'object',
properties: [
// AdminPresentation-specific fields
new OA\Property(property: 'rank', type: 'integer', nullable: true, example: 5, description: 'Presentation rank in selection'),
new OA\Property(property: 'selection_status', type: 'string', nullable: true, example: 'selected', description: 'Selection status (selected, unselected, lightning-accepted, etc.)'),
new OA\Property(property: 'views_count', type: 'integer', example: 150, description: 'Number of views by track chairs'),
new OA\Property(property: 'comments_count', type: 'integer', example: 8, description: 'Number of comments'),
new OA\Property(property: 'popularity_score', type: 'number', format: 'float', example: 4.5, description: 'Calculated popularity score'),
new OA\Property(property: 'votes_count', type: 'integer', example: 42, description: 'Number of attendee votes'),
new OA\Property(property: 'votes_average', type: 'number', format: 'float', example: 3.8, description: 'Average vote rating'),
new OA\Property(property: 'votes_total_points', type: 'integer', example: 160, description: 'Total vote points'),
new OA\Property(property: 'track_chair_avg_score', type: 'number', format: 'float', example: 4.2, description: 'Average track chair score'),
new OA\Property(property: 'remaining_selections', type: 'integer', example: 3, description: 'Remaining selections available'),
new OA\Property(property: 'passers_count', type: 'integer', example: 2, description: 'Number of track chairs who passed'),
new OA\Property(property: 'likers_count', type: 'integer', example: 5, description: 'Number of track chairs who marked as maybe'),
new OA\Property(property: 'selectors_count', type: 'integer', example: 8, description: 'Number of track chairs who selected'),
new OA\Property(
property: 'track_chair_scores_avg',
type: 'array',
description: 'Average scores per ranking type',
items: new OA\Items(type: 'string'),
example: ['Content: 4.5', 'Quality: 4.0']
),

// Streaming/occupancy fields
new OA\Property(property: 'occupancy', type: 'string', nullable: true, example: 'FULL', description: 'Room occupancy status'),
new OA\Property(property: 'streaming_url', type: 'string', format: 'uri', nullable: true, example: 'https://stream.example.com/live/123'),
new OA\Property(property: 'streaming_type', type: 'string', nullable: true, example: 'VOD', description: 'Type of streaming (VOD, LIVE, etc.)'),
new OA\Property(property: 'etherpad_link', type: 'string', format: 'uri', nullable: true, example: 'https://etherpad.example.com/p/session123'),
new OA\Property(property: 'overflow_streaming_url', type: 'string', format: 'uri', nullable: true, example: 'https://overflow.example.com/live/123'),
new OA\Property(property: 'overflow_stream_is_secure', type: 'boolean', example: false),
new OA\Property(property: 'overflow_stream_key', type: 'string', nullable: true, example: 'abc123key'),
]
),
],
)]
class AdminPresentationSchema {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

namespace App\Swagger\schemas;

use OpenApi\Attributes as OA;

#[OA\Schema(
schema: 'AssignedSelectionPlanExtraQuestionType',
type: 'object',
description: 'Represents an extra question type assigned to a selection plan with order and editability settings',
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: 'order', type: 'integer', example: 1, description: 'Order of the question within the selection plan'),
new OA\Property(property: 'is_editable', type: 'boolean', example: true, description: 'Whether the question can be edited'),
new OA\Property(property: 'selection_plan_id', type: 'integer', example: 123, description: 'Selection Plan ID'),
new OA\Property(property: 'name', type: 'string', example: 'audience_level'),
new OA\Property(property: 'type', type: 'string', example: 'ComboBox'),
new OA\Property(property: 'label', type: 'string', example: 'What is your target audience level?'),
new OA\Property(property: 'placeholder', type: 'string', nullable: true, example: 'Select an option'),
new OA\Property(property: 'mandatory', type: 'boolean', example: true),
new OA\Property(property: 'max_selected_values', type: 'integer', example: 0),
new OA\Property(property: 'class', type: 'string', example: 'SummitSelectionPlanExtraQuestionType'),
new OA\Property(property: 'summit_id', type: 'integer', example: 123),
new OA\Property(
property: 'values',
type: 'array',
description: 'Array of ExtraQuestionTypeValue IDs',
items: new OA\Items(type: 'integer'),
example: [1, 2, 3]
),
]
)]
class AssignedSelectionPlanExtraQuestionTypeSchema {}
25 changes: 25 additions & 0 deletions app/Swagger/Models/ExtraQuestionAnswerSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace App\Swagger\schemas;

use OpenApi\Attributes as OA;

#[OA\Schema(
schema: 'ExtraQuestionAnswer',
type: 'object',
description: 'Represents an answer to an extra question',
properties: [
// Base fields (from SilverStripeSerializer)
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),

// ExtraQuestionAnswer fields
new OA\Property(property: 'value', type: 'string', example: 'Yes, I agree', description: 'The answer value'),
new OA\Property(property: 'question_id', type: 'integer', example: 5, description: 'ExtraQuestionType ID'),

// Expandable relations
new OA\Property(property: 'question', type: 'object', description: 'ExtraQuestionType object, expanded when using expand=question'),
]
)]
class ExtraQuestionAnswerSchema {}
20 changes: 20 additions & 0 deletions app/Swagger/Models/PresentationActionTypeSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace App\Swagger\schemas;

use OpenApi\Attributes as OA;

#[OA\Schema(
schema: 'PresentationActionType',
type: 'object',
description: 'Represents an action type that can be performed on presentations (e.g., "Flag for Review", "Mark as Complete")',
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: 'label', type: 'string', example: 'Flag for Review'),
new OA\Property(property: 'summit_id', type: 'integer', example: 123, description: 'Summit ID'),
new OA\Property(property: 'order', type: 'integer', example: 1, description: 'Order within the selection plan (when queried in context)'),
]
)]
class PresentationActionTypeSchema {}
31 changes: 31 additions & 0 deletions app/Swagger/Models/PresentationCategoryGroupSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

namespace App\Swagger\schemas;

use OpenApi\Attributes as OA;


#[OA\Schema(
schema: 'PresentationCategoryGroup',
type: 'object',
properties: [
new OA\Property(property: 'id', type: 'integer', example: 1),
new OA\Property(property: 'created', type: 'integer', example: 1, format: "time_epoch"),
new OA\Property(property: 'last_edited', type: 'integer', example: 1, format: "time_epoch"),
new OA\Property(property: 'name', type: 'string'),
new OA\Property(property: 'color', type: 'string', format: "color_hex"),
new OA\Property(property: 'description', type: 'string'),
new OA\Property(property: 'class_name', type: 'string'),
new OA\Property(property: 'summit_id', type: 'integer'),
new OA\Property(property: 'begin_attendee_voting_period_date', type: 'integer', format: "time_epoch"),
new OA\Property(property: 'end_attendee_voting_period_date', type: 'integer', format: "time_epoch"),
new OA\Property(property: 'max_attendee_votes', type: 'integer'),
new OA\Property(property: 'tracks', type: 'array',
description: 'Array of PresentationCategory IDs, use expand=tracks for full details of PresentationCategory',
items: new OA\Items(type: 'integer'),
),
])
]
class PresentationCategoryGroupSchema
{
}
30 changes: 30 additions & 0 deletions app/Swagger/Models/PresentationLinkSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

namespace App\Swagger\schemas;

use OpenApi\Attributes as OA;

#[OA\Schema(
schema: 'PresentationLink',
type: 'object',
description: 'Represents an external link associated with a presentation',
properties: [
// Base fields (from SilverStripeSerializer)
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),

// PresentationMaterial fields
new OA\Property(property: 'name', type: 'string', example: 'Related Documentation'),
new OA\Property(property: 'description', type: 'string', nullable: true, example: 'Link to the project documentation'),
new OA\Property(property: 'display_on_site', type: 'boolean', example: true),
new OA\Property(property: 'featured', type: 'boolean', example: false),
new OA\Property(property: 'order', type: 'integer', example: 1),
new OA\Property(property: 'presentation_id', type: 'integer', example: 123, description: 'Presentation ID'),
new OA\Property(property: 'class_name', type: 'string', example: 'PresentationLink'),

// PresentationLink-specific fields
new OA\Property(property: 'link', type: 'string', format: 'uri', nullable: true, example: 'https://docs.example.com/project', description: 'External URL'),
]
)]
class PresentationLinkSchema {}
34 changes: 34 additions & 0 deletions app/Swagger/Models/PresentationMediaUploadSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

namespace App\Swagger\schemas;

use OpenApi\Attributes as OA;

#[OA\Schema(
schema: 'PresentationMediaUpload',
type: 'object',
description: 'Represents a media file uploaded for a presentation',
properties: [
// Base fields (from SilverStripeSerializer)
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),

// PresentationMaterial fields (some are overridden)
new OA\Property(property: 'name', type: 'string', nullable: true, example: 'Speaker Photo', description: 'Derived from media upload type name'),
new OA\Property(property: 'description', type: 'string', nullable: true, example: 'Photo of the speaker', description: 'Derived from media upload type description'),
new OA\Property(property: 'display_on_site', type: 'boolean', example: true),
new OA\Property(property: 'order', type: 'integer', example: 1),
new OA\Property(property: 'presentation_id', type: 'integer', example: 123, description: 'Presentation ID'),
new OA\Property(property: 'class_name', type: 'string', example: 'PresentationMediaUpload'),

// PresentationMediaUpload-specific fields
new OA\Property(property: 'filename', type: 'string', example: 'speaker-photo.jpg', description: 'Name of the uploaded file'),
new OA\Property(property: 'media_upload_type_id', type: 'integer', example: 5, description: 'SummitMediaUploadType ID'),
new OA\Property(property: 'public_url', type: 'string', format: 'uri', nullable: true, example: 'https://storage.example.com/uploads/speaker-photo.jpg', description: 'Public URL to access the uploaded file'),

// Expandable relations
new OA\Property(property: 'media_upload_type', description: 'SummitMediaUploadType object, expanded when using expand=media_upload_type'),
]
)]
class PresentationMediaUploadSchema {}
Loading
Loading