Files
speedtest-tracker/app/OpenApi/Schemas/NotAcceptableErrorSchema.php
T
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

25 lines
639 B
PHP

<?php
namespace App\OpenApi\Schemas;
use OpenApi\Attributes as OA;
#[OA\Schema(
schema: 'NotAcceptableError',
description: 'Error response when the Accept header is missing or invalid',
type: 'object',
properties: [
new OA\Property(
property: 'message',
type: 'string',
example: 'This endpoint only accepts JSON. Please include "Accept: application/json" in your request headers.'
),
new OA\Property(
property: 'error',
type: 'string',
example: 'Unsupported Media Type'
),
]
)]
class NotAcceptableErrorSchema {}