diff --git a/app/Config/routes.yaml b/app/Config/routes.yaml index 73951d3..b9f40c9 100644 --- a/app/Config/routes.yaml +++ b/app/Config/routes.yaml @@ -2,19 +2,23 @@ api_init: uri: /api/init controller: Controller\api\InitController httpMethod: [GET] +doc: + uri: /doc + controller: Controller\DocController + httpMethod: [GET] api_stations: uri: /api/stations controller: Controller\api\Station\StationsController httpMethod: [GET] api_station_id: - uri: /api/station/{id} + uri: '/api/station/{id}' controller: Controller\api\Station\StationIdController httpMethod: [GET] api_station_id_status: - uri: /api/station/{id}/status + uri: '/api/station/{id}/status' controller: Controller\api\Station\StationStatusIdController httpMethod: [GET] api_stations_status: uri: /api/stations/status controller: Controller\api\Status\StationsStatusController - httpMethod: [GET] \ No newline at end of file + httpMethod: [GET] diff --git a/app/Controller/DocController.php b/app/Controller/DocController.php new file mode 100644 index 0000000..7c2ba75 --- /dev/null +++ b/app/Controller/DocController.php @@ -0,0 +1,18 @@ +render('api/redoc.html'); + } +} diff --git a/app/Template/api/redoc.html b/app/Template/api/redoc.html new file mode 100644 index 0000000..0f3db5d --- /dev/null +++ b/app/Template/api/redoc.html @@ -0,0 +1,350 @@ + + + + + + API VELIKO + + + + + + + + + +

API VELIKO (0.1)

Download OpenAPI specification:Download

51ddec15bed83501644f9a96223ed94d

Responses

98fe142cc67ad17ce9be40641bff0dea

path Parameters
id
required
integer

Responses

Response samples

Content type
application/json
{
  • "station_id": 213688169,
  • "stationCode": "16107",
  • "name": "Benjamin Godard - Victor Hugo",
  • "lat": 48.865983,
  • "lon": 2.275725,
  • "capacity": 35
}

c88d3fde4f65bdeed4135502b0017ee5

path Parameters
id
required
integer

Responses

b28855f9a0f755f01567d1fb013b74ea

Responses

e3c3f3783a3d3afe64f892666af66315

Responses

+ + + +