Skip to content

Commit 7f8b73e

Browse files
committed
feat: Add changes requested in PR
1 parent 1f3d0e5 commit 7f8b73e

File tree

4 files changed

+77
-73
lines changed

4 files changed

+77
-73
lines changed

app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMediaUploadTypeApiController.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function __construct
9393
parameters: [
9494
new OA\Parameter(
9595
name: 'id',
96-
in: 'query',
96+
in: 'path',
9797
required: false,
9898
schema: new OA\Schema(type: 'integer'),
9999
description: 'The summit ID'
@@ -186,7 +186,7 @@ public function getAllBySummit($summit_id)
186186
parameters: [
187187
new OA\Parameter(
188188
name: 'id',
189-
in: 'query',
189+
in: 'path',
190190
required: false,
191191
schema: new OA\Schema(type: 'integer'),
192192
description: 'The summit ID'
@@ -252,7 +252,7 @@ public function get($summit_id, $media_upload_type_id)
252252
parameters: [
253253
new OA\Parameter(
254254
name: 'id',
255-
in: 'query',
255+
in: 'path',
256256
required: false,
257257
schema: new OA\Schema(type: 'integer'),
258258
description: 'The summit ID'
@@ -303,7 +303,7 @@ public function add($summit_id)
303303
parameters: [
304304
new OA\Parameter(
305305
name: 'id',
306-
in: 'query',
306+
in: 'path',
307307
required: false,
308308
schema: new OA\Schema(type: 'integer'),
309309
description: 'The summit ID'
@@ -361,7 +361,7 @@ public function update($summit_id, $media_upload_type_id)
361361
parameters: [
362362
new OA\Parameter(
363363
name: 'id',
364-
in: 'query',
364+
in: 'path',
365365
required: false,
366366
schema: new OA\Schema(type: 'integer'),
367367
description: 'The summit ID'
@@ -530,7 +530,7 @@ protected function updateChild(Summit $summit, int $child_id, array $payload): I
530530
parameters: [
531531
new OA\Parameter(
532532
name: 'id',
533-
in: 'query',
533+
in: 'path',
534534
required: false,
535535
schema: new OA\Schema(type: 'integer'),
536536
description: 'The summit ID'
@@ -609,7 +609,7 @@ public function addToPresentationType($summit_id, $media_upload_type_id, $presen
609609
parameters: [
610610
new OA\Parameter(
611611
name: 'id',
612-
in: 'query',
612+
in: 'path',
613613
required: false,
614614
schema: new OA\Schema(type: 'integer'),
615615
description: 'The summit ID'
@@ -687,7 +687,7 @@ public function deleteFromPresentationType($summit_id, $media_upload_type_id, $p
687687
parameters: [
688688
new OA\Parameter(
689689
name: 'id',
690-
in: 'query',
690+
in: 'path',
691691
required: false,
692692
schema: new OA\Schema(type: 'integer'),
693693
description: 'The summit ID'
@@ -746,4 +746,4 @@ public function cloneMediaUploadTypes($summit_id, $to_summit_id)
746746
});
747747
}
748748

749-
}
749+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
namespace App\Swagger\schemas;
4+
5+
use OpenApi\Attributes as OA;
6+
7+
8+
#[OA\Schema(
9+
schema: 'SummitMediaFileType',
10+
type: 'object',
11+
properties: [
12+
new OA\Property(property: 'id', type: 'integer', example: 1),
13+
new OA\Property(property: 'created', type: 'integer', format: 'int64', example: 1633024800),
14+
new OA\Property(property: 'last_edited', type: 'integer', format: 'int64', example: 1633024800),
15+
new OA\Property(property: 'name', type: 'string', example: 'Presentation'),
16+
new OA\Property(property: 'description', type: 'string', example: 'Presentation files for events'),
17+
new OA\Property(property: 'is_system_defined', type: 'boolean', example: false),
18+
new OA\Property(
19+
property: 'allowed_extensions',
20+
type: 'array',
21+
items: new OA\Items(type: 'string'),
22+
example: ['pdf', 'ppt', 'pptx']
23+
),
24+
]
25+
)]
26+
class SummitMediaFileTypeSchema {}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?php
2+
3+
namespace App\Swagger\schemas;
4+
5+
use OpenApi\Attributes as OA;
6+
7+
8+
9+
#[OA\Schema(
10+
schema: "SummitMediaUploadType",
11+
description: "Summit Media Upload Type",
12+
type: "object",
13+
properties: [
14+
new OA\Property(property: "id", type: "integer", example: 1),
15+
new OA\Property(property: "created", type: "integer", format: "int64", description: "Creation timestamp (epoch)", example: 1234567890),
16+
new OA\Property(property: "last_edited", type: "integer", format: "int64", description: "Last edit timestamp (epoch)", example: 1234567890),
17+
new OA\Property(property: "name", type: "string", maxLength: 255, example: "Speaker Photo"),
18+
new OA\Property(property: "description", type: "string", maxLength: 5120, nullable: true, example: "High resolution photo of the speaker"),
19+
new OA\Property(property: "max_size", type: "integer", description: "Maximum file size in KB", example: 10240),
20+
new OA\Property(property: "is_mandatory", type: "boolean", example: true),
21+
new OA\Property(property: "min_uploads_qty", type: "integer", minimum: 0, example: 1),
22+
new OA\Property(property: "max_uploads_qty", type: "integer", minimum: 0, example: 1),
23+
new OA\Property(property: "use_temporary_links_on_public_storage", type: "boolean", example: false),
24+
new OA\Property(property: "temporary_links_public_storage_ttl", type: "integer", description: "TTL in seconds", nullable: true, example: 3600),
25+
new OA\Property(property: "private_storage_type", type: "string", example: "local"),
26+
new OA\Property(property: "public_storage_type", type: "string", example: "s3"),
27+
new OA\Property(property: "is_editable", type: "boolean", example: true),
28+
new OA\Property(property: "type_id", type: "integer", example: 456),
29+
new OA\Property(property: "type", ref: "#/components/schemas/SummitMediaFileType", description: "Only present when relations=presentation_types and expand includes 'type' in it."),
30+
new OA\Property(property: "summit_id", type: "integer", example: 123, description: "Summit ID, only when expand does NOT include 'summit' in it."),
31+
new OA\Property(property: "summit", ref: "#/components/schemas/Summit", description: "Summit expand (only when relations=presentation_types) and expand includes 'summit' in it."),
32+
new OA\Property(
33+
property: "presentation_types",
34+
type: "array",
35+
items: new OA\Items(type: "integer"),
36+
description: "Array of PresentationType IDs when relations=presentation_types and full objects when ?expand=presentation_types is used",
37+
),
38+
],
39+
)]
40+
class SummitMediaUploadTypeSchema
41+
{
42+
}

app/Swagger/SummitSchemas.php

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -369,49 +369,6 @@ class PaginatedSummitAttendeeBadgesResponseSchema
369369

370370
// Summit Media Upload Type Schemas
371371

372-
#[OA\Schema(
373-
schema: "SummitMediaUploadType",
374-
description: "Summit Media Upload Type",
375-
type: "object",
376-
properties: [
377-
new OA\Property(property: "id", type: "integer", example: 1),
378-
new OA\Property(property: "created", type: "integer", format: "int64", description: "Creation timestamp (epoch)", example: 1234567890),
379-
new OA\Property(property: "last_edited", type: "integer", format: "int64", description: "Last edit timestamp (epoch)", example: 1234567890),
380-
new OA\Property(property: "name", type: "string", maxLength: 255, example: "Speaker Photo"),
381-
new OA\Property(property: "description", type: "string", maxLength: 5120, nullable: true, example: "High resolution photo of the speaker"),
382-
new OA\Property(property: "max_size", type: "integer", description: "Maximum file size in KB", example: 10240),
383-
new OA\Property(property: "is_mandatory", type: "boolean", example: true),
384-
new OA\Property(property: "min_uploads_qty", type: "integer", minimum: 0, example: 1),
385-
new OA\Property(property: "max_uploads_qty", type: "integer", minimum: 0, example: 1),
386-
new OA\Property(property: "use_temporary_links_on_public_storage", type: "boolean", example: false),
387-
new OA\Property(property: "temporary_links_public_storage_ttl", type: "integer", description: "TTL in seconds", nullable: true, example: 3600),
388-
new OA\Property(property: "private_storage_type", type: "string", example: "local"),
389-
new OA\Property(property: "public_storage_type", type: "string", example: "s3"),
390-
new OA\Property(property: "is_editable", type: "boolean", example: true),
391-
],
392-
anyOf: [
393-
new OA\Property(property: "type_id", type: "integer", example: 456),
394-
new OA\Property(property: "type", type: "SummitMediaFileType", description: "Only present when relations=presentation_types and expand includes 'type' in it."),
395-
new OA\Property(property: "summit_id", type: "integer", example: 123, description: "Summit ID, only when expand does NOT include 'summit' in it."),
396-
new OA\Property(property: "summit", type: "Summit", description: "Summit expand (only when relations=presentation_types) and expand includes 'summit' in it."),
397-
new OA\Property(
398-
property: "presentation_types",
399-
type: "array",
400-
items: new OA\Items(type: "integer"),
401-
description: "Array of presentation type IDs (only when relations=presentation_types and expand does not include 'presentation_types' in it)",
402-
example: [1, 2, 3]
403-
),
404-
new OA\Property(
405-
property: "presentation_types",
406-
type: "array",
407-
items: new OA\Items(type: "PresentationType"),
408-
description: "Array of PresentationType (only when relations=presentation_types and expand includes 'presentation_types' in it)",
409-
),
410-
],
411-
)]
412-
class SummitMediaUploadTypeSchema
413-
{
414-
}
415372

416373
#[OA\Schema(
417374
schema: "PaginatedSummitMediaUploadTypesResponse",
@@ -545,27 +502,6 @@ class SummitSponsorshipTypeUpdateRequestSchema
545502
{
546503
}
547504

548-
#[OA\Schema(
549-
schema: 'SummitMediaFileType',
550-
type: 'object',
551-
properties: [
552-
new OA\Property(property: 'id', type: 'integer', example: 1),
553-
new OA\Property(property: 'created', type: 'integer', format: 'int64', example: 1633024800),
554-
new OA\Property(property: 'last_edited', type: 'integer', format: 'int64', example: 1633024800),
555-
new OA\Property(property: 'name', type: 'string', example: 'Presentation'),
556-
new OA\Property(property: 'description', type: 'string', example: 'Presentation files for events'),
557-
new OA\Property(property: 'is_system_defined', type: 'boolean', example: false),
558-
new OA\Property(
559-
property: 'allowed_extensions',
560-
type: 'array',
561-
items: new OA\Items(type: 'string'),
562-
example: ['pdf', 'ppt', 'pptx']
563-
),
564-
]
565-
)]
566-
class SummitMediaFileTypeSchema
567-
{
568-
}
569505

570506
#[OA\Schema(
571507
schema: 'PaginatedSummitMediaFileTypesResponse',

0 commit comments

Comments
 (0)