* @OA\Info( * title="Provides platform version information", * version="0.1.0", * @OA\License(name="GPL-2.0-only") * ) */ class tao_actions_RestVersion extends tao_actions_RestClass { /** * @OA\Get( * path="/tao/RestVersion", * operationId="getVersion", * tags={"platform"}, * @OA\Response( * response="200", * description="Returns current platform version", * * @OA\MediaType( * mediaType="application/json", * @OA\Schema( * example={ * "version": "3.3.0-sprint97", * } * ) * ), * ), * ) */ public function index() { if ($this->getRequest()->isGet()) { return $this->returnJson([ 'version' => TAO_VERSION ]); } throw new common_exception_RestApi(); } }