mirror of
https://github.com/alexjustesen/speedtest-tracker.git
synced 2026-06-23 04:20:08 +00:00
4abbfe40fe
Co-authored-by: Alex Justesen <1144087+alexjustesen@users.noreply.github.com> Co-authored-by: GitHub Action <actions@github.com>
48 lines
1.5 KiB
PHP
48 lines
1.5 KiB
PHP
<?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 {}
|