Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/#82-student-bootcamp-detail-endppoint #93

Merged
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
13e47ce
+ endpoint route
AlejandroNPereyra Feb 28, 2024
32bfc8f
+ bootcamp detail controller
AlejandroNPereyra Feb 28, 2024
be0de87
+ swagger doc
AlejandroNPereyra Feb 28, 2024
a34b75f
Merge branch 'develop' into feature/#82-student-bootcamp-detail-endpp…
AlejandroNPereyra Feb 28, 2024
f224f69
+ route fix
AlejandroNPereyra Feb 28, 2024
89119fe
+ student id/uuid fix
AlejandroNPereyra Feb 29, 2024
5d5af21
+ array fields fix
AlejandroNPereyra Mar 5, 2024
a10e7d7
+ swagger doc fix
AlejandroNPereyra Mar 5, 2024
2320744
fix: run composer update
jordimorillo Mar 5, 2024
676c4b0
feature: update phpunit tests when a PR is created or updated
jordimorillo Mar 5, 2024
bbb3a73
feature: remove .env.example from environment files
jordimorillo Mar 5, 2024
974274f
feature: add a .env.example to hold environment data
jordimorillo Mar 5, 2024
ca82c05
fix: update pr action to migrate fresh the database
jordimorillo Mar 5, 2024
edfd466
fix: put the application in testing mode
jordimorillo Mar 5, 2024
a0d1bb7
fix: replace connection variables
jordimorillo Mar 5, 2024
0c6ef68
fix: remove the .env.example file
jordimorillo Mar 5, 2024
5b7e019
wip
jordimorillo Mar 5, 2024
5e0651c
Merge branch 'develop' into feature/#82-student-bootcamp-detail-endpp…
jordimorillo Mar 5, 2024
6e12fb1
fix: move key generation
jordimorillo Mar 6, 2024
525b6bf
fix: move key generation
jordimorillo Mar 6, 2024
e5eea09
fix: add an APP_KEY key in .env file
jordimorillo Mar 6, 2024
a51140d
fix: remove tests that are deprecated
jordimorillo Mar 6, 2024
cd53e1c
wip
jordimorillo Mar 6, 2024
75ab3eb
wip
jordimorillo Mar 6, 2024
febe783
wip
jordimorillo Mar 6, 2024
6410bb1
wip
jordimorillo Mar 6, 2024
4e0e6b8
wip
jordimorillo Mar 6, 2024
723e83a
Merge branch 'develop' into feature/#82-student-bootcamp-detail-endpp…
AlejandroNPereyra Mar 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?php

namespace App\Annotations\OpenApi\controllersAnnotations\studentBootcampDetailAnnotations;


use OpenApi\Annotations as OA;

class AnnotationsStudentBootcampDetail
{
/**
* @OA\Get(
* path="/api/v1/students/{uuid}/bootcamp",
* operationId="getStudentBootcamp",
* tags={"Bootcamp"},
* summary="Get a detailed list of a student bootcamp",
* description="Returns detail for a specific student bootcamp. (Note: This endpoint returns hardcoded bootcamp details)",
* @OA\Parameter(
* name="uuid",
* description="Student UUID",
* required=true,
* in="path",
* @OA\Schema(
* type="string",
* format="uuid"
* )
* ),
* @OA\Response(
* response=200,
* description="Successful operation",
* @OA\JsonContent(
* type="array",
* @OA\Items(
* type="object",
* @OA\Property(
* property="bootcamp_id",
* type="string",
* description="Bootcamp ID"
* ),
* @OA\Property(
* property="bootcamp_name",
* type="string",
* description="Bootcamp Name"

* ),
* @OA\Property(
* property="bootcamp_end_date",
* type="array",
* @OA\Items(type="string"),
* description="Bootcamp end date"
* )
* )
* )
* ),
* @OA\Response(
* response=404,
* description="Student not found"
* )
* )
*/

public function __invoke() {}
}
27 changes: 27 additions & 0 deletions app/Http/Controllers/api/StudentBootcampDetailController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

namespace App\Http\Controllers\api;

use App\Http\Controllers\Controller;
use App\Models\Student;

class StudentBootcampDetailController extends Controller
{
public function __invoke($uuid)
{
Student::where('id', $uuid)->firstOrFail();

$bootcamp_detail = [

'bootcamp' => [
[
'bootcamp_id' => '1',
'bootcamp_name' => 'php Fullstack Developer',
'bootcamp_end_date' => ['November 2023'],
],
]
];

return response()->json($bootcamp_detail);
}
}
Loading
Loading