swagger level list
This commit is contained in:
parent
7f46dc1346
commit
4c85beb0ca
@ -2,6 +2,8 @@
|
||||
|
||||
namespace frontend\modules\api\controllers;
|
||||
|
||||
use common\models\User;
|
||||
use common\models\UserCard;
|
||||
use common\services\ProfileService;
|
||||
use yii\helpers\ArrayHelper;
|
||||
use yii\web\BadRequestHttpException;
|
||||
@ -22,6 +24,7 @@ class ProfileController extends ApiController
|
||||
'profile-with-report-permission' => ['post', 'patch'],
|
||||
'get-main-data' => ['get'],
|
||||
'positions-list' => ['get'],
|
||||
'level-list' => ['get'],
|
||||
],
|
||||
]
|
||||
]);
|
||||
@ -82,4 +85,30 @@ class ProfileController extends ApiController
|
||||
{
|
||||
return ProfileService::getPositionsList();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @OA\Get(path="/profile/level-list",
|
||||
* summary="Список уровней навыков",
|
||||
* description="Получить список всех возможных уровней навыков",
|
||||
* tags={"Profile"},
|
||||
* security={
|
||||
* {"bearerAuth": {}}
|
||||
* },
|
||||
* @OA\Response(
|
||||
* response=200,
|
||||
* description="Возвращает массив позиций",
|
||||
* @OA\MediaType(
|
||||
* mediaType="application/json",
|
||||
* ),
|
||||
*
|
||||
* ),
|
||||
* )
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function actionLevelList(): array
|
||||
{
|
||||
return UserCard::getLevelList();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user