<?php

namespace api\modules\v1\controllers;

use yii\web\Controller;
use Yii;
use OpenApi\Annotations as OA;

/**
 * @OA\Tag(
 *   name="System",
 *   description="System endpoints"
 * )
 */
class PingController extends Controller
{
   /**
    * @OA\Get(
    *   path="/ping",
    *   tags={"System"},
    *   summary="Health check",
    *   @OA\Response(
    *     response=200,
    *     description="OK"
    *   )
    * )
    */
   public function actionIndex()
   {
      Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
      return ['pong' => true];
   }
}