2019-04-10 04:46:51 +00:00
|
|
|
<?php
|
|
|
|
namespace App\Controller\Api\Stations;
|
|
|
|
|
|
|
|
use App\Entity;
|
|
|
|
use App\Http\Request;
|
|
|
|
use OpenApi\Annotations as OA;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @see \App\Provider\ApiProvider
|
|
|
|
*/
|
2019-04-14 03:19:24 +00:00
|
|
|
class RemotesController extends AbstractStationApiCrudController
|
2019-04-10 04:46:51 +00:00
|
|
|
{
|
|
|
|
protected $entityClass = Entity\StationRemote::class;
|
|
|
|
protected $resourceRouteName = 'api:stations:remote';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @OA\Get(path="/station/{station_id}/remotes",
|
|
|
|
* tags={"Stations: Remote Relays"},
|
|
|
|
* description="List all current remote relays.",
|
|
|
|
* @OA\Parameter(ref="#/components/parameters/station_id_required"),
|
|
|
|
* @OA\Response(response=200, description="Success",
|
|
|
|
* @OA\JsonContent(type="array", @OA\Items(ref="#/components/schemas/StationRemote"))
|
|
|
|
* ),
|
|
|
|
* @OA\Response(response=403, description="Access denied"),
|
|
|
|
* security={{"api_key": {}}},
|
|
|
|
* )
|
|
|
|
*
|
|
|
|
* @OA\Post(path="/station/{station_id}/remotes",
|
|
|
|
* tags={"Stations: Remote Relays"},
|
|
|
|
* description="Create a new remote relay.",
|
|
|
|
* @OA\Parameter(ref="#/components/parameters/station_id_required"),
|
|
|
|
* @OA\RequestBody(
|
|
|
|
* @OA\JsonContent(ref="#/components/schemas/StationRemote")
|
|
|
|
* ),
|
|
|
|
* @OA\Response(response=200, description="Success",
|
|
|
|
* @OA\JsonContent(ref="#/components/schemas/StationRemote")
|
|
|
|
* ),
|
|
|
|
* @OA\Response(response=403, description="Access denied"),
|
|
|
|
* security={{"api_key": {}}},
|
|
|
|
* )
|
|
|
|
*
|
|
|
|
* @OA\Get(path="/station/{station_id}/remote/{id}",
|
|
|
|
* tags={"Stations: Remote Relays"},
|
|
|
|
* description="Retrieve details for a single remote relay.",
|
|
|
|
* @OA\Parameter(ref="#/components/parameters/station_id_required"),
|
|
|
|
* @OA\Parameter(
|
|
|
|
* name="id",
|
|
|
|
* in="path",
|
2019-04-13 03:27:58 +00:00
|
|
|
* description="Remote Relay ID",
|
2019-04-10 04:46:51 +00:00
|
|
|
* required=true,
|
|
|
|
* @OA\Schema(type="integer", format="int64")
|
|
|
|
* ),
|
|
|
|
* @OA\Response(response=200, description="Success",
|
|
|
|
* @OA\JsonContent(ref="#/components/schemas/StationRemote")
|
|
|
|
* ),
|
|
|
|
* @OA\Response(response=403, description="Access denied"),
|
|
|
|
* security={{"api_key": {}}},
|
|
|
|
* )
|
|
|
|
*
|
|
|
|
* @OA\Put(path="/station/{station_id}/remote/{id}",
|
|
|
|
* tags={"Stations: Remote Relays"},
|
|
|
|
* description="Update details of a single remote relay.",
|
|
|
|
* @OA\RequestBody(
|
|
|
|
* @OA\JsonContent(ref="#/components/schemas/StationRemote")
|
|
|
|
* ),
|
|
|
|
* @OA\Parameter(ref="#/components/parameters/station_id_required"),
|
|
|
|
* @OA\Parameter(
|
|
|
|
* name="id",
|
|
|
|
* in="path",
|
2019-04-13 03:27:58 +00:00
|
|
|
* description="Remote Relay ID",
|
2019-04-10 04:46:51 +00:00
|
|
|
* required=true,
|
|
|
|
* @OA\Schema(type="integer", format="int64")
|
|
|
|
* ),
|
|
|
|
* @OA\Response(response=200, description="Success",
|
|
|
|
* @OA\JsonContent(ref="#/components/schemas/Api_Status")
|
|
|
|
* ),
|
|
|
|
* @OA\Response(response=403, description="Access denied"),
|
|
|
|
* security={{"api_key": {}}},
|
|
|
|
* )
|
|
|
|
*
|
|
|
|
* @OA\Delete(path="/station/{station_id}/remote/{id}",
|
|
|
|
* tags={"Stations: Remote Relays"},
|
|
|
|
* description="Delete a single remote relay.",
|
|
|
|
* @OA\Parameter(ref="#/components/parameters/station_id_required"),
|
|
|
|
* @OA\Parameter(
|
|
|
|
* name="id",
|
|
|
|
* in="path",
|
2019-04-13 03:27:58 +00:00
|
|
|
* description="Remote Relay ID",
|
2019-04-10 04:46:51 +00:00
|
|
|
* required=true,
|
|
|
|
* @OA\Schema(type="integer", format="int64")
|
|
|
|
* ),
|
|
|
|
* @OA\Response(response=200, description="Success",
|
|
|
|
* @OA\JsonContent(ref="#/components/schemas/Api_Status")
|
|
|
|
* ),
|
|
|
|
* @OA\Response(response=403, description="Access denied"),
|
|
|
|
* security={{"api_key": {}}},
|
|
|
|
* )
|
|
|
|
*/
|
|
|
|
}
|