forked from alexjustesen/speedtest-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOpenApiDefinition.php
More file actions
47 lines (44 loc) · 1.47 KB
/
OpenApiDefinition.php
File metadata and controls
47 lines (44 loc) · 1.47 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
<?php
namespace App\OpenApi;
use OpenApi\Attributes as OA;
#[OA\OpenApi(
info: new OA\Info(
title: 'Speedtest Tracker API',
version: '1.0.0',
),
components: new OA\Components(
securitySchemes: [
new OA\SecurityScheme(
securityScheme: 'bearerAuth',
type: 'http',
scheme: 'bearer',
bearerFormat: 'JWT'
),
],
parameters: [
new OA\Parameter(
parameter: 'AcceptHeader',
name: 'Accept',
in: 'header',
required: true,
schema: new OA\Schema(type: 'string', default: 'application/json'),
description: 'Must be "application/json" - this API only accepts and returns JSON'
),
]
),
tags: [
new OA\Tag(
name: 'Results',
description: 'Endpoints for accessing and filtering speedtest results. Requires API token with `results:read` scope.'
),
new OA\Tag(
name: 'Speedtests',
description: 'Endpoints for initiating speedtests and retrieving available servers. Requires `speedtests:run` or `speedtests:read` token scopes.'
),
new OA\Tag(
name: 'Stats',
description: 'Endpoints for retrieving aggregated statistics and performance metrics. Requires `speedtests:read` token scope.'
),
]
)]
class OpenApiDefinition {}