mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
OPENApi documentation
This commit is contained in:
parent
a6967892ea
commit
1db8b53128
@ -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())
|
||||
|
Loading…
x
Reference in New Issue
Block a user