diff --git a/src/php/src/Api/Documentation/Attributes/ApiResponse.php b/src/php/src/Api/Documentation/Attributes/ApiResponse.php index b96ca76..6958c69 100644 --- a/src/php/src/Api/Documentation/Attributes/ApiResponse.php +++ b/src/php/src/Api/Documentation/Attributes/ApiResponse.php @@ -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', diff --git a/src/php/src/Api/Tests/Feature/OpenApiDocumentationComprehensiveTest.php b/src/php/src/Api/Tests/Feature/OpenApiDocumentationComprehensiveTest.php index 6ad6188..06e7cac 100644 --- a/src/php/src/Api/Tests/Feature/OpenApiDocumentationComprehensiveTest.php +++ b/src/php/src/Api/Tests/Feature/OpenApiDocumentationComprehensiveTest.php @@ -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', diff --git a/src/php/src/Api/Tests/Feature/OpenApiDocumentationTest.php b/src/php/src/Api/Tests/Feature/OpenApiDocumentationTest.php index 69fc496..843e00f 100644 --- a/src/php/src/Api/Tests/Feature/OpenApiDocumentationTest.php +++ b/src/php/src/Api/Tests/Feature/OpenApiDocumentationTest.php @@ -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