fix(api-docs): describe 410 gone responses
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
6ea0b26a13
commit
13f901b88f
3 changed files with 6 additions and 0 deletions
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue