for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace App\Infrastructure\IO\Http\Home\GetIndex;
use OpenApi\Annotations as OA;
use Psr\Http\Message\ResponseInterface;
use Yiisoft\DataResponse\DataResponseFactoryInterface;
/**
* @OA\Info(title="Yii API application", version="1.0")
*
* @OA\Get(
* path="/",
* summary="Returns info about the API",
* description="",
* @OA\Response(
* response="200",
* description="Success",
* @OA\JsonContent(
* allOf={
* @OA\Schema(ref="#/components/schemas/Response"),
* @OA\Schema(
* @OA\Property(
* property="data",
* type="object",
* property="version",
* type="string",
* example="3.0"
* ),
* property="author",
* example="yiisoft"
* },
* )
*/
final class Action
{
public function __invoke(DataResponseFactoryInterface $responseFactory): ResponseInterface
return $responseFactory->createResponse([
'version' => '3.0',
'author' => 'yiisoft',
]);
}