Skip to content

Commit ad0f318

Browse files
committed
chore: add requested changes in PR
1 parent 623cfce commit ad0f318

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

app/Http/Controllers/Apis/Protected/Main/OAuth2GroupsApiController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function __construct
103103
name: 'expand',
104104
in: 'query',
105105
required: false,
106-
description: 'Comma-separated list of related resources to include. Available relations: members',
106+
description: 'Comma-separated list of related resources to include. Available relations: members (expands member IDs to full member objects)',
107107
schema: new OA\Schema(type: 'string', example: 'members')
108108
),
109109
],

app/Swagger/Models/GroupSchema.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
namespace App\Swagger\schemas;
4+
5+
use OpenApi\Attributes as OA;
6+
7+
8+
#[OA\Schema(
9+
schema: 'Group',
10+
type: 'object',
11+
properties: [
12+
new OA\Property(property: 'id', type: 'integer', example: 1, description: 'Unique identifier'),
13+
new OA\Property(property: 'created', type: 'integer', example: 1630500518, description: 'Creation timestamp (Unix epoch)'),
14+
new OA\Property(property: 'last_edited', type: 'integer', example: 1630500518, description: 'Last modification timestamp (Unix epoch)'),
15+
new OA\Property(property: 'title', type: 'string', example: 'Administrators', description: 'Group title'),
16+
new OA\Property(property: 'description', type: 'string', example: 'System administrators group', description: 'Group description', nullable: true),
17+
new OA\Property(property: 'code', type: 'string', example: 'administrators', description: 'Unique group code'),
18+
new OA\Property(
19+
property: 'members',
20+
type: 'array',
21+
description: 'List of Member objects, only present when requested via ?expand=members',
22+
items: new OA\Items(
23+
ref: '#/components/schemas/Member'
24+
)
25+
),
26+
]
27+
)]
28+
class GroupSchema
29+
{
30+
}

app/Swagger/schemas.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,4 +488,4 @@ class ChunkedFileUploadRequestSchema
488488
)]
489489
class PaginatedGroupsResponseSchema
490490
{
491-
}
491+
}

0 commit comments

Comments
 (0)