Skip to content

Commit c03b347

Browse files
committed
fix: add missing schemas names and fields
1 parent 983571f commit c03b347

File tree

6 files changed

+297
-63
lines changed

6 files changed

+297
-63
lines changed

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

Lines changed: 148 additions & 31 deletions
Large diffs are not rendered by default.

app/ModelSerializers/Summit/Presentation/PresentationCategorySerializer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,4 +247,4 @@ public function serialize($expand = null, array $fields = [], array $relations =
247247

248248
return $values;
249249
}
250-
}
250+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
3+
namespace App\Swagger\schemas;
4+
5+
use OpenApi\Attributes as OA;
6+
7+
8+
#[OA\Schema(
9+
schema: 'PresentationCategoryGroup',
10+
type: 'object',
11+
required: ['id', 'created', 'last_edited', 'name', 'class_name', 'summit_id', 'max_attendee_votes'],
12+
properties: [
13+
new OA\Property(property: 'id', type: 'integer', example: 1),
14+
new OA\Property(property: 'created', type: 'integer', example: 1634567890),
15+
new OA\Property(property: 'last_edited', type: 'integer', example: 1634567890),
16+
new OA\Property(property: 'name', type: 'string', example: 'Track Group Name'),
17+
new OA\Property(property: 'color', type: 'string', example: '#FF5733'),
18+
new OA\Property(property: 'description', type: 'string', example: 'Group description'),
19+
new OA\Property(property: 'class_name', type: 'string', example: 'PresentationCategoryGroup'),
20+
new OA\Property(property: 'summit_id', type: 'integer', example: 1),
21+
new OA\Property(property: 'begin_attendee_voting_period_date', type: 'integer', example: 1634567890),
22+
new OA\Property(property: 'end_attendee_voting_period_date', type: 'integer', example: 1634567890),
23+
new OA\Property(property: 'max_attendee_votes', type: 'integer', example: 3),
24+
new OA\Property(
25+
property: 'tracks',
26+
type: 'array',
27+
items: new OA\Items(
28+
anyOf: [
29+
new OA\Schema(type: 'integer'),
30+
new OA\Schema(ref: '#/components/schemas/PresentationCategory')
31+
]
32+
)
33+
),
34+
]
35+
)]
36+
class PresentationCategoryGroupSchema {}
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<?php
2+
3+
namespace App\Swagger\schemas;
4+
5+
use OpenApi\Attributes as OA;
6+
7+
8+
#[OA\Schema(
9+
schema: 'PresentationCategory',
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, format: "time_epoch"),
14+
new OA\Property(property: 'last_edited', type: 'integer', example: 1, format: "time_epoch"),
15+
new OA\Property(property: 'name', type: 'string'),
16+
new OA\Property(property: 'description', type: 'string'),
17+
new OA\Property(property: 'code', type: 'string'),
18+
new OA\Property(property: 'slug', type: 'string'),
19+
new OA\Property(property: 'session_count', type: 'integer'),
20+
new OA\Property(property: 'alternate_count', type: 'integer'),
21+
new OA\Property(property: 'lightning_count', type: 'integer'),
22+
new OA\Property(property: 'lightning_alternate_count', type: 'integer'),
23+
new OA\Property(property: 'voting_visible', type: 'boolean'),
24+
new OA\Property(property: 'chair_visible', type: 'boolean'),
25+
new OA\Property(property: 'summit_id', type: 'integer'),
26+
new OA\Property(property: 'color', type: 'string'),
27+
new OA\Property(property: 'text_color', type: 'string'),
28+
new OA\Property(property: 'icon_url', type: 'string'),
29+
new OA\Property(property: 'order', type: 'integer'),
30+
new OA\Property(property: 'proposed_schedule_transition_time', type: 'integer'),
31+
new OA\Property(property: 'parent_id', type: 'integer'),
32+
new OA\Property(property: 'track_groups', type: 'array',
33+
items: new OA\Items(
34+
anyOf: [
35+
new OA\Schema(type: 'integer'),
36+
new OA\Schema(ref: '#/components/schemas/PresentationCategoryGroup')
37+
]
38+
),
39+
description: 'PresentationCategoryGroup full objects if expanded'
40+
),
41+
new OA\Property(property: 'allowed_tags', type: 'array',
42+
items: new OA\Items(
43+
anyOf: [
44+
new OA\Schema(type: 'integer'),
45+
// new OA\Schema(ref: '#/components/schemas/Tag')
46+
]
47+
),
48+
description: 'Tag full objects if expanded'
49+
),
50+
new OA\Property(property: 'extra_questions', type: 'array',
51+
items: new OA\Items(
52+
anyOf: [
53+
new OA\Schema(type: 'integer'),
54+
// new OA\Schema(ref: '#/components/schemas/TrackQuestionTemplate')
55+
]
56+
),
57+
description: 'TrackQuestionTemplate full objects if expanded'
58+
),
59+
new OA\Property(property: 'selection_lists', type: 'array', items: new OA\Items(type: 'integer'),),
60+
new OA\Property(property: 'allowed_access_levels', type: 'array', items: new OA\Items(type: 'integer'), description: 'SummitAccessLevelType IDs, or full objects if expanded'),
61+
new OA\Property(property: 'proposed_schedule_allowed_locations', type: 'array',
62+
items: new OA\Items(
63+
anyOf: [
64+
new OA\Schema(type: 'integer'),
65+
// new OA\Schema(ref: '#/components/schemas/SummitProposedScheduleAllowedLocation')
66+
]
67+
),
68+
description: 'SummitProposedScheduleAllowedLocation full objects if expanded'
69+
),
70+
new OA\Property(property: 'parent', ref: '#/components/schemas/PresentationCategory', description: 'PresentationCategory full object if expanded'),
71+
new OA\Property(property: 'subtracks', type: 'array',
72+
items: new OA\Items(
73+
anyOf: [
74+
new OA\Schema(type: 'integer'),
75+
new OA\Schema(ref: '#/components/schemas/PresentationCategory')
76+
]
77+
),
78+
description: 'PresentationCategory full object if expanded'
79+
),
80+
])
81+
]
82+
class PresentationCategorySchema
83+
{
84+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
namespace App\Swagger\schemas;
4+
5+
use App\Security\SummitScopes;
6+
use OpenApi\Attributes as OA;
7+
8+
#[OA\SecurityScheme(
9+
type: 'oauth2',
10+
securityScheme: 'track_groups_oauth2',
11+
flows: [
12+
new OA\Flow(
13+
authorizationUrl: L5_SWAGGER_CONST_AUTH_URL,
14+
tokenUrl: L5_SWAGGER_CONST_TOKEN_URL,
15+
flow: 'authorizationCode',
16+
scopes: [
17+
SummitScopes::ReadSummitData => 'Read Summit Data',
18+
SummitScopes::ReadAllSummitData => 'Read All Summit Data',
19+
SummitScopes::WriteSummitData => 'Write Summit Data',
20+
SummitScopes::WriteTrackGroupsData => 'Write Track Groups Data',
21+
],
22+
),
23+
],
24+
)
25+
]
26+
class TrackGroupsAuthSchema
27+
{
28+
}

app/Swagger/SummitPresentationSchemas.php

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -146,37 +146,6 @@ class PresentationTrackChairScoreTypeUpdateRequest {}
146146

147147
// End Track Chair Score Types
148148

149-
150-
#[OA\Schema(
151-
schema: 'PresentationCategoryGroup',
152-
type: 'object',
153-
required: ['id', 'created', 'last_edited', 'name', 'class_name', 'summit_id', 'max_attendee_votes'],
154-
properties: [
155-
new OA\Property(property: 'id', type: 'integer', example: 1),
156-
new OA\Property(property: 'created', type: 'integer', example: 1634567890),
157-
new OA\Property(property: 'last_edited', type: 'integer', example: 1634567890),
158-
new OA\Property(property: 'name', type: 'string', example: 'Track Group Name'),
159-
new OA\Property(property: 'color', type: 'string', example: '#FF5733'),
160-
new OA\Property(property: 'description', type: 'string', example: 'Group description'),
161-
new OA\Property(property: 'class_name', type: 'string', example: 'PresentationCategoryGroup'),
162-
new OA\Property(property: 'summit_id', type: 'integer', example: 1),
163-
new OA\Property(property: 'begin_attendee_voting_period_date', type: 'integer', example: 1634567890),
164-
new OA\Property(property: 'end_attendee_voting_period_date', type: 'integer', example: 1634567890),
165-
new OA\Property(property: 'max_attendee_votes', type: 'integer', example: 3),
166-
new OA\Property(
167-
property: 'tracks',
168-
type: 'array',
169-
items: new OA\Items(
170-
anyOf: [
171-
new OA\Schema(type: 'integer'),
172-
new OA\Schema(type: 'PresentationCategory')
173-
]
174-
)
175-
),
176-
]
177-
)]
178-
class PresentationCategoryGroup {}
179-
180149
#[OA\Schema(
181150
schema: 'PaginatedPresentationCategoryGroupsResponse',
182151
allOf: [

0 commit comments

Comments
 (0)