@@ -60,12 +60,11 @@ class NotificationController extends Controller
6060 * @OA\Property(
6161 * property="data",
6262 * type="array",
63- * @OA\Items(ref="#/components/schemas/notifications "),
63+ * @OA\Items(ref="#/components/schemas/Notification "),
6464 * ),
6565 * @OA\Property(
6666 * property="meta",
67- * type="object",
68- * allOf={@OA\Schema(ref="#/components/schemas/metadata")},
67+ * @OA\Schema(ref="#/components/schemas/metadata"),
6968 * ),
7069 * ),
7170 * ),
@@ -139,12 +138,12 @@ public function index(Request $request)
139138 * tags={"Notifications"},
140139 * @OA\RequestBody(
141140 * required=true,
142- * @OA\JsonContent(ref="#/components/schemas/notificationsEditable ")
141+ * @OA\JsonContent(ref="#/components/schemas/NotificationEditable ")
143142 * ),
144143 * @OA\Response(
145144 * response=201,
146145 * description="success",
147- * @OA\JsonContent(ref="#/components/schemas/notifications ")
146+ * @OA\JsonContent(ref="#/components/schemas/Notification ")
148147 * ),
149148 * )
150149 */
@@ -184,7 +183,7 @@ public function store(Request $request)
184183 * @OA\Response(
185184 * response=200,
186185 * description="Successfully found the notification",
187- * @OA\JsonContent(ref="#/components/schemas/notifications ")
186+ * @OA\JsonContent(ref="#/components/schemas/Notification ")
188187 * ),
189188 * )
190189 */
@@ -219,7 +218,7 @@ public function show(Notification $notification)
219218 * ),
220219 * @OA\RequestBody(
221220 * required=true,
222- * @OA\JsonContent(ref="#/components/schemas/notificationsEditable ")
221+ * @OA\JsonContent(ref="#/components/schemas/NotificationEditable ")
223222 * ),
224223 * @OA\Response(
225224 * response=204,
@@ -230,6 +229,7 @@ public function show(Notification $notification)
230229 public function update (Notification $ notification , Request $ request )
231230 {
232231 $ request ->validate (Notification::rules ($ notification ));
232+ \Log::info ("UPDATE " , $ request ->input ());
233233 $ notification ->fill ($ request ->input ());
234234 $ notification ->saveOrFail ();
235235 return response ([], 204 );
@@ -271,15 +271,16 @@ public function destroy(Notification $notification)
271271
272272
273273 /**
274- * Update notifications
274+ * Update notification as read
275275 *
276276 * @param Request $request
277277 *
278278 * @return Response
279279 *
280- * @OA\Put(
280+ * @OA\Put(
281281 * path="/read_notifications",
282282 * summary="Mark notifications as read by the user",
283+ * operationId="markNotificationAsRead",
283284 * tags={"Notifications"},
284285 *
285286 * @OA\RequestBody(
@@ -322,9 +323,10 @@ public function updateAsRead(Request $request)
322323 *
323324 * @return Response
324325 *
325- * @OA\Put(
326+ * @OA\Put(
326327 * path="/unread_notifications",
327328 * summary="Mark notifications as unread by the user",
329+ * operationId="markNotificationAsUnread",
328330 * tags={"Notifications"},
329331 *
330332 * @OA\RequestBody(
@@ -377,18 +379,19 @@ public function updateAsUnread(Request $request)
377379 * @OA\Put(
378380 * path="/read_all_notifications",
379381 * summary="Mark notifications as read by id and type",
382+ * operationId="markAllAsRead",
380383 * tags={"Notifications"},
381384 *
382385 * @OA\RequestBody(
383386 * required=true,
384387 * @OA\JsonContent(
385388 * @OA\Property(
386- * property="notifiable_id ",
389+ * property="id ",
387390 * type="integer",
388391 * description="Polymorphic relation id",
389392 * @OA\Items (type="integer")),
390393 * @OA\Property(
391- * property="notifiable_type ",
394+ * property="type ",
392395 * type="string",
393396 * description="Polymorphic relation type",
394397 * @OA\Items (type="string"))
0 commit comments