mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 23:59:26 +03:00
commit
9cd417efb4
@ -252,7 +252,8 @@ class ApiController80
|
||||
/**
|
||||
* @Route("/custom-operation-id", methods={"GET", "POST"})
|
||||
*
|
||||
* @Operation(operationId="custom-operation-id")
|
||||
* @OA\Get(operationId="get-custom-operation-id")
|
||||
* @OA\Post(operationId="post-custom-operation-id")
|
||||
* @OA\Response(response=200, description="success")
|
||||
*/
|
||||
public function customOperationIdAction()
|
||||
|
@ -564,10 +564,10 @@ class FunctionalTest extends WebTestCase
|
||||
public function testCustomOperationId()
|
||||
{
|
||||
$operation = $this->getOperation('/api/custom-operation-id', 'get');
|
||||
$this->assertEquals('custom-operation-id', $operation->operationId);
|
||||
$this->assertEquals('get-custom-operation-id', $operation->operationId);
|
||||
|
||||
$operation = $this->getOperation('/api/custom-operation-id', 'post');
|
||||
$this->assertEquals('custom-operation-id', $operation->operationId);
|
||||
$this->assertEquals('post-custom-operation-id', $operation->operationId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -15,7 +15,7 @@ trait SetsContextTrait
|
||||
// zircote/swagger-php ^3.2
|
||||
\OpenApi\Analyser::$context = $context;
|
||||
} else {
|
||||
/// zircote/swagger-php ^4.0
|
||||
// zircote/swagger-php ^4.0
|
||||
\OpenApi\Generator::$context = $context;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user