From 5f24ab1a98b2d82e31ff7297e1c519077f08a2d9 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Wed, 15 Oct 2025 12:31:22 -0300 Subject: [PATCH 1/3] feat: Extend Swagger Coverage for controller `OAuth2SummitMetricsApiController` --- .../OAuth2SummitMetricsApiController.php | 278 +++++++++++++++++- app/Swagger/SummitMetricsSchemas.php | 99 +++++++ 2 files changed, 375 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMetricsApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMetricsApiController.php index 2e671c784..6d3b2e690 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMetricsApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMetricsApiController.php @@ -15,11 +15,13 @@ use App\ModelSerializers\SerializerUtils; use App\Rules\Boolean; use App\Services\Model\ISummitMetricService; +use Illuminate\Http\Response; use models\main\IMemberRepository; use models\oauth2\IResourceServerContext; use models\summit\ISummitMetricType; use models\summit\ISummitRepository; use ModelSerializers\SerializerRegistry; +use OpenApi\Attributes as OA; /** * Class OAuth2SummitMetricsApiController @@ -68,6 +70,41 @@ public function __construct * @param $event_id * @return mixed */ + #[OA\Put( + path: "/api/v1/summits/{id}/metrics/enter", + summary: "Record a metric entry (enter)", + security: [["Bearer" => []]], + tags: ["summit-metrics"], + parameters: [ + new OA\Parameter( + name: "id", + in: "path", + required: true, + schema: new OA\Schema(type: "integer"), + description: "The summit id" + ) + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\MediaType( + mediaType: "application/json", + schema: new OA\Schema(ref: "#/components/schemas/SummitMetricEnterRequest") + ) + ), + responses: [ + new OA\Response( + response: 200, + description: "OK", + content: new OA\JsonContent(ref: "#/components/schemas/SummitMetric") + ), + new OA\Response(response: Response::HTTP_BAD_REQUEST, description: "Bad Request"), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error") + ] + )] public function enter($summit_id) { return $this->processRequest(function () use ($summit_id) { @@ -101,6 +138,41 @@ public function enter($summit_id) * @param $event_id * @return mixed */ + #[OA\Post( + path: "/api/v1/summits/{id}/metrics/leave", + summary: "Record a metric exit (leave)", + security: [["Bearer" => []]], + tags: ["summit-metrics"], + parameters: [ + new OA\Parameter( + name: "id", + in: "path", + required: true, + schema: new OA\Schema(type: "integer"), + description: "The summit id" + ) + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\MediaType( + mediaType: "application/json", + schema: new OA\Schema(ref: "#/components/schemas/SummitMetricLeaveRequest") + ) + ), + responses: [ + new OA\Response( + response: 200, + description: "OK", + content: new OA\JsonContent(ref: "#/components/schemas/SummitMetric") + ), + new OA\Response(response: Response::HTTP_BAD_REQUEST, description: "Bad Request"), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error") + ] + )] public function leave($summit_id) { return $this->processRequest(function () use ($summit_id) { @@ -134,6 +206,48 @@ public function leave($summit_id) * @param $event_id * @return mixed */ + #[OA\Put( + path: "/api/v1/summits/{id}/members/{member_id}/schedule/{event_id}/metrics/enter", + summary: "Record a metric entry to a specific event", + security: [["Bearer" => []]], + tags: ["summit-metrics"], + parameters: [ + new OA\Parameter( + name: "id", + in: "path", + required: true, + schema: new OA\Schema(type: "integer"), + description: "The summit id" + ), + new OA\Parameter( + name: "member_id", + in: "path", + required: true, + schema: new OA\Schema(type: "string", enum: ["me"]), + description: "The member id (must be 'me')" + ), + new OA\Parameter( + name: "event_id", + in: "path", + required: true, + schema: new OA\Schema(type: "integer"), + description: "The event id" + ) + ], + responses: [ + new OA\Response( + response: 200, + description: "OK", + content: new OA\JsonContent(ref: "#/components/schemas/SummitMetric") + ), + new OA\Response(response: Response::HTTP_BAD_REQUEST, description: "Bad Request"), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error") + ] + )] public function enterToEvent($summit_id, $member_id, $event_id) { return $this->processRequest(function () use ($summit_id, $member_id, $event_id) { @@ -162,6 +276,48 @@ public function enterToEvent($summit_id, $member_id, $event_id) * @param $event_id * @return mixed */ + #[OA\Post( + path: "/api/v1/summits/{id}/members/{member_id}/schedule/{event_id}/metrics/leave", + summary: "Record a metric exit from a specific event", + security: [["Bearer" => []]], + tags: ["summit-metrics"], + parameters: [ + new OA\Parameter( + name: "id", + in: "path", + required: true, + schema: new OA\Schema(type: "integer"), + description: "The summit id" + ), + new OA\Parameter( + name: "member_id", + in: "path", + required: true, + schema: new OA\Schema(type: "string", enum: ["me"]), + description: "The member id (must be 'me')" + ), + new OA\Parameter( + name: "event_id", + in: "path", + required: true, + schema: new OA\Schema(type: "integer"), + description: "The event id" + ) + ], + responses: [ + new OA\Response( + response: 200, + description: "OK", + content: new OA\JsonContent(ref: "#/components/schemas/SummitMetric") + ), + new OA\Response(response: Response::HTTP_BAD_REQUEST, description: "Bad Request"), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error") + ] + )] public function leaveFromEvent($summit_id, $member_id, $event_id) { return $this->processRequest(function () use ($summit_id, $member_id, $event_id) { @@ -184,6 +340,41 @@ public function leaveFromEvent($summit_id, $member_id, $event_id) }); } + #[OA\Put( + path: "/api/v1/summits/{id}/metrics/onsite/enter", + summary: "Record an on-site metric entry (for attendees entering venue/room)", + security: [["Bearer" => []]], + tags: ["summit-metrics"], + parameters: [ + new OA\Parameter( + name: "id", + in: "path", + required: true, + schema: new OA\Schema(type: "integer"), + description: "The summit id" + ) + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\MediaType( + mediaType: "application/json", + schema: new OA\Schema(ref: "#/components/schemas/SummitMetricOnSiteEnterRequest") + ) + ), + responses: [ + new OA\Response( + response: 200, + description: "OK", + content: new OA\JsonContent(ref: "#/components/schemas/SummitMetric") + ), + new OA\Response(response: Response::HTTP_BAD_REQUEST, description: "Bad Request"), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error") + ] + )] public function onSiteEnter($summit_id) { return $this->processRequest(function () use ($summit_id) { @@ -213,7 +404,55 @@ public function onSiteEnter($summit_id) }); } - + #[OA\Get( + path: "/api/v1/summits/{id}/metrics/onsite/enter", + summary: "Check if on-site entry is allowed for an attendee (validation only, does not record entry)", + security: [["Bearer" => []]], + tags: ["summit-metrics"], + parameters: [ + new OA\Parameter( + name: "id", + in: "path", + required: true, + schema: new OA\Schema(type: "integer"), + description: "The summit id" + ), + new OA\Parameter( + name: "attendee_id", + in: "query", + required: true, + schema: new OA\Schema(type: "integer"), + description: "The attendee id" + ), + new OA\Parameter( + name: "room_id", + in: "query", + required: false, + schema: new OA\Schema(type: "integer"), + description: "The room id" + ), + new OA\Parameter( + name: "event_id", + in: "query", + required: false, + schema: new OA\Schema(type: "integer"), + description: "The event id" + ) + ], + responses: [ + new OA\Response( + response: 200, + description: "OK", + content: new OA\JsonContent(ref: "#/components/schemas/SummitMetric") + ), + new OA\Response(response: Response::HTTP_BAD_REQUEST, description: "Bad Request"), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error") + ] + )] public function checkOnSiteEnter($summit_id) { return $this->processRequest(function () use ($summit_id) { @@ -240,6 +479,41 @@ public function checkOnSiteEnter($summit_id) }); } + #[OA\Post( + path: "/api/v1/summits/{id}/metrics/onsite/leave", + summary: "Record an on-site metric exit (for attendees leaving venue/room)", + security: [["Bearer" => []]], + tags: ["summit-metrics"], + parameters: [ + new OA\Parameter( + name: "id", + in: "path", + required: true, + schema: new OA\Schema(type: "integer"), + description: "The summit id" + ) + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\MediaType( + mediaType: "application/json", + schema: new OA\Schema(ref: "#/components/schemas/SummitMetricOnSiteLeaveRequest") + ) + ), + responses: [ + new OA\Response( + response: 200, + description: "OK", + content: new OA\JsonContent(ref: "#/components/schemas/SummitMetric") + ), + new OA\Response(response: Response::HTTP_BAD_REQUEST, description: "Bad Request"), + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"), + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error") + ] + )] public function onSiteLeave($summit_id) { return $this->processRequest(function () use ($summit_id) { @@ -265,4 +539,4 @@ public function onSiteLeave($summit_id) )); }); } -} \ No newline at end of file +} diff --git a/app/Swagger/SummitMetricsSchemas.php b/app/Swagger/SummitMetricsSchemas.php index 6b3e2f895..cdf886a49 100644 --- a/app/Swagger/SummitMetricsSchemas.php +++ b/app/Swagger/SummitMetricsSchemas.php @@ -4,4 +4,103 @@ use OpenApi\Attributes as OA; +// Summit Metrics Schemas + +#[OA\Schema( + schema: "SummitMetric", + type: "object", + properties: [ + new OA\Property(property: "id", type: "integer"), + new OA\Property(property: "member_first_name", type: "string", nullable: true), + new OA\Property(property: "member_last_name", type: "string", nullable: true), + new OA\Property(property: "member_pic", type: "string", nullable: true), + new OA\Property(property: "type", type: "string", enum: ["GENERAL", "LOBBY", "EVENT", "SPONSOR", "POSTER", "POSTERS", "ROOM"]), + new OA\Property(property: "ip", type: "string", nullable: true), + new OA\Property(property: "origin", type: "string", nullable: true), + new OA\Property(property: "browser", type: "string", nullable: true), + new OA\Property(property: "outgress_date", type: "integer", nullable: true), + new OA\Property(property: "ingress_date", type: "integer"), + new OA\Property(property: "created", type: "integer"), + new OA\Property(property: "last_edited", type: "integer") + ] +)] +class SummitMetric +{ +} + +#[OA\Schema( + schema: "SummitMetricEnterRequest", + type: "object", + required: ["type"], + properties: [ + new OA\Property(property: "type", type: "string", enum: ["GENERAL", "LOBBY", "EVENT", "SPONSOR", "POSTER", "POSTERS", "ROOM"]), + new OA\Property(property: "source_id", type: "integer", description: "ID of the source (event, sponsor, room, etc.)"), + new OA\Property(property: "location", type: "string", description: "Location information") + ] +)] +class SummitMetricEnterRequest +{ +} + +#[OA\Schema( + schema: "SummitMetricLeaveRequest", + type: "object", + required: ["type"], + properties: [ + new OA\Property(property: "type", type: "string", enum: ["GENERAL", "LOBBY", "EVENT", "SPONSOR", "POSTER", "POSTERS", "ROOM"]), + new OA\Property(property: "source_id", type: "integer", description: "ID of the source (event, sponsor, room, etc.)"), + new OA\Property(property: "location", type: "string", description: "Location information") + ] +)] +class SummitMetricLeaveRequest +{ +} + +#[OA\Schema( + schema: "SummitMetricOnSiteEnterRequest", + type: "object", + required: ["attendee_id"], + properties: [ + new OA\Property(property: "attendee_id", type: "integer"), + new OA\Property(property: "room_id", type: "integer"), + new OA\Property(property: "event_id", type: "integer"), + new OA\Property(property: "ticket_number", type: "string"), + new OA\Property(property: "required_access_levels", type: "array", items: new OA\Items(type: "integer")), + new OA\Property(property: "check_ingress", type: "boolean") + ] +)] +class SummitMetricOnSiteEnterRequest +{ +} + +#[OA\Schema( + schema: "SummitMetricOnSiteLeaveRequest", + type: "object", + required: ["attendee_id"], + properties: [ + new OA\Property(property: "attendee_id", type: "integer"), + new OA\Property(property: "room_id", type: "integer"), + new OA\Property(property: "event_id", type: "integer"), + new OA\Property(property: "required_access_levels", type: "array", items: new OA\Items(type: "integer")) + ] +)] +class SummitMetricOnSiteLeaveRequest +{ +} + +#[OA\Schema( + schema: "SummitMetricCheckOnSiteEnterRequest", + type: "object", + required: ["attendee_id"], + properties: [ + new OA\Property(property: "attendee_id", type: "integer"), + new OA\Property(property: "room_id", type: "integer"), + new OA\Property(property: "event_id", type: "integer") + ] +)] +class SummitMetricCheckOnSiteEnterRequest +{ +} + // + From 11170ef1bea358640a1759489736f7f51381ed95 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Wed, 26 Nov 2025 21:52:17 +0000 Subject: [PATCH 2/3] chore: Add the correct security and x attributes and create security schema, fix path routes and change schema to be defined as requested --- .../OAuth2SummitMetricsApiController.php | 46 +++++++++++++------ .../Security/SummitMetricsAuthSchema.php | 29 ++++++++++++ app/Swagger/SummitMetricsSchemas.php | 4 +- 3 files changed, 63 insertions(+), 16 deletions(-) create mode 100644 app/Swagger/Security/SummitMetricsAuthSchema.php diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMetricsApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMetricsApiController.php index 6d3b2e690..b451012c0 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMetricsApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMetricsApiController.php @@ -12,8 +12,10 @@ * limitations under the License. **/ +use App\Models\Foundation\Main\IGroup; use App\ModelSerializers\SerializerUtils; use App\Rules\Boolean; +use App\Security\SummitScopes; use App\Services\Model\ISummitMetricService; use Illuminate\Http\Response; use models\main\IMemberRepository; @@ -72,9 +74,10 @@ public function __construct */ #[OA\Put( path: "/api/v1/summits/{id}/metrics/enter", + operationId: 'enter', summary: "Record a metric entry (enter)", - security: [["Bearer" => []]], - tags: ["summit-metrics"], + security: [["summit_metrics_oauth2" => [SummitScopes::EnterEvent, SummitScopes::WriteMetrics]]], + tags: ["Summit Metrics"], parameters: [ new OA\Parameter( name: "id", @@ -140,9 +143,10 @@ public function enter($summit_id) */ #[OA\Post( path: "/api/v1/summits/{id}/metrics/leave", + operationId: 'leave', summary: "Record a metric exit (leave)", - security: [["Bearer" => []]], - tags: ["summit-metrics"], + security: [["summit_metrics_oauth2" => [SummitScopes::LeaveEvent, SummitScopes::WriteMetrics]]], + tags: ["Summit Metrics"], parameters: [ new OA\Parameter( name: "id", @@ -208,9 +212,10 @@ public function leave($summit_id) */ #[OA\Put( path: "/api/v1/summits/{id}/members/{member_id}/schedule/{event_id}/metrics/enter", + operationId: 'enterToEvent', summary: "Record a metric entry to a specific event", - security: [["Bearer" => []]], - tags: ["summit-metrics"], + security: [["summit_metrics_oauth2" => [SummitScopes::EnterEvent]]], + tags: ["Summit Metrics"], parameters: [ new OA\Parameter( name: "id", @@ -278,9 +283,10 @@ public function enterToEvent($summit_id, $member_id, $event_id) */ #[OA\Post( path: "/api/v1/summits/{id}/members/{member_id}/schedule/{event_id}/metrics/leave", + operationId: 'leaveFromEvent', summary: "Record a metric exit from a specific event", - security: [["Bearer" => []]], - tags: ["summit-metrics"], + security: [["summit_metrics_oauth2" => [SummitScopes::LeaveEvent]]], + tags: ["Summit Metrics"], parameters: [ new OA\Parameter( name: "id", @@ -342,9 +348,13 @@ public function leaveFromEvent($summit_id, $member_id, $event_id) #[OA\Put( path: "/api/v1/summits/{id}/metrics/onsite/enter", + operationId: 'onSiteEnter', summary: "Record an on-site metric entry (for attendees entering venue/room)", - security: [["Bearer" => []]], - tags: ["summit-metrics"], + security: [["summit_metrics_oauth2" => [SummitScopes::WriteMetrics]]], + tags: ["Summit Metrics"], + x: [ + "authz_groups" => [IGroup::SummitAccessControl] + ], parameters: [ new OA\Parameter( name: "id", @@ -406,9 +416,13 @@ public function onSiteEnter($summit_id) #[OA\Get( path: "/api/v1/summits/{id}/metrics/onsite/enter", + operationId: 'checkOnSiteEnter', summary: "Check if on-site entry is allowed for an attendee (validation only, does not record entry)", - security: [["Bearer" => []]], - tags: ["summit-metrics"], + security: [["summit_metrics_oauth2" => [SummitScopes::ReadAllSummitData, SummitScopes::ReadSummitData, SummitScopes::ReadMetrics]]], + tags: ["Summit Metrics"], + x: [ + "authz_groups" => [IGroup::SummitAccessControl] + ], parameters: [ new OA\Parameter( name: "id", @@ -481,9 +495,13 @@ public function checkOnSiteEnter($summit_id) #[OA\Post( path: "/api/v1/summits/{id}/metrics/onsite/leave", + operationId: 'onSiteLeave', summary: "Record an on-site metric exit (for attendees leaving venue/room)", - security: [["Bearer" => []]], - tags: ["summit-metrics"], + security: [["summit_metrics_oauth2" => [SummitScopes::WriteMetrics]]], + tags: ["Summit Metrics"], + x: [ + "authz_groups" => [IGroup::SummitAccessControl] + ], parameters: [ new OA\Parameter( name: "id", diff --git a/app/Swagger/Security/SummitMetricsAuthSchema.php b/app/Swagger/Security/SummitMetricsAuthSchema.php new file mode 100644 index 000000000..24beb3f0c --- /dev/null +++ b/app/Swagger/Security/SummitMetricsAuthSchema.php @@ -0,0 +1,29 @@ + 'Enter Event', + SummitScopes::LeaveEvent => 'Leave Event', + SummitScopes::WriteMetrics => 'Write Metrics', + SummitScopes::ReadMetrics => 'Read Metrics', + SummitScopes::ReadAllSummitData => 'Read All Summit Data', + SummitScopes::ReadSummitData => 'Read Summit Data', + ], + ), + ], + ) +] +class SummitMetricsAuthSchema {} diff --git a/app/Swagger/SummitMetricsSchemas.php b/app/Swagger/SummitMetricsSchemas.php index cdf886a49..87802dbb3 100644 --- a/app/Swagger/SummitMetricsSchemas.php +++ b/app/Swagger/SummitMetricsSchemas.php @@ -11,6 +11,8 @@ type: "object", properties: [ new OA\Property(property: "id", type: "integer"), + new OA\Property(property: "created", type: "integer"), + new OA\Property(property: "last_edited", type: "integer"), new OA\Property(property: "member_first_name", type: "string", nullable: true), new OA\Property(property: "member_last_name", type: "string", nullable: true), new OA\Property(property: "member_pic", type: "string", nullable: true), @@ -20,8 +22,6 @@ new OA\Property(property: "browser", type: "string", nullable: true), new OA\Property(property: "outgress_date", type: "integer", nullable: true), new OA\Property(property: "ingress_date", type: "integer"), - new OA\Property(property: "created", type: "integer"), - new OA\Property(property: "last_edited", type: "integer") ] )] class SummitMetric From d09e4a59cd40309d471ae436c5f7527c719469b1 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Wed, 3 Dec 2025 20:42:11 +0000 Subject: [PATCH 3/3] feat: Add changes requested --- .../Summit/OAuth2SummitMetricsApiController.php | 10 +++++----- app/Swagger/Security/SummitMetricsAuthSchema.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMetricsApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMetricsApiController.php index b451012c0..1e266e48d 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMetricsApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitMetricsApiController.php @@ -211,7 +211,7 @@ public function leave($summit_id) * @return mixed */ #[OA\Put( - path: "/api/v1/summits/{id}/members/{member_id}/schedule/{event_id}/metrics/enter", + path: "/api/v1/summits/{id}/members/{member_id}/schedule/{event_id}/enter", operationId: 'enterToEvent', summary: "Record a metric entry to a specific event", security: [["summit_metrics_oauth2" => [SummitScopes::EnterEvent]]], @@ -282,7 +282,7 @@ public function enterToEvent($summit_id, $member_id, $event_id) * @return mixed */ #[OA\Post( - path: "/api/v1/summits/{id}/members/{member_id}/schedule/{event_id}/metrics/leave", + path: "/api/v1/summits/{id}/members/{member_id}/schedule/{event_id}/leave", operationId: 'leaveFromEvent', summary: "Record a metric exit from a specific event", security: [["summit_metrics_oauth2" => [SummitScopes::LeaveEvent]]], @@ -353,7 +353,7 @@ public function leaveFromEvent($summit_id, $member_id, $event_id) security: [["summit_metrics_oauth2" => [SummitScopes::WriteMetrics]]], tags: ["Summit Metrics"], x: [ - "authz_groups" => [IGroup::SummitAccessControl] + "required-groups" => [IGroup::SummitAccessControl] ], parameters: [ new OA\Parameter( @@ -421,7 +421,7 @@ public function onSiteEnter($summit_id) security: [["summit_metrics_oauth2" => [SummitScopes::ReadAllSummitData, SummitScopes::ReadSummitData, SummitScopes::ReadMetrics]]], tags: ["Summit Metrics"], x: [ - "authz_groups" => [IGroup::SummitAccessControl] + "required-groups" => [IGroup::SummitAccessControl] ], parameters: [ new OA\Parameter( @@ -500,7 +500,7 @@ public function checkOnSiteEnter($summit_id) security: [["summit_metrics_oauth2" => [SummitScopes::WriteMetrics]]], tags: ["Summit Metrics"], x: [ - "authz_groups" => [IGroup::SummitAccessControl] + "required-groups" => [IGroup::SummitAccessControl] ], parameters: [ new OA\Parameter( diff --git a/app/Swagger/Security/SummitMetricsAuthSchema.php b/app/Swagger/Security/SummitMetricsAuthSchema.php index 24beb3f0c..9eebdb3c7 100644 --- a/app/Swagger/Security/SummitMetricsAuthSchema.php +++ b/app/Swagger/Security/SummitMetricsAuthSchema.php @@ -1,6 +1,6 @@