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
38 lines (35 loc) · 1.33 KB
/
OpenApiDefinition.php
File metadata and controls
38 lines (35 loc) · 1.33 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
<?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(
name: 'Accept',
in: 'header',
required: true,
schema: new OA\Schema(type: 'string', default: 'application/json'),
description: 'Expected response format'
),
]
),
tags: [
new OA\Tag(name: 'Results', description: "Operations related to Speedtest results.\nRequires an API token with scope `results:read`."),
new OA\Tag(name: 'Speedtests', description: "Operations to run speedtests.\nRequires an API token with scope `speedtests:run`."),
new OA\Tag(name: 'Servers', description: "Operations for speedtest servers.\nRequires an API token with scope `ookla:list-servers`."),
new OA\Tag(name: 'Stats', description: "Operations for statistics.\nRequires an API token with scope `results:read`."),
]
)]
class OpenApiDefinition {}