From 6753377ca312b364cd9ae5326596957084832302 Mon Sep 17 00:00:00 2001 From: pjaudiomv <34245618+pjaudiomv@users.noreply.github.com> Date: Wed, 5 Oct 2022 23:44:57 -0400 Subject: [PATCH] rename security schema to bmltToken (#697) --- .../Controllers/Admin/Swagger/Controller.php | 2 +- .../Admin/Swagger/FormatController.php | 12 ++--- .../Admin/Swagger/MeetingController.php | 12 ++--- .../Admin/Swagger/ServiceBodyController.php | 12 ++--- .../Admin/Swagger/TokenController.php | 4 +- .../Admin/Swagger/UserController.php | 12 ++--- src/storage/api-docs/api-docs.json | 54 +++++++++---------- 7 files changed, 54 insertions(+), 54 deletions(-) diff --git a/src/app/Http/Controllers/Admin/Swagger/Controller.php b/src/app/Http/Controllers/Admin/Swagger/Controller.php index fe8fd2468..c5464469d 100644 --- a/src/app/Http/Controllers/Admin/Swagger/Controller.php +++ b/src/app/Http/Controllers/Admin/Swagger/Controller.php @@ -13,7 +13,7 @@ * @OA\Server(url="https://{domain}", description="BMLT Admin API Custom Server", * @OA\ServerVariable(serverVariable="domain", default="") * ) - * @OA\SecurityScheme(securityScheme="oauth2", type="oauth2", + * @OA\SecurityScheme(securityScheme="bmltToken", type="oauth2", * @OA\Flow(flow="password", tokenUrl="api/v1/auth/token", refreshUrl="api/v1/auth/refresh", scopes={}) * ) */ diff --git a/src/app/Http/Controllers/Admin/Swagger/FormatController.php b/src/app/Http/Controllers/Admin/Swagger/FormatController.php index 34025aa0a..86bcbb933 100644 --- a/src/app/Http/Controllers/Admin/Swagger/FormatController.php +++ b/src/app/Http/Controllers/Admin/Swagger/FormatController.php @@ -40,7 +40,7 @@ class FormatController extends Controller { /** - * @OA\Get(path="/api/v1/formats", summary="Retrieves formats", description="Retrieve formats", operationId="getFormats", tags={"formats"}, security={{"oauth2":{}}}, + * @OA\Get(path="/api/v1/formats", summary="Retrieves formats", description="Retrieve formats", operationId="getFormats", tags={"formats"}, security={{"bmltToken":{}}}, * @OA\Response(response=200, description="Returns when user is authenticated.", * @OA\JsonContent(ref="#/components/schemas/FormatCollection") * ), @@ -54,7 +54,7 @@ public function index() } /** - * @OA\Get(path="/api/v1/formats/{formatId}", summary="Retrieves a format", description="Retrieve a format", operationId="getFormat", tags={"formats"}, security={{"oauth2":{}}}, + * @OA\Get(path="/api/v1/formats/{formatId}", summary="Retrieves a format", description="Retrieve a format", operationId="getFormat", tags={"formats"}, security={{"bmltToken":{}}}, * @OA\Parameter(description="ID of format", in="path", name="formatId", required=true, example="1", * @OA\Schema(type="integer", format="int64") * ), @@ -74,7 +74,7 @@ public function show() } /** - * @OA\Post(path="/api/v1/formats", summary="Creates a format", description="Creates a format.", operationId="createFormat", tags={"formats"}, security={{"oauth2":{}}}, + * @OA\Post(path="/api/v1/formats", summary="Creates a format", description="Creates a format.", operationId="createFormat", tags={"formats"}, security={{"bmltToken":{}}}, * @OA\RequestBody(required=true, description="Pass in format object", * @OA\JsonContent(ref="#/components/schemas/CreateFormat"), * ), @@ -100,7 +100,7 @@ public function store() } /** - * @OA\Put( path="/api/v1/formats/{formatId}", summary="Updates a format", description="Updates a format.", operationId="updateFormat", tags={"formats"}, security={{"oauth2":{}}}, + * @OA\Put( path="/api/v1/formats/{formatId}", summary="Updates a format", description="Updates a format.", operationId="updateFormat", tags={"formats"}, security={{"bmltToken":{}}}, * @OA\Parameter(description="ID of format", in="path", name="formatId", required=true, example="1", * @OA\Schema(type="integer", format="int64") * ), @@ -127,7 +127,7 @@ public function update() } /** - * @OA\Patch(path="/api/v1/formats/{formatId}", summary="Patches a format", description="Patches a single format by id.", operationId="patchFormat", tags={"formats"}, security={{"oauth2":{}}}, + * @OA\Patch(path="/api/v1/formats/{formatId}", summary="Patches a format", description="Patches a single format by id.", operationId="patchFormat", tags={"formats"}, security={{"bmltToken":{}}}, * @OA\Parameter(description="ID of format", in="path", name="formatId", required=true, example="1", * @OA\Schema(type="integer", format="int64") * ), @@ -154,7 +154,7 @@ public function partialUpdate() } /** - * @OA\Delete(path="/api/v1/formats/{formatId}", summary="Deletes a format", description="Deletes a format by id.", operationId="deleteFormat", tags={"formats"}, security={{"oauth2":{}}}, + * @OA\Delete(path="/api/v1/formats/{formatId}", summary="Deletes a format", description="Deletes a format by id.", operationId="deleteFormat", tags={"formats"}, security={{"bmltToken":{}}}, * @OA\Parameter(description="ID of format", in="path", name="formatId", required=true, example="1", * @OA\Schema(type="integer", format="int64") * ), diff --git a/src/app/Http/Controllers/Admin/Swagger/MeetingController.php b/src/app/Http/Controllers/Admin/Swagger/MeetingController.php index 2e71a09f4..1cd67f293 100644 --- a/src/app/Http/Controllers/Admin/Swagger/MeetingController.php +++ b/src/app/Http/Controllers/Admin/Swagger/MeetingController.php @@ -69,7 +69,7 @@ class MeetingController extends Controller { /** - * @OA\Get(path="/api/v1/meetings", summary="Retrieves meetings", description="Retrieve meetings for authenticated user.", operationId="getMeetings", tags={"meetings"}, security={{"oauth2":{}}}, + * @OA\Get(path="/api/v1/meetings", summary="Retrieves meetings", description="Retrieve meetings for authenticated user.", operationId="getMeetings", tags={"meetings"}, security={{"bmltToken":{}}}, * @OA\Parameter(description="comma delimited meeting ids", in="query", name="meetingIds", required=false, example="1,2", * @OA\Schema(type="string") * ), @@ -98,7 +98,7 @@ public function index() } /** - * @OA\Get(path="/api/v1/meetings/{meetingId}", summary="Retrieves a meeting", description="Retrieve a meeting.", operationId="getMeeting", tags={"meetings"}, security={{"oauth2":{}}}, + * @OA\Get(path="/api/v1/meetings/{meetingId}", summary="Retrieves a meeting", description="Retrieve a meeting.", operationId="getMeeting", tags={"meetings"}, security={{"bmltToken":{}}}, * @OA\Parameter(description="ID of meeting", in="path", name="meetingId", required=true, example="1", * @OA\Schema(type="integer",format="int64") * ), @@ -118,7 +118,7 @@ public function show() } /** - * @OA\Post(path="/api/v1/meetings", summary="Creates a meeting", description="Creates a meeting.", operationId="createMeeting", tags={"meetings"}, security={{"oauth2":{}}}, + * @OA\Post(path="/api/v1/meetings", summary="Creates a meeting", description="Creates a meeting.", operationId="createMeeting", tags={"meetings"}, security={{"bmltToken":{}}}, * @OA\RequestBody(required=true, description="Pass in meeting object", * @OA\JsonContent(ref="#/components/schemas/CreateMeeting"), * ), @@ -144,7 +144,7 @@ public function store() } /** - * @OA\Put(path="/api/v1/meetings/{meetingId}", summary="Updates a meeting", description="Updates a meeting.", operationId="updateMeeting", tags={"meetings"}, security={{"oauth2":{}}}, + * @OA\Put(path="/api/v1/meetings/{meetingId}", summary="Updates a meeting", description="Updates a meeting.", operationId="updateMeeting", tags={"meetings"}, security={{"bmltToken":{}}}, * @OA\Parameter(description="ID of meeting",in="path", name="meetingId", required=true, example="1", * @OA\Schema(type="integer", format="int64") * ), @@ -171,7 +171,7 @@ public function update() } /** - * @OA\Patch(path="/api/v1/meetings/{meetingId}", summary="Patches a meeting", description="Patches a meeting by id", operationId="patchMeeting", tags={"meetings"}, security={{"oauth2":{}}}, + * @OA\Patch(path="/api/v1/meetings/{meetingId}", summary="Patches a meeting", description="Patches a meeting by id", operationId="patchMeeting", tags={"meetings"}, security={{"bmltToken":{}}}, * @OA\Parameter(description="ID of meeting", in="path", name="meetingId", required=true, example="1", * @OA\Schema(type="integer", format="int64") * ), @@ -198,7 +198,7 @@ public function partialUpdate() } /** - * @OA\Delete(path="/api/v1/meetings/{meetingId}", summary="Deletes a meeting", description="Deletes a meeting by id.", operationId="deleteMeeting", tags={"meetings"}, security={{"oauth2":{}}}, + * @OA\Delete(path="/api/v1/meetings/{meetingId}", summary="Deletes a meeting", description="Deletes a meeting by id.", operationId="deleteMeeting", tags={"meetings"}, security={{"bmltToken":{}}}, * @OA\Parameter(description="ID of meeting", in="path", name="meetingId", required=true, example="1", * @OA\Schema(type="integer", format="int64") * ), diff --git a/src/app/Http/Controllers/Admin/Swagger/ServiceBodyController.php b/src/app/Http/Controllers/Admin/Swagger/ServiceBodyController.php index d200b1b6d..7f1351a42 100644 --- a/src/app/Http/Controllers/Admin/Swagger/ServiceBodyController.php +++ b/src/app/Http/Controllers/Admin/Swagger/ServiceBodyController.php @@ -41,7 +41,7 @@ class ServiceBodyController extends Controller { /** - * @OA\Get(path="/api/v1/servicebodies", summary="Retrieves service bodies", description="Retrieve service bodies for authenticated user.", operationId="getServiceBodies", tags={"servicebodies"}, security={{"oauth2":{}}}, + * @OA\Get(path="/api/v1/servicebodies", summary="Retrieves service bodies", description="Retrieve service bodies for authenticated user.", operationId="getServiceBodies", tags={"servicebodies"}, security={{"bmltToken":{}}}, * @OA\Response(response=200, description="Returns when user is authenticated.", * @OA\JsonContent(ref="#/components/schemas/ServiceBodyCollection") * ), @@ -55,7 +55,7 @@ public function index() } /** - * @OA\Get(path="/api/v1/servicebodies/{serviceBodyId}", summary="Retrieves a service body", description="Retrieve a single service body by id.", operationId="getServiceBody", tags={"servicebodies"}, security={{"oauth2":{}}}, + * @OA\Get(path="/api/v1/servicebodies/{serviceBodyId}", summary="Retrieves a service body", description="Retrieve a single service body by id.", operationId="getServiceBody", tags={"servicebodies"}, security={{"bmltToken":{}}}, * @OA\Parameter(description="ID of service body", in="path", name="serviceBodyId", required=true, example="1", * @OA\Schema(type="integer", format="int64") * ), @@ -75,7 +75,7 @@ public function show() } /** - * @OA\Post(path="/api/v1/servicebodies", summary="Creates a service body", description="Creates a service body.", operationId="createServiceBody", tags={"servicebodies"}, security={{"oauth2":{}}}, + * @OA\Post(path="/api/v1/servicebodies", summary="Creates a service body", description="Creates a service body.", operationId="createServiceBody", tags={"servicebodies"}, security={{"bmltToken":{}}}, * @OA\RequestBody(required=true, description="Pass in service body object", * @OA\JsonContent(ref="#/components/schemas/CreateServiceBody"), * ), @@ -101,7 +101,7 @@ public function store() } /** - * @OA\Put(path="/api/v1/servicebodies/{serviceBodyId}", summary="Updates a Service Body", description="Updates a single service body.", operationId="updateServiceBody", tags={"servicebodies"}, security={{"oauth2":{}}}, + * @OA\Put(path="/api/v1/servicebodies/{serviceBodyId}", summary="Updates a Service Body", description="Updates a single service body.", operationId="updateServiceBody", tags={"servicebodies"}, security={{"bmltToken":{}}}, * @OA\Parameter(description="ID of service body", in="path", name="serviceBodyId", required=true, example="1", * @OA\Schema(type="integer", format="int64") * ), @@ -129,7 +129,7 @@ public function update() } /** - * @OA\Patch(path="/api/v1/servicebodies/{serviceBodyId}", summary="Patches a service body", description="Patches a single service body by id.", operationId="patchServiceBody", tags={"servicebodies"}, security={{"oauth2":{}}}, + * @OA\Patch(path="/api/v1/servicebodies/{serviceBodyId}", summary="Patches a service body", description="Patches a single service body by id.", operationId="patchServiceBody", tags={"servicebodies"}, security={{"bmltToken":{}}}, * @OA\Parameter(description="ID of service body", in="path", name="serviceBodyId", required=true, example="1", * @OA\Schema(type="integer", format="int64") * ), @@ -155,7 +155,7 @@ public function partialUpdate() { } /** - * @OA\Delete(path="/api/v1/servicebodies/{serviceBodyId}", summary="Deletes a service body", description="Deletes a service body by id.", operationId="deleteServiceBody", tags={"servicebodies"}, security={{"oauth2":{}}}, + * @OA\Delete(path="/api/v1/servicebodies/{serviceBodyId}", summary="Deletes a service body", description="Deletes a service body by id.", operationId="deleteServiceBody", tags={"servicebodies"}, security={{"bmltToken":{}}}, * @OA\Parameter(description="ID of service body", in="path", name="serviceBodyId", required=true, example="1", * @OA\Schema(type="integer", format="int64") * ), diff --git a/src/app/Http/Controllers/Admin/Swagger/TokenController.php b/src/app/Http/Controllers/Admin/Swagger/TokenController.php index 769ee3dce..928f06e90 100644 --- a/src/app/Http/Controllers/Admin/Swagger/TokenController.php +++ b/src/app/Http/Controllers/Admin/Swagger/TokenController.php @@ -36,7 +36,7 @@ private function token() } /** - * @OA\Post(path="/api/v1/auth/refresh", summary="Revokes and issues a new token", description="Refresh token.", operationId="authRefresh", tags={"auth"}, security={{"oauth2":{}}}, + * @OA\Post(path="/api/v1/auth/refresh", summary="Revokes and issues a new token", description="Refresh token.", operationId="authRefresh", tags={"auth"}, security={{"bmltToken":{}}}, * @OA\Response(response=200, description="Returns when refresh is successful.", * @OA\JsonContent(ref="#/components/schemas/Token") * ), @@ -50,7 +50,7 @@ public function refresh() } /** - * @OA\Post(path="/api/v1/auth/logout", summary="Revokes a token", description="Revoke token and logout.", operationId="authLogout", tags={"auth"}, security={{"oauth2":{}}}, + * @OA\Post(path="/api/v1/auth/logout", summary="Revokes a token", description="Revoke token and logout.", operationId="authLogout", tags={"auth"}, security={{"bmltToken":{}}}, * @OA\Response(response=200, description="Returns when token was logged out."), * @OA\Response(response=401, description="Returns when request is unauthenticated.", * @OA\JsonContent(ref="#/components/schemas/ErrorUnauthenticated") diff --git a/src/app/Http/Controllers/Admin/Swagger/UserController.php b/src/app/Http/Controllers/Admin/Swagger/UserController.php index 27ff8279f..c98b3f0ac 100644 --- a/src/app/Http/Controllers/Admin/Swagger/UserController.php +++ b/src/app/Http/Controllers/Admin/Swagger/UserController.php @@ -38,7 +38,7 @@ class UserController extends Controller { /** - * @OA\Get(path="/api/v1/users", summary="Retrieves users", description="Retrieve users for authenticated user.", operationId="getUsers", tags={"users"}, security={{"oauth2":{}}}, + * @OA\Get(path="/api/v1/users", summary="Retrieves users", description="Retrieve users for authenticated user.", operationId="getUsers", tags={"users"}, security={{"bmltToken":{}}}, * @OA\Response(response=200, description="Returns when user is authenticated.", * @OA\JsonContent(ref="#/components/schemas/UserCollection") * ), @@ -52,7 +52,7 @@ public function index() } /** - * @OA\Get(path="/api/v1/users/{userId}", summary="Retrieves a single user", description="Retrieve single user.", operationId="getUser", tags={"users"}, security={{"oauth2":{}}}, + * @OA\Get(path="/api/v1/users/{userId}", summary="Retrieves a single user", description="Retrieve single user.", operationId="getUser", tags={"users"}, security={{"bmltToken":{}}}, * @OA\Parameter(description="ID of user", in="path", name="userId", required=true, example="1", * @OA\Schema(type="integer", format="int64") * ), @@ -72,7 +72,7 @@ public function show() } /** - * @OA\Post(path="/api/v1/users", summary="Creates a user", description="Creates a user.", operationId="createUser", tags={"users"}, security={{"oauth2":{}}}, + * @OA\Post(path="/api/v1/users", summary="Creates a user", description="Creates a user.", operationId="createUser", tags={"users"}, security={{"bmltToken":{}}}, * @OA\RequestBody(required=true, description="Pass in user object", * @OA\JsonContent(ref="#/components/schemas/CreateUser"), * ), @@ -98,7 +98,7 @@ public function store() } /** - * @OA\Put(path="/api/v1/users/{userId}", summary="Update single user", description="Updates a user.", operationId="updateUser", tags={"users"}, security={{"oauth2":{}}}, + * @OA\Put(path="/api/v1/users/{userId}", summary="Update single user", description="Updates a user.", operationId="updateUser", tags={"users"}, security={{"bmltToken":{}}}, * @OA\Parameter(description="ID of user", in="path", name="userId", required=true, example="1", * @OA\Schema(type="integer", format="int64") * ), @@ -125,7 +125,7 @@ public function update() } /** - * @OA\Patch(path="/api/v1/users/{userId}", summary="Patches a user", description="Patches a user by id.", operationId="partialUpdateUser", tags={"users"}, security={{"oauth2":{}}}, + * @OA\Patch(path="/api/v1/users/{userId}", summary="Patches a user", description="Patches a user by id.", operationId="partialUpdateUser", tags={"users"}, security={{"bmltToken":{}}}, * @OA\Parameter(description="ID of user", in="path", name="userId", required=true, example="1", * @OA\Schema(type="integer", format="int64") * ), @@ -152,7 +152,7 @@ public function partialUpdate() } /** - * @OA\Delete(path="/api/v1/users/{userId}", summary="Deletes a user", description="Deletes a user by id", operationId="deleteUser", tags={"users"}, security={{"oauth2":{}}}, + * @OA\Delete(path="/api/v1/users/{userId}", summary="Deletes a user", description="Deletes a user by id", operationId="deleteUser", tags={"users"}, security={{"bmltToken":{}}}, * @OA\Parameter(description="ID of user", in="path", name="userId", required=true, example="1", * @OA\Schema(type="integer", format="int64") * ), diff --git a/src/storage/api-docs/api-docs.json b/src/storage/api-docs/api-docs.json index 1bee723bf..6809b9d28 100644 --- a/src/storage/api-docs/api-docs.json +++ b/src/storage/api-docs/api-docs.json @@ -69,7 +69,7 @@ }, "security": [ { - "bearerAuth": [] + "bmltToken": [] } ] }, @@ -145,7 +145,7 @@ }, "security": [ { - "bearerAuth": [] + "bmltToken": [] } ] } @@ -205,7 +205,7 @@ }, "security": [ { - "bearerAuth": [] + "bmltToken": [] } ] }, @@ -287,7 +287,7 @@ }, "security": [ { - "bearerAuth": [] + "bmltToken": [] } ] }, @@ -358,7 +358,7 @@ }, "security": [ { - "bearerAuth": [] + "bmltToken": [] } ] }, @@ -440,7 +440,7 @@ }, "security": [ { - "bearerAuth": [] + "bmltToken": [] } ] } @@ -529,7 +529,7 @@ }, "security": [ { - "bearerAuth": [] + "bmltToken": [] } ] }, @@ -605,7 +605,7 @@ }, "security": [ { - "bearerAuth": [] + "bmltToken": [] } ] } @@ -665,7 +665,7 @@ }, "security": [ { - "bearerAuth": [] + "bmltToken": [] } ] }, @@ -747,7 +747,7 @@ }, "security": [ { - "bearerAuth": [] + "bmltToken": [] } ] }, @@ -808,7 +808,7 @@ }, "security": [ { - "bearerAuth": [] + "bmltToken": [] } ] }, @@ -890,7 +890,7 @@ }, "security": [ { - "bearerAuth": [] + "bmltToken": [] } ] } @@ -927,7 +927,7 @@ }, "security": [ { - "bearerAuth": [] + "bmltToken": [] } ] }, @@ -1003,7 +1003,7 @@ }, "security": [ { - "bearerAuth": [] + "bmltToken": [] } ] } @@ -1063,7 +1063,7 @@ }, "security": [ { - "bearerAuth": [] + "bmltToken": [] } ] }, @@ -1145,7 +1145,7 @@ }, "security": [ { - "bearerAuth": [] + "bmltToken": [] } ] }, @@ -1206,7 +1206,7 @@ }, "security": [ { - "bearerAuth": [] + "bmltToken": [] } ] }, @@ -1288,7 +1288,7 @@ }, "security": [ { - "bearerAuth": [] + "bmltToken": [] } ] } @@ -1378,7 +1378,7 @@ }, "security": [ { - "bearerAuth": [] + "bmltToken": [] } ] } @@ -1408,7 +1408,7 @@ }, "security": [ { - "bearerAuth": [] + "bmltToken": [] } ] } @@ -1445,7 +1445,7 @@ }, "security": [ { - "bearerAuth": [] + "bmltToken": [] } ] }, @@ -1521,7 +1521,7 @@ }, "security": [ { - "bearerAuth": [] + "bmltToken": [] } ] } @@ -1581,7 +1581,7 @@ }, "security": [ { - "bearerAuth": [] + "bmltToken": [] } ] }, @@ -1663,7 +1663,7 @@ }, "security": [ { - "bearerAuth": [] + "bmltToken": [] } ] }, @@ -1734,7 +1734,7 @@ }, "security": [ { - "bearerAuth": [] + "bmltToken": [] } ] }, @@ -1816,7 +1816,7 @@ }, "security": [ { - "bearerAuth": [] + "bmltToken": [] } ] } @@ -2490,7 +2490,7 @@ } }, "securitySchemes": { - "oauth2": { + "bmltToken": { "type": "oauth2", "flows": { "password": {