diff --git a/app/Http/Controllers/PingController.php b/app/Http/Controllers/PingController.php index f32f9d697438..cd827e0dddc9 100644 --- a/app/Http/Controllers/PingController.php +++ b/app/Http/Controllers/PingController.php @@ -19,9 +19,26 @@ class PingController extends BaseController { /** - * Display a listing of the resource. + * Get a ping response from the system. * * @return \Illuminate\Http\Response + * + * @OA\Get( + * path="/api/v1/ping", + * operationId="getPing", + * tags={"ping"}, + * summary="Attempts to ping the API", + * description="Attempts to ping the API", + * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), + * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), + * @OA\Response( + * response=200, + * description="The company and user name", + * @OA\Header(header="X-MINIMUM-CLIENT-VERSION", ref="#/components/headers/X-MINIMUM-CLIENT-VERSION"), + * @OA\Header(header="X-RateLimit-Remaining", ref="#/components/headers/X-RateLimit-Remaining"), + * @OA\Header(header="X-RateLimit-Limit", ref="#/components/headers/X-RateLimit-Limit"), + * ) + * ) */ public function index() { @@ -31,6 +48,28 @@ class PingController extends BaseController ], 200); } + /** + * Get a health check of the system + * + * @return \Illuminate\Http\Response + * + * @OA\Get( + * path="/api/v1/health_check", + * operationId="getHealthCheck", + * tags={"health_check"}, + * summary="Attempts to get a health check from the API", + * description="Attempts to get a health check from the API", + * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), + * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), + * @OA\Response( + * response=200, + * description="A key/value map of the system health", + * @OA\Header(header="X-MINIMUM-CLIENT-VERSION", ref="#/components/headers/X-MINIMUM-CLIENT-VERSION"), + * @OA\Header(header="X-RateLimit-Remaining", ref="#/components/headers/X-RateLimit-Remaining"), + * @OA\Header(header="X-RateLimit-Limit", ref="#/components/headers/X-RateLimit-Limit"), + * ) + * ) + */ public function health() { if(Ninja::isNinja())