Skip to content

Commit 5904f7c

Browse files
author
LDFOUR\luisd
committed
Merge branch 'develop' into feature/WN-280
2 parents fdd5b3e + f78b9a8 commit 5904f7c

10 files changed

Lines changed: 257 additions & 129 deletions

File tree

app/Http/Controllers/ApplicationController.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ public function __construct(
6666
* tags={"Applications"},
6767
* summary="Get all applications for a user",
6868
* operationId="getAllForUser",
69+
* security={},
70+
* deprecated=true,
6971
* @OA\Parameter(
7072
* name="userId",
7173
* in="query",
@@ -121,6 +123,8 @@ public function getAllForUser(Request $request)
121123
* tags={"Applications"},
122124
* summary="Get an application by ID",
123125
* operationId="getApplicationById",
126+
* security={},
127+
* deprecated=true,
124128
* @OA\Parameter(
125129
* name="id",
126130
* in="path",
@@ -177,6 +181,8 @@ public function getById($id)
177181
* tags={"Applications"},
178182
* summary="Create a new application",
179183
* operationId="createApplication",
184+
* security={},
185+
* deprecated=true,
180186
* @OA\RequestBody(
181187
* required=true,
182188
* @OA\JsonContent(
@@ -236,6 +242,8 @@ public function create(Request $request)
236242
* tags={"Applications"},
237243
* summary="Update an application by ID",
238244
* operationId="updateApplication",
245+
* security={},
246+
* deprecated=true,
239247
* @OA\Parameter(
240248
* name="id",
241249
* in="path",
@@ -294,6 +302,8 @@ public function update(Request $request, $id)
294302
* tags={"Applications"},
295303
* summary="Delete an application by ID",
296304
* operationId="deleteApplication",
305+
* security={},
306+
* deprecated=true,
297307
* @OA\Parameter(
298308
* name="id",
299309
* in="path",

app/Http/Controllers/FileUploadController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ class FileUploadController extends Controller
1919
* tags={"Whatnow"},
2020
* summary="Upload a file",
2121
* operationId="uploadFile",
22+
* security={},
23+
* deprecated=true,
2224
* @OA\RequestBody(
2325
* required=true,
2426
* @OA\MediaType(

app/Http/Controllers/OrganisationController.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function __construct(
5151
/**
5252
* @OA\Get(
5353
* path="/org",
54-
* summary="Get all organisations",
54+
* summary="Get all organisations (public)",
5555
* security={{"ApiKeyAuth": {}}},
5656
* tags={"Organisation"},
5757
* @OA\Response(
@@ -99,7 +99,7 @@ public function getAll(Request $request)
9999
/**
100100
* @OA\Get(
101101
* path="/org/{code}",
102-
* summary="Get organisation by country code",
102+
* summary="Get organisation by country code (public)",
103103
* tags={"Organisation"},
104104
* security={{"ApiKeyAuth": {}}},
105105
* @OA\Parameter(
@@ -152,6 +152,8 @@ public function getById($code, Request $request)
152152
* path="/org/{code}",
153153
* tags={"Organisation"},
154154
* summary="Update an organisation by its country code",
155+
* security={},
156+
* deprecated=true,
155157
* description="Updates the details of an organisation based on the provided country code.",
156158
* operationId="OrganisationController@putById",
157159
* @OA\Parameter(

app/Http/Controllers/RegionController.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ public function __construct(
4343
* tags={"Regions"},
4444
* summary="Create a new region",
4545
* operationId="createRegion",
46+
* security={},
47+
* deprecated=true,
4648
* @OA\RequestBody(
4749
* required=true,
4850
* @OA\JsonContent(
@@ -132,6 +134,8 @@ public function createRegion(Request $request)
132134
* tags={"Regions"},
133135
* summary="Update an existing region",
134136
* operationId="updateRegion",
137+
* security={},
138+
* deprecated=true,
135139
* @OA\Parameter(
136140
* name="regionId",
137141
* in="path",
@@ -219,6 +223,8 @@ public function updateRegion(Request $request, $regionId)
219223
* path="/regions/{country_code}",
220224
* summary="Get all regions for a specific organisation by country code",
221225
* tags={"Regions"},
226+
* security={},
227+
* deprecated=true,
222228
* @OA\Parameter(
223229
* name="country_code",
224230
* in="path",
@@ -273,6 +279,8 @@ public function getAllForOrganisation($country_code)
273279
* path="/regions/{country_code}/{code}",
274280
* summary="Get regions for a specific organisation by country code and language code",
275281
* tags={"Regions"},
282+
* security={},
283+
* deprecated=true,
276284
* @OA\Parameter(
277285
* name="country_code",
278286
* in="path",
@@ -333,6 +341,8 @@ public function getForCountryCode($country_code, $code)
333341
* tags={"Regions"},
334342
* summary="Delete a region",
335343
* operationId="deleteRegion",
344+
* security={},
345+
* deprecated=true,
336346
* @OA\Parameter(
337347
* name="regionId",
338348
* in="path",
@@ -372,6 +382,8 @@ public function deleteRegion($regionId)
372382
* tags={"Regions"},
373383
* summary="Delete a region translation",
374384
* operationId="deleteTranslation",
385+
* security={},
386+
* deprecated=true,
375387
* @OA\Parameter(
376388
* name="translationId",
377389
* in="path",

app/Http/Controllers/UsageLogController.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ public function __construct(ApplicationRepositoryInterface $applicationRepo, Usa
5252
* tags={"UsageLogs"},
5353
* summary="Get application usage logs",
5454
* operationId="getApplicationLogs",
55+
* security={},
56+
* deprecated=true,
5557
* @OA\Parameter(
5658
* name="fromDate",
5759
* in="query",
@@ -126,6 +128,8 @@ public function getApplicationLogs(Request $request)
126128
* tags={"UsageLogs"},
127129
* summary="Get endpoint usage logs",
128130
* operationId="getEndpointLogs",
131+
* security={},
132+
* deprecated=true,
129133
* @OA\Parameter(
130134
* name="fromDate",
131135
* in="query",
@@ -198,6 +202,8 @@ public function getEndpointLogs(Request $request)
198202
* tags={"UsageLogs"},
199203
* summary="Export usage logs as CSV",
200204
* operationId="exportUsageLogs",
205+
* security={},
206+
* deprecated=true,
201207
* @OA\Parameter(
202208
* name="fromDate",
203209
* in="query",
@@ -306,6 +312,8 @@ public function getForApplication(int $applicationId)
306312
* tags={"UsageLogs"},
307313
* summary="Get usage log totals",
308314
* operationId="getTotals",
315+
* security={},
316+
* deprecated=true,
309317
* @OA\Parameter(
310318
* name="society",
311319
* in="query",

app/Http/Controllers/WhatNowController.php

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function __construct(
9393
* @OA\Get(
9494
* path="/whatnow/{id}",
9595
* tags={"Whatnow"},
96-
* summary="Obtiene un recurso publicado por ID",
96+
* summary="Obtiene un recurso publicado por ID (public)",
9797
* description="Retorna los detalles de un recurso publicado basado en el ID proporcionado.",
9898
* operationId="getPublishedById",
9999
* security={{"ApiKeyAuth": {}}},
@@ -159,6 +159,8 @@ public function getPublishedById($id)
159159
* tags={"Whatnow"},
160160
* summary="Get the latest revision of a WhatNow entity by ID",
161161
* operationId="getLatestById",
162+
* security={},
163+
* deprecated=true,
162164
* @OA\Parameter(
163165
* name="id",
164166
* in="path",
@@ -214,6 +216,8 @@ public function getLatestById($id)
214216
* tags={"Whatnow"},
215217
* summary="Delete a WhatNow entity by ID",
216218
* operationId="deleteById",
219+
* security={},
220+
* deprecated=true,
217221
* @OA\Parameter(
218222
* name="id",
219223
* in="path",
@@ -260,7 +264,7 @@ public function deleteById($id)
260264
* @OA\Get(
261265
* path="/org/{code}/whatnow",
262266
* tags={"Whatnow"},
263-
* summary="Get a feed of WhatNow entities for a specific organisation",
267+
* summary="Get a feed of WhatNow entities for a specific organisation (public)",
264268
* operationId="getFeed",
265269
* security={{"ApiKeyAuth": {}}},
266270
* @OA\Parameter(
@@ -364,6 +368,8 @@ protected function changeLogStatus($status){
364368
* tags={"Whatnow"},
365369
* summary="Get the latest revisions for a country code",
366370
* operationId="getLatestForCountryCode",
371+
* security={},
372+
* deprecated=true,
367373
* @OA\Parameter(
368374
* name="code",
369375
* in="path",
@@ -416,6 +422,8 @@ public function getLatestForCountryCode($code)
416422
* tags={"Whatnow"},
417423
* summary="Get the latest revisions for a specific region",
418424
* operationId="getLatestForRegion",
425+
* security={},
426+
* deprecated=true,
419427
* @OA\Parameter(
420428
* name="code",
421429
* in="path",
@@ -501,6 +509,8 @@ public function getAllRevisions()
501509
* tags={"Whatnow"},
502510
* summary="Create a new WhatNow entity",
503511
* operationId="createWhatNowEntity",
512+
* security={},
513+
* deprecated=true,
504514
* @OA\RequestBody(
505515
* required=true,
506516
* @OA\JsonContent(
@@ -629,6 +639,8 @@ public function post()
629639
* tags={"Whatnow"},
630640
* summary="Update a WhatNow entity by ID",
631641
* operationId="putById",
642+
* deprecated=true,
643+
* security={},
632644
* @OA\Parameter(
633645
* name="id",
634646
* in="path",
@@ -678,22 +690,22 @@ public function putById($id)
678690
]);
679691
}
680692

681-
try {
682-
$this->validate($this->request, [
683-
'countryCode' => 'alpha|size:3',
684-
'eventType' => 'string|max:50',
685-
'regionName' => 'nullable|string',
686-
'translations' => 'array',
687-
'translations.*.webUrl' => 'nullable|string',
688-
'translations.*.lang' => 'alpha|size:2',
689-
'translations.*.title' => 'string',
690-
'translations.*.description' => 'string',
691-
]);
692-
} catch (ValidationException $e) {
693-
Log::info($e->getMessage());
694-
695-
return $e->getResponse();
696-
}
693+
// try {
694+
// $this->validate($this->request, [
695+
// 'countryCode' => 'alpha|size:3',
696+
// 'eventType' => 'string|max:50',
697+
// 'regionName' => 'nullable|string',
698+
// 'translations' => 'array',
699+
// 'translations.*.webUrl' => 'nullable|string',
700+
// 'translations.*.lang' => 'alpha|size:2',
701+
// 'translations.*.title' => 'string',
702+
// 'translations.*.description' => 'string',
703+
// ]);
704+
// } catch (ValidationException $e) {
705+
// Log::info($e->getMessage());
706+
707+
// return $e->getResponse();
708+
// }
697709

698710
try {
699711
$org = $this->orgRepo->findByCountryCode($this->request->input('countryCode'));
@@ -755,6 +767,8 @@ public function putById($id)
755767
* tags={"Whatnow"},
756768
* summary="Create a new translation for a WhatNow entity",
757769
* operationId="createNewTranslation",
770+
* deprecated=true,
771+
* security={},
758772
* @OA\Parameter(
759773
* name="id",
760774
* in="path",
@@ -844,6 +858,8 @@ public function createNewTranslation($id)
844858
* tags={"Whatnow"},
845859
* summary="Update the published status of a translation",
846860
* operationId="patchTranslation",
861+
* deprecated=true,
862+
* security={},
847863
* @OA\Parameter(
848864
* name="id",
849865
* in="path",
@@ -927,6 +943,8 @@ public function patchTranslation($id, $translationId)
927943
* tags={"Whatnow"},
928944
* summary="Publish translations by IDs",
929945
* operationId="publishTranslationsByIds",
946+
* deprecated=true,
947+
* security={},
930948
* @OA\RequestBody(
931949
* required=true,
932950
* @OA\JsonContent(

0 commit comments

Comments
 (0)