fix(api-docs): describe 410 gone responses

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Virgil 2026-04-02 02:51:23 +00:00
parent 6ea0b26a13
commit 13f901b88f
3 changed files with 6 additions and 0 deletions

View file

@ -85,6 +85,7 @@ readonly class ApiResponse
403 => 'Forbidden',
404 => 'Not found',
405 => 'Method not allowed',
410 => 'Gone',
409 => 'Conflict',
422 => 'Validation error',
429 => 'Too many requests',

View file

@ -457,6 +457,7 @@ describe('ApiResponse Attribute Rendering', function () {
401 => 'Unauthorised',
403 => 'Forbidden',
404 => 'Not found',
410 => 'Gone',
422 => 'Validation error',
429 => 'Too many requests',
500 => 'Internal server error',

View file

@ -57,6 +57,10 @@ class OpenApiDocumentationTest extends TestCase
$response = new ApiResponse(404);
$this->assertEquals('Not found', $response->getDescription());
$goneResponse = new ApiResponse(410);
$this->assertEquals('Gone', $goneResponse->getDescription());
}
public function test_api_security_attribute(): void