forked from alexjustesen/speedtest-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathResultsCollectionSchema.php
More file actions
59 lines (56 loc) · 2.19 KB
/
ResultsCollectionSchema.php
File metadata and controls
59 lines (56 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
namespace App\OpenApi\Schemas;
use OpenApi\Attributes as OA;
#[OA\Schema(
schema: 'ResultsCollection',
type: 'object',
description: 'Paginated list of Speedtest results',
properties: [
new OA\Property(
property: 'data',
type: 'array',
description: 'Array of result objects',
items: new OA\Items(ref: '#/components/schemas/Result')
),
new OA\Property(
property: 'links',
type: 'object',
properties: [
new OA\Property(property: 'first', type: 'string'),
new OA\Property(property: 'last', type: 'string'),
new OA\Property(property: 'prev', type: 'string', nullable: true),
new OA\Property(property: 'next', type: 'string', nullable: true),
],
additionalProperties: false
),
new OA\Property(
property: 'meta',
type: 'object',
properties: [
new OA\Property(property: 'current_page', type: 'integer'),
new OA\Property(property: 'from', type: 'integer'),
new OA\Property(property: 'last_page', type: 'integer'),
new OA\Property(
property: 'links',
type: 'array',
items: new OA\Items(
type: 'object',
properties: [
new OA\Property(property: 'url', type: 'string', nullable: true),
new OA\Property(property: 'label', type: 'string'),
new OA\Property(property: 'active', type: 'boolean'),
],
additionalProperties: false
)
),
new OA\Property(property: 'path', type: 'string'),
new OA\Property(property: 'per.page', type: 'integer'),
new OA\Property(property: 'to', type: 'integer'),
new OA\Property(property: 'total', type: 'integer'),
],
additionalProperties: false
),
],
additionalProperties: false
)]
class ResultsCollectionSchema {}