Files
Alex Justesen 4abbfe40fe API requires accept json header (#2333)
Co-authored-by: Alex Justesen <1144087+alexjustesen@users.noreply.github.com>
Co-authored-by: GitHub Action <actions@github.com>
2025-09-14 10:51:24 -04:00

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 {}