Skip to content

Commit

Permalink
Added doco
Browse files Browse the repository at this point in the history
  • Loading branch information
ok200paul committed Jan 28, 2025
1 parent 871aa97 commit 5338460
Show file tree
Hide file tree
Showing 2 changed files with 887 additions and 498 deletions.
33 changes: 30 additions & 3 deletions app/Http/Controllers/Api/V1/ApiMyProfileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rules\Password;
use Knuckles\Scribe\Attributes\Authenticated;
use Knuckles\Scribe\Attributes\BodyParam;
use Knuckles\Scribe\Attributes\Endpoint;
use Knuckles\Scribe\Attributes\Group;
use Knuckles\Scribe\Attributes\QueryParam;
Expand Down Expand Up @@ -156,14 +157,40 @@ public function show(string $id)
}

/**
* PUT / {id}
*
* @hideFromAPIDocumentation
* PUT/ {id}
*
* @param string $id
*
* @return JsonResponse
*/
#[Endpoint(
title : 'PUT /{id}',
description : 'Update your profile.',
authenticated: true
)]
#[Authenticated]
#[BodyParam(
name : 'password',
type : 'string',
description: 'Your new password. Must conform to password validation requirements.',
required : false
)]
#[Response(
content : '{
"meta": {
"responseCode": 200,
"limit": 50,
"offset": 0,
"message": "",
"cached": true,
"cached_at": "2024-08-13 08:58:19",
"availableRelations": []
},
"data": {"id": 1234, "name": "Your name", "email":"you@yourdomain.com", "created_at": "2024-01-01 00:00:00"}
}',
status : 200,
description: ''
)]
public function update(string $id)
{
$validationArray = [
Expand Down
Loading

0 comments on commit 5338460

Please sign in to comment.