Add application API keys
This commit is contained in:
@@ -17,7 +17,7 @@ class OpenApiDocumentationTest extends TestCase
|
||||
$this->assertIsArray($document);
|
||||
$this->assertSame(JSON_ERROR_NONE, json_last_error());
|
||||
$this->assertSame('3.1.0', $document['openapi']);
|
||||
$this->assertSame([], $document['security']);
|
||||
$this->assertSame([['ApplicationKey' => []]], $document['security']);
|
||||
|
||||
$expectedOperations = [
|
||||
['get', '/projects'],
|
||||
@@ -67,6 +67,7 @@ class OpenApiDocumentationTest extends TestCase
|
||||
['post', '/git-connections'],
|
||||
['patch', '/git-connections/{gitConnection}'],
|
||||
['delete', '/git-connections/{gitConnection}'],
|
||||
['get', '/users/{user}/assigned-tickets'],
|
||||
];
|
||||
|
||||
foreach ($expectedOperations as [$method, $path]) {
|
||||
@@ -74,8 +75,13 @@ class OpenApiDocumentationTest extends TestCase
|
||||
$this->assertArrayHasKey($method, $document['paths'][$path]);
|
||||
}
|
||||
|
||||
$this->assertArrayHasKey('ApplicationKey', $document['components']['securitySchemes']);
|
||||
$this->assertSame('http', $document['components']['securitySchemes']['ApplicationKey']['type']);
|
||||
$this->assertSame('bearer', $document['components']['securitySchemes']['ApplicationKey']['scheme']);
|
||||
$this->assertArrayHasKey('ValidationError', $document['components']['schemas']);
|
||||
$this->assertArrayHasKey('TicketUpdateRequest', $document['components']['schemas']);
|
||||
$this->assertArrayHasKey('UserGitConnectionRequest', $document['components']['schemas']);
|
||||
$this->assertArrayHasKey('AssignedTicketsPayloadEnvelope', $document['components']['schemas']);
|
||||
$this->assertArrayHasKey('AssignedTicketsProjectGroup', $document['components']['schemas']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user