Skip to content

Commit 75b02ef

Browse files
committed
chore: include PR requested changes
1 parent e0b3235 commit 75b02ef

3 files changed

Lines changed: 78 additions & 5 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace App\Swagger\schemas;
4+
5+
use OpenApi\Attributes as OA;
6+
7+
8+
#[OA\Schema(
9+
schema: 'SummitBadgeFeatureType',
10+
type: 'object',
11+
properties: [
12+
new OA\Property(property: 'id', type: 'integer', example: 1),
13+
new OA\Property(property: 'created', type: 'integer', example: 1),
14+
new OA\Property(property: 'last_edited', type: 'integer', example: 1),
15+
new OA\Property(property: 'name', type: 'string'),
16+
new OA\Property(property: 'description', type: 'string'),
17+
new OA\Property(property: 'template_content', type: 'string'),
18+
new OA\Property(property: 'summit_id', type: 'integer'),
19+
new OA\Property(property: 'image', type: 'string', format: 'url'),
20+
])
21+
]
22+
class SummitBadgeFeatureTypeSchema
23+
{
24+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
3+
namespace App\Swagger\schemas;
4+
5+
use OpenApi\Attributes as OA;
6+
7+
8+
#[OA\Schema(
9+
schema: 'SummitBadgeType',
10+
type: 'object',
11+
properties: [
12+
new OA\Property(property: 'id', type: 'integer', example: 1),
13+
new OA\Property(property: 'created', type: 'integer', example: 1),
14+
new OA\Property(property: 'last_edited', type: 'integer', example: 1),
15+
new OA\Property(property: 'name', type: 'string'),
16+
new OA\Property(property: 'description', type: 'string'),
17+
new OA\Property(property: 'template_content', type: 'string'),
18+
new OA\Property(property: 'is_default', type: 'boolean'),
19+
new OA\Property(property: 'summit_id', type: 'integer', description: 'Summit ID, use expand=summit for full object details'),
20+
new OA\Property(
21+
property: 'access_levels',
22+
type: 'array',
23+
description: 'Array of SummitAccessLevelType IDs, use expand=access_levels for full details',
24+
items: new OA\Items(type: 'integer'),
25+
example: [1, 2, 3]
26+
),
27+
new OA\Property(
28+
property: 'badge_features',
29+
type: 'array',
30+
description: 'Array of SummitBadgeFeatureType IDs, use expand=badge_features for full details',
31+
items: new OA\Items(type: 'integer'),
32+
example: [1, 2, 3]
33+
),
34+
new OA\Property(
35+
property: 'allowed_view_types',
36+
type: 'array',
37+
description: 'Array of SummitBadgeViewType IDs, use expand=allowed_view_types for full details',
38+
items: new OA\Items(type: 'integer'),
39+
example: [1, 2, 3]
40+
),
41+
])
42+
]
43+
class SummitBadgeTypeSchema
44+
{
45+
}

app/Swagger/SummitSchemas.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,18 @@
1515
new OA\Property(property: 'qr_code', type: 'string', nullable: true, example: 'QR123456789'),
1616
new OA\Property(property: 'is_void', type: 'boolean', example: false, description: 'Whether the badge has been voided'),
1717
new OA\Property(property: 'printed_times', type: 'integer', example: 2, description: 'Number of times this badge has been printed'),
18-
new OA\Property(property: 'ticket_id', type: 'integer', example: 123, description: 'Ticket ID, use expand=ticket for full object details (ticket field)'),
19-
new OA\Property(property: 'type_id', type: 'integer', example: 5, description: 'BadgeType ID, use expand=type for full object details (type field)'),
18+
new OA\Property(property: 'ticket_id', type: 'integer', example: 123, description: 'SummitAttendeeTicket ID, use expand=ticket for full object details'),
19+
new OA\Property(property: 'type_id', type: 'integer', example: 5, description: 'SummitBadgeType ID, use expand=type for full object details'),
20+
new OA\Property(property: 'type', ref: '#/components/schemas/SummitBadgeType'),
2021
new OA\Property(property: 'print_excerpt', type: 'string', example: 'John Doe - Speaker', description: 'Short text excerpt for printing'),
2122
new OA\Property(
2223
property: 'features',
2324
type: 'array',
24-
description: 'Array of feature IDs assigned to this badge (use expand=features for full details)',
25-
items: new OA\Items(type: 'integer'),
25+
description: 'Array of SummitBadgeFeatureType IDs assigned to this badge (use expand=features for full details)',
26+
items: new OA\Items(oneOf: [
27+
new OA\Schema(type: 'integer'),
28+
new OA\Schema(ref: '#/components/schemas/SummitBadgeFeatureType'),
29+
]),
2630
example: [1, 2, 3]
2731
),
2832
],
@@ -49,4 +53,4 @@ class SummitAttendeeBadgeSchema
4953
)]
5054
class PaginatedSummitAttendeeBadgesResponseSchema
5155
{
52-
}
56+
}

0 commit comments

Comments
 (0)