added API tokens, deprecate API passwords (#4637)
This commit is contained in:
@@ -97,20 +97,20 @@ class ApiDocControllerTest extends ControllerBaseTest
|
||||
'/api/users',
|
||||
'/api/users/{id}',
|
||||
'/api/users/me',
|
||||
'/api/users/api-token/{id}',
|
||||
];
|
||||
|
||||
$this->assertArrayHasKey('openapi', $json);
|
||||
$this->assertEquals('3.0.0', $json['openapi']);
|
||||
$this->assertArrayHasKey('info', $json);
|
||||
$this->assertEquals('Kimai - API Docs', $json['info']['title']);
|
||||
$this->assertEquals('0.7', $json['info']['version']);
|
||||
$this->assertEquals('1.0', $json['info']['version']);
|
||||
|
||||
$this->assertArrayHasKey('paths', $json);
|
||||
$this->assertEquals($paths, array_keys($json['paths']));
|
||||
|
||||
$this->assertArrayHasKey('security', $json);
|
||||
$this->assertArrayHasKey('X-AUTH-USER', $json['security'][0]);
|
||||
$this->assertArrayHasKey('X-AUTH-TOKEN', $json['security'][0]);
|
||||
$this->assertEquals(['bearer' => []], $json['security'][0]);
|
||||
|
||||
$this->assertArrayHasKey('components', $json);
|
||||
$this->assertArrayHasKey('schemas', $json['components']);
|
||||
|
||||
Reference in New Issue
Block a user