From 1d8ab57f2502c988befed7687dec68641f0ef5ae Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Wed, 8 Oct 2025 18:39:50 -0300 Subject: [PATCH 01/11] feat: Extend Swagger Coverage for controller Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php --- ...uth2PaymentGatewayProfileApiController.php | 219 +++++++++++++++++- app/Swagger/schemas.php | 83 +++++++ 2 files changed, 301 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php index 22056d93e..59836048d 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php @@ -12,12 +12,14 @@ * limitations under the License. **/ use App\Models\Foundation\Summit\Repositories\IPaymentGatewayProfileRepository; +use App\Security\SummitScopes; use App\Services\Model\IPaymentGatewayProfileService; use models\oauth2\IResourceServerContext; use models\summit\ISummitRepository; use models\summit\Summit; use models\utils\IEntity; use ModelSerializers\SerializerRegistry; +use OpenApi\Attributes as OA; /** * Class OAuth2PaymentGatewayProfileApiController @@ -67,6 +69,221 @@ public function __construct use DeleteSummitChildElement; + // OpenAPI Documentation + + #[OA\Get( + path: '/api/v1/summits/{id}/payment-gateway-profiles', + summary: 'Get all payment gateway profiles for a summit', + description: 'Retrieves a paginated list of payment gateway profiles configured for a specific summit. Payment profiles manage payment processing for registrations and bookable rooms.', + security: [['oauth2_security_scope' => [SummitScopes::ReadAllSummitData]]], + tags: ['Payment Gateway Profiles'], + parameters: [ + new OA\Parameter( + name: 'id', + in: 'path', + required: true, + description: 'Summit ID', + schema: new OA\Schema(type: 'integer') + ), + new OA\Parameter( + name: 'page', + in: 'query', + required: false, + description: 'Page number for pagination', + schema: new OA\Schema(type: 'integer', example: 1) + ), + new OA\Parameter( + name: 'per_page', + in: 'query', + required: false, + description: 'Items per page', + schema: new OA\Schema(type: 'integer', example: 10, maximum: 100) + ), + new OA\Parameter( + name: 'filter[]', + in: 'query', + required: false, + description: 'Filter expressions. Format: fieldvalue. Available fields: application_type (=@, ==), active (==). Operators: == (equals), =@ (starts with)', + style: 'form', + explode: true, + schema: new OA\Schema( + type: 'array', + items: new OA\Items(type: 'string', example: 'application_type==Registration') + ) + ), + new OA\Parameter( + name: 'order', + in: 'query', + required: false, + description: 'Order by field(s). Available fields: id, application_type. Use "-" prefix for descending order.', + schema: new OA\Schema(type: 'string', example: 'id') + ), + ], + responses: [ + new OA\Response( + response: 200, + description: 'Payment gateway profiles retrieved successfully', + content: new OA\JsonContent(ref: '#/components/schemas/PaginatedPaymentGatewayProfilesResponse') + ), + new OA\Response(response: 400, ref: '#/components/responses/400'), + new OA\Response(response: 401, ref: '#/components/responses/401'), + new OA\Response(response: 403, ref: '#/components/responses/403'), + new OA\Response(response: 404, ref: '#/components/responses/404'), + new OA\Response(response: 412, ref: '#/components/responses/412'), + new OA\Response(response: 500, ref: '#/components/responses/500'), + ] + )] + + #[OA\Get( + path: '/api/v1/summits/{id}/payment-gateway-profiles/{payment_profile_id}', + summary: 'Get a payment gateway profile by ID', + description: 'Retrieves detailed information about a specific payment gateway profile.', + security: [['oauth2_security_scope' => [SummitScopes::ReadAllSummitData]]], + tags: ['Payment Gateway Profiles'], + parameters: [ + new OA\Parameter( + name: 'id', + in: 'path', + required: true, + description: 'Summit ID', + schema: new OA\Schema(type: 'integer') + ), + new OA\Parameter( + name: 'payment_profile_id', + in: 'path', + required: true, + description: 'Payment Gateway Profile ID', + schema: new OA\Schema(type: 'integer') + ), + ], + responses: [ + new OA\Response( + response: 200, + description: 'Payment gateway profile retrieved successfully', + content: new OA\JsonContent(ref: '#/components/schemas/PaymentGatewayProfile') + ), + new OA\Response(response: 400, ref: '#/components/responses/400'), + new OA\Response(response: 401, ref: '#/components/responses/401'), + new OA\Response(response: 403, ref: '#/components/responses/403'), + new OA\Response(response: 404, ref: '#/components/responses/404'), + new OA\Response(response: 412, ref: '#/components/responses/412'), + new OA\Response(response: 500, ref: '#/components/responses/500'), + ] + )] + + #[OA\Post( + path: '/api/v1/summits/{id}/payment-gateway-profiles', + summary: 'Create a new payment gateway profile', + description: 'Creates a new payment gateway profile for the summit. Supports Stripe and LawPay providers.', + security: [['oauth2_security_scope' => [SummitScopes::WriteSummitData]]], + tags: ['Payment Gateway Profiles'], + parameters: [ + new OA\Parameter( + name: 'id', + in: 'path', + required: true, + description: 'Summit ID', + schema: new OA\Schema(type: 'integer') + ), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\JsonContent(ref: '#/components/schemas/PaymentGatewayProfileCreateRequest') + ), + responses: [ + new OA\Response( + response: 201, + description: 'Payment gateway profile created successfully', + content: new OA\JsonContent(ref: '#/components/schemas/PaymentGatewayProfile') + ), + new OA\Response(response: 400, ref: '#/components/responses/400'), + new OA\Response(response: 401, ref: '#/components/responses/401'), + new OA\Response(response: 403, ref: '#/components/responses/403'), + new OA\Response(response: 404, ref: '#/components/responses/404'), + new OA\Response(response: 412, ref: '#/components/responses/412'), + new OA\Response(response: 422, ref: '#/components/responses/422'), + new OA\Response(response: 500, ref: '#/components/responses/500'), + ] + )] + + #[OA\Put( + path: '/api/v1/summits/{id}/payment-gateway-profiles/{payment_profile_id}', + summary: 'Update a payment gateway profile', + description: 'Updates an existing payment gateway profile.', + security: [['oauth2_security_scope' => [SummitScopes::WriteSummitData]]], + tags: ['Payment Gateway Profiles'], + parameters: [ + new OA\Parameter( + name: 'id', + in: 'path', + required: true, + description: 'Summit ID', + schema: new OA\Schema(type: 'integer') + ), + new OA\Parameter( + name: 'payment_profile_id', + in: 'path', + required: true, + description: 'Payment Gateway Profile ID', + schema: new OA\Schema(type: 'integer') + ), + ], + requestBody: new OA\RequestBody( + required: true, + content: new OA\JsonContent(ref: '#/components/schemas/PaymentGatewayProfileUpdateRequest') + ), + responses: [ + new OA\Response( + response: 200, + description: 'Payment gateway profile updated successfully', + content: new OA\JsonContent(ref: '#/components/schemas/PaymentGatewayProfile') + ), + new OA\Response(response: 400, ref: '#/components/responses/400'), + new OA\Response(response: 401, ref: '#/components/responses/401'), + new OA\Response(response: 403, ref: '#/components/responses/403'), + new OA\Response(response: 404, ref: '#/components/responses/404'), + new OA\Response(response: 412, ref: '#/components/responses/412'), + new OA\Response(response: 422, ref: '#/components/responses/422'), + new OA\Response(response: 500, ref: '#/components/responses/500'), + ] + )] + + #[OA\Delete( + path: '/api/v1/summits/{id}/payment-gateway-profiles/{payment_profile_id}', + summary: 'Delete a payment gateway profile', + description: 'Deletes an existing payment gateway profile from the summit.', + security: [['oauth2_security_scope' => [SummitScopes::WriteSummitData]]], + tags: ['Payment Gateway Profiles'], + parameters: [ + new OA\Parameter( + name: 'id', + in: 'path', + required: true, + description: 'Summit ID', + schema: new OA\Schema(type: 'integer') + ), + new OA\Parameter( + name: 'payment_profile_id', + in: 'path', + required: true, + description: 'Payment Gateway Profile ID', + schema: new OA\Schema(type: 'integer') + ), + ], + responses: [ + new OA\Response( + response: 204, + description: 'Payment gateway profile deleted successfully' + ), + new OA\Response(response: 400, ref: '#/components/responses/400'), + new OA\Response(response: 401, ref: '#/components/responses/401'), + new OA\Response(response: 403, ref: '#/components/responses/403'), + new OA\Response(response: 404, ref: '#/components/responses/404'), + new OA\Response(response: 412, ref: '#/components/responses/412'), + new OA\Response(response: 500, ref: '#/components/responses/500'), + ] + )] + /** * @return ISummitRepository */ @@ -168,4 +385,4 @@ protected function updateSerializerType():string{ public function getChildSerializer(){ return SerializerRegistry::SerializerType_Private; } -} \ No newline at end of file +} diff --git a/app/Swagger/schemas.php b/app/Swagger/schemas.php index d68f81ad6..e82b226e0 100644 --- a/app/Swagger/schemas.php +++ b/app/Swagger/schemas.php @@ -499,6 +499,89 @@ class PaginatedOrganizationsResponseSchema class OrganizationCreateRequestSchema { } +class ChunkedFileUploadRequestSchema +{ +} + +#[OA\Schema( + schema: 'PaymentGatewayProfile', + type: 'object', + properties: [ + new OA\Property(property: 'id', type: 'integer', example: 1), + new OA\Property(property: 'created', type: 'integer', format: 'int64', example: 1633024800), + new OA\Property(property: 'last_edited', type: 'integer', format: 'int64', example: 1633024800), + new OA\Property(property: 'active', type: 'boolean', example: true), + new OA\Property(property: 'provider', type: 'string', enum: ['Stripe', 'LawPay'], example: 'Stripe'), + new OA\Property(property: 'application_type', type: 'string', enum: ['Registration', 'BookableRooms'], example: 'Registration'), + new OA\Property(property: 'test_mode_enabled', type: 'boolean', example: false, description: 'Only for Stripe provider'), + new OA\Property(property: 'live_publishable_key', type: 'string', example: 'pk_live_...', description: 'Only for Stripe provider'), + new OA\Property(property: 'test_publishable_key', type: 'string', example: 'pk_test_...', description: 'Only for Stripe provider'), + ] +)] +class PaymentGatewayProfileSchema +{ +} + +#[OA\Schema( + schema: 'PaginatedPaymentGatewayProfilesResponse', + allOf: [ + new OA\Schema(ref: '#/components/schemas/PaginateDataSchemaResponse'), + new OA\Schema( + properties: [ + new OA\Property( + property: 'data', + type: 'array', + items: new OA\Items(ref: '#/components/schemas/PaymentGatewayProfile') + ) + ] + ) + ] +)] +class PaginatedPaymentGatewayProfilesResponseSchema +{ +} + +#[OA\Schema( + schema: 'PaymentGatewayProfileCreateRequest', + required: ['active', 'provider', 'application_type'], + type: 'object', + properties: [ + new OA\Property(property: 'active', type: 'boolean', example: true), + new OA\Property(property: 'provider', type: 'string', enum: ['Stripe', 'LawPay'], example: 'Stripe'), + new OA\Property(property: 'application_type', type: 'string', enum: ['Registration', 'BookableRooms'], example: 'Registration'), + new OA\Property(property: 'test_mode_enabled', type: 'boolean', example: false, description: 'Required for Stripe provider'), + new OA\Property(property: 'live_secret_key', type: 'string', example: 'sk_live_...', description: 'Optional for Stripe provider'), + new OA\Property(property: 'live_publishable_key', type: 'string', example: 'pk_live_...', description: 'Required with live_secret_key for Stripe'), + new OA\Property(property: 'test_secret_key', type: 'string', example: 'sk_test_...', description: 'Optional for Stripe provider'), + new OA\Property(property: 'test_publishable_key', type: 'string', example: 'pk_test_...', description: 'Required with test_secret_key for Stripe'), + new OA\Property(property: 'send_email_receipt', type: 'boolean', example: true, description: 'Optional for Stripe provider'), + new OA\Property(property: 'merchant_account_id', type: 'string', example: 'merchant_123', description: 'Optional for LawPay provider'), + ] +)] +class PaymentGatewayProfileCreateRequestSchema +{ +} + +#[OA\Schema( + schema: 'PaymentGatewayProfileUpdateRequest', + required: ['provider'], + type: 'object', + properties: [ + new OA\Property(property: 'active', type: 'boolean', example: true), + new OA\Property(property: 'provider', type: 'string', enum: ['Stripe', 'LawPay'], example: 'Stripe'), + new OA\Property(property: 'application_type', type: 'string', enum: ['Registration', 'BookableRooms'], example: 'Registration'), + new OA\Property(property: 'test_mode_enabled', type: 'boolean', example: false, description: 'Required for Stripe provider'), + new OA\Property(property: 'live_secret_key', type: 'string', example: 'sk_live_...', description: 'Optional for Stripe provider'), + new OA\Property(property: 'live_publishable_key', type: 'string', example: 'pk_live_...', description: 'Required with live_secret_key for Stripe'), + new OA\Property(property: 'test_secret_key', type: 'string', example: 'sk_test_...', description: 'Optional for Stripe provider'), + new OA\Property(property: 'test_publishable_key', type: 'string', example: 'pk_test_...', description: 'Required with test_secret_key for Stripe'), + new OA\Property(property: 'send_email_receipt', type: 'boolean', example: true, description: 'Optional for Stripe provider'), + new OA\Property(property: 'merchant_account_id', type: 'string', example: 'merchant_123', description: 'Optional for LawPay provider'), + ] +)] +class PaymentGatewayProfileUpdateRequestSchema +{ +} // User Stories From dc2992dcf43e6ba37484cc3d8b98460d3e6479d9 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Wed, 8 Oct 2025 18:45:03 -0300 Subject: [PATCH 02/11] fix: incorrect types and descriptions for errors --- ...uth2PaymentGatewayProfileApiController.php | 65 ++++++++++--------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php index 59836048d..bf556b008 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php @@ -20,6 +20,7 @@ use models\utils\IEntity; use ModelSerializers\SerializerRegistry; use OpenApi\Attributes as OA; +use Symfony\Component\HttpFoundation\Response; /** * Class OAuth2PaymentGatewayProfileApiController @@ -125,12 +126,13 @@ public function __construct description: 'Payment gateway profiles retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/PaginatedPaymentGatewayProfilesResponse') ), - new OA\Response(response: 400, ref: '#/components/responses/400'), - new OA\Response(response: 401, ref: '#/components/responses/401'), - new OA\Response(response: 403, ref: '#/components/responses/403'), - new OA\Response(response: 404, ref: '#/components/responses/404'), - new OA\Response(response: 412, ref: '#/components/responses/412'), - new OA\Response(response: 500, ref: '#/components/responses/500'), + + 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"), ] )] @@ -162,12 +164,13 @@ public function __construct description: 'Payment gateway profile retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/PaymentGatewayProfile') ), - new OA\Response(response: 400, ref: '#/components/responses/400'), - new OA\Response(response: 401, ref: '#/components/responses/401'), - new OA\Response(response: 403, ref: '#/components/responses/403'), - new OA\Response(response: 404, ref: '#/components/responses/404'), - new OA\Response(response: 412, ref: '#/components/responses/412'), - new OA\Response(response: 500, ref: '#/components/responses/500'), + + 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"), ] )] @@ -196,13 +199,12 @@ public function __construct description: 'Payment gateway profile created successfully', content: new OA\JsonContent(ref: '#/components/schemas/PaymentGatewayProfile') ), - new OA\Response(response: 400, ref: '#/components/responses/400'), - new OA\Response(response: 401, ref: '#/components/responses/401'), - new OA\Response(response: 403, ref: '#/components/responses/403'), - new OA\Response(response: 404, ref: '#/components/responses/404'), - new OA\Response(response: 412, ref: '#/components/responses/412'), - new OA\Response(response: 422, ref: '#/components/responses/422'), - new OA\Response(response: 500, ref: '#/components/responses/500'), + 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"), ] )] @@ -238,13 +240,12 @@ public function __construct description: 'Payment gateway profile updated successfully', content: new OA\JsonContent(ref: '#/components/schemas/PaymentGatewayProfile') ), - new OA\Response(response: 400, ref: '#/components/responses/400'), - new OA\Response(response: 401, ref: '#/components/responses/401'), - new OA\Response(response: 403, ref: '#/components/responses/403'), - new OA\Response(response: 404, ref: '#/components/responses/404'), - new OA\Response(response: 412, ref: '#/components/responses/412'), - new OA\Response(response: 422, ref: '#/components/responses/422'), - new OA\Response(response: 500, ref: '#/components/responses/500'), + 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"), ] )] @@ -275,12 +276,12 @@ public function __construct response: 204, description: 'Payment gateway profile deleted successfully' ), - new OA\Response(response: 400, ref: '#/components/responses/400'), - new OA\Response(response: 401, ref: '#/components/responses/401'), - new OA\Response(response: 403, ref: '#/components/responses/403'), - new OA\Response(response: 404, ref: '#/components/responses/404'), - new OA\Response(response: 412, ref: '#/components/responses/412'), - new OA\Response(response: 500, ref: '#/components/responses/500'), + 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"), ] )] From ee3631219a0fdca832dbe6ba0ee259eb3c926c86 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Tue, 14 Oct 2025 14:15:49 -0300 Subject: [PATCH 03/11] fix: Change "namespace" word positioning --- .../Summit/OAuth2PaymentGatewayProfileApiController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php index bf556b008..6db99fbf5 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php @@ -1,4 +1,7 @@ - Date: Fri, 31 Oct 2025 12:53:37 -0300 Subject: [PATCH 04/11] fix: add security schema --- ...uth2PaymentGatewayProfileApiController.php | 28 +++++++------------ app/Swagger/schemas.php | 18 ++++++++++++ 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php index 6db99fbf5..97a7eafd9 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php @@ -79,7 +79,7 @@ public function __construct path: '/api/v1/summits/{id}/payment-gateway-profiles', summary: 'Get all payment gateway profiles for a summit', description: 'Retrieves a paginated list of payment gateway profiles configured for a specific summit. Payment profiles manage payment processing for registrations and bookable rooms.', - security: [['oauth2_security_scope' => [SummitScopes::ReadAllSummitData]]], + security: [['summit_payment_gateway_oauth2' => [SummitScopes::ReadPaymentProfiles]]], tags: ['Payment Gateway Profiles'], parameters: [ new OA\Parameter( @@ -129,12 +129,9 @@ public function __construct description: 'Payment gateway profiles retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/PaginatedPaymentGatewayProfilesResponse') ), - - 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_NOT_FOUND, description: "Not Found"), new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), ] )] @@ -143,7 +140,7 @@ public function __construct path: '/api/v1/summits/{id}/payment-gateway-profiles/{payment_profile_id}', summary: 'Get a payment gateway profile by ID', description: 'Retrieves detailed information about a specific payment gateway profile.', - security: [['oauth2_security_scope' => [SummitScopes::ReadAllSummitData]]], + security: [['summit_payment_gateway_oauth2' => [SummitScopes::ReadPaymentProfiles]]], tags: ['Payment Gateway Profiles'], parameters: [ new OA\Parameter( @@ -167,12 +164,9 @@ public function __construct description: 'Payment gateway profile retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/PaymentGatewayProfile') ), - - 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_NOT_FOUND, description: "Not Found"), new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), ] )] @@ -181,7 +175,7 @@ public function __construct path: '/api/v1/summits/{id}/payment-gateway-profiles', summary: 'Create a new payment gateway profile', description: 'Creates a new payment gateway profile for the summit. Supports Stripe and LawPay providers.', - security: [['oauth2_security_scope' => [SummitScopes::WriteSummitData]]], + security: [['summit_payment_gateway_oauth2' => [SummitScopes::WritePaymentProfiles]]], tags: ['Payment Gateway Profiles'], parameters: [ new OA\Parameter( @@ -205,7 +199,7 @@ public function __construct 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_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"), ] @@ -215,7 +209,7 @@ public function __construct path: '/api/v1/summits/{id}/payment-gateway-profiles/{payment_profile_id}', summary: 'Update a payment gateway profile', description: 'Updates an existing payment gateway profile.', - security: [['oauth2_security_scope' => [SummitScopes::WriteSummitData]]], + security: [['summit_payment_gateway_oauth2' => [SummitScopes::WritePaymentProfiles]]], tags: ['Payment Gateway Profiles'], parameters: [ new OA\Parameter( @@ -246,7 +240,7 @@ public function __construct 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_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"), ] @@ -256,7 +250,7 @@ public function __construct path: '/api/v1/summits/{id}/payment-gateway-profiles/{payment_profile_id}', summary: 'Delete a payment gateway profile', description: 'Deletes an existing payment gateway profile from the summit.', - security: [['oauth2_security_scope' => [SummitScopes::WriteSummitData]]], + security: [['summit_payment_gateway_oauth2' => [SummitScopes::WritePaymentProfiles]]], tags: ['Payment Gateway Profiles'], parameters: [ new OA\Parameter( @@ -279,11 +273,9 @@ public function __construct response: 204, description: 'Payment gateway profile deleted successfully' ), - 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_NOT_FOUND, description: "Not Found"), new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), ] )] diff --git a/app/Swagger/schemas.php b/app/Swagger/schemas.php index e82b226e0..430b4ea74 100644 --- a/app/Swagger/schemas.php +++ b/app/Swagger/schemas.php @@ -469,6 +469,24 @@ class ChunkedFileUploadRequestSchema { } +#[OA\SecurityScheme( + type: 'oauth2', + securityScheme: 'summit_payment_gateway_oauth2', + flows: [ + new OA\Flow( + authorizationUrl: L5_SWAGGER_CONST_AUTH_URL, + tokenUrl: L5_SWAGGER_CONST_TOKEN_URL, + flow: 'authorizationCode', + scopes: [ + SummitScopes::ReadPaymentProfiles => 'Read Payment Profiles', + SummitScopes::WritePaymentProfiles => 'Write Payment Profiles', + ], + ), + ], + ) +] +class PaymentGatewayAuthSchema{} + #[OA\Schema( schema: 'PaginatedOrganizationsResponse', allOf: [ From 3e62d3ccc76882fe998aebf27df48774fa851b65 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Fri, 7 Nov 2025 18:24:29 +0000 Subject: [PATCH 05/11] fix: security scopes --- ...uth2PaymentGatewayProfileApiController.php | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php index 97a7eafd9..0e6bc55bb 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php @@ -79,7 +79,10 @@ public function __construct path: '/api/v1/summits/{id}/payment-gateway-profiles', summary: 'Get all payment gateway profiles for a summit', description: 'Retrieves a paginated list of payment gateway profiles configured for a specific summit. Payment profiles manage payment processing for registrations and bookable rooms.', - security: [['summit_payment_gateway_oauth2' => [SummitScopes::ReadPaymentProfiles]]], + security: [['summit_payment_gateway_oauth2' => + SummitScopes::ReadAllSummitData, + SummitScopes::ReadPaymentProfiles + ]], tags: ['Payment Gateway Profiles'], parameters: [ new OA\Parameter( @@ -140,7 +143,10 @@ public function __construct path: '/api/v1/summits/{id}/payment-gateway-profiles/{payment_profile_id}', summary: 'Get a payment gateway profile by ID', description: 'Retrieves detailed information about a specific payment gateway profile.', - security: [['summit_payment_gateway_oauth2' => [SummitScopes::ReadPaymentProfiles]]], + security: [['summit_payment_gateway_oauth2' => + SummitScopes::ReadAllSummitData, + SummitScopes::ReadPaymentProfiles + ]], tags: ['Payment Gateway Profiles'], parameters: [ new OA\Parameter( @@ -175,7 +181,10 @@ public function __construct path: '/api/v1/summits/{id}/payment-gateway-profiles', summary: 'Create a new payment gateway profile', description: 'Creates a new payment gateway profile for the summit. Supports Stripe and LawPay providers.', - security: [['summit_payment_gateway_oauth2' => [SummitScopes::WritePaymentProfiles]]], + security: [['summit_payment_gateway_oauth2' => + SummitScopes::WriteSummitData, + SummitScopes::WritePaymentProfiles + ]], tags: ['Payment Gateway Profiles'], parameters: [ new OA\Parameter( @@ -209,7 +218,10 @@ public function __construct path: '/api/v1/summits/{id}/payment-gateway-profiles/{payment_profile_id}', summary: 'Update a payment gateway profile', description: 'Updates an existing payment gateway profile.', - security: [['summit_payment_gateway_oauth2' => [SummitScopes::WritePaymentProfiles]]], + security: [['summit_payment_gateway_oauth2' => + SummitScopes::WriteSummitData, + SummitScopes::WritePaymentProfiles + ]], tags: ['Payment Gateway Profiles'], parameters: [ new OA\Parameter( @@ -250,7 +262,10 @@ public function __construct path: '/api/v1/summits/{id}/payment-gateway-profiles/{payment_profile_id}', summary: 'Delete a payment gateway profile', description: 'Deletes an existing payment gateway profile from the summit.', - security: [['summit_payment_gateway_oauth2' => [SummitScopes::WritePaymentProfiles]]], + security: [['summit_payment_gateway_oauth2' => + SummitScopes::WriteSummitData, + SummitScopes::WritePaymentProfiles + ]], tags: ['Payment Gateway Profiles'], parameters: [ new OA\Parameter( From 45f89dde2fa06e039af7992f10b26fca7d9ed720 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Tue, 11 Nov 2025 21:35:16 +0000 Subject: [PATCH 06/11] fix: Security schema --- ...uth2PaymentGatewayProfileApiController.php | 61 +++++++++++++++++++ app/Swagger/schemas.php | 18 ------ 2 files changed, 61 insertions(+), 18 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php index 0e6bc55bb..ed87d777b 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php @@ -14,6 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. **/ +use App\Models\Foundation\Main\IGroup; use App\Models\Foundation\Summit\Repositories\IPaymentGatewayProfileRepository; use App\Security\SummitScopes; use App\Services\Model\IPaymentGatewayProfileService; @@ -25,6 +26,26 @@ use OpenApi\Attributes as OA; use Symfony\Component\HttpFoundation\Response; +#[OA\SecurityScheme( + type: 'oauth2', + securityScheme: 'summit_payment_gateway_oauth2', + flows: [ + new OA\Flow( + authorizationUrl: L5_SWAGGER_CONST_AUTH_URL, + tokenUrl: L5_SWAGGER_CONST_TOKEN_URL, + flow: 'authorizationCode', + scopes: [ + SummitScopes::ReadAllSummitData => 'Read all summit data', + SummitScopes::ReadPaymentProfiles => 'Read payment profiles', + SummitScopes::WriteSummitData => 'Write summit data', + SummitScopes::WritePaymentProfiles => 'Write payment profiles', + ], + ), + ], + ) +] +class OAuth2CPaymentGatewayProfileAPIAuthSchema{} + /** * Class OAuth2PaymentGatewayProfileApiController * @package App\Http\Controller @@ -79,6 +100,14 @@ public function __construct path: '/api/v1/summits/{id}/payment-gateway-profiles', summary: 'Get all payment gateway profiles for a summit', description: 'Retrieves a paginated list of payment gateway profiles configured for a specific summit. Payment profiles manage payment processing for registrations and bookable rooms.', + x: [ + 'required-groups' => [ + IGroup::SuperAdmins, + IGroup::Administrators, + IGroup::SummitAdministrators, + IGroup::SummitRegistrationAdmins, + ] + ], security: [['summit_payment_gateway_oauth2' => SummitScopes::ReadAllSummitData, SummitScopes::ReadPaymentProfiles @@ -143,6 +172,14 @@ public function __construct path: '/api/v1/summits/{id}/payment-gateway-profiles/{payment_profile_id}', summary: 'Get a payment gateway profile by ID', description: 'Retrieves detailed information about a specific payment gateway profile.', + x: [ + 'required-groups' => [ + IGroup::SuperAdmins, + IGroup::Administrators, + IGroup::SummitAdministrators, + IGroup::SummitRegistrationAdmins, + ] + ], security: [['summit_payment_gateway_oauth2' => SummitScopes::ReadAllSummitData, SummitScopes::ReadPaymentProfiles @@ -181,6 +218,14 @@ public function __construct path: '/api/v1/summits/{id}/payment-gateway-profiles', summary: 'Create a new payment gateway profile', description: 'Creates a new payment gateway profile for the summit. Supports Stripe and LawPay providers.', + x: [ + 'required-groups' => [ + IGroup::SuperAdmins, + IGroup::Administrators, + IGroup::SummitAdministrators, + IGroup::SummitRegistrationAdmins, + ] + ], security: [['summit_payment_gateway_oauth2' => SummitScopes::WriteSummitData, SummitScopes::WritePaymentProfiles @@ -218,6 +263,14 @@ public function __construct path: '/api/v1/summits/{id}/payment-gateway-profiles/{payment_profile_id}', summary: 'Update a payment gateway profile', description: 'Updates an existing payment gateway profile.', + x: [ + 'required-groups' => [ + IGroup::SuperAdmins, + IGroup::Administrators, + IGroup::SummitAdministrators, + IGroup::SummitRegistrationAdmins, + ] + ], security: [['summit_payment_gateway_oauth2' => SummitScopes::WriteSummitData, SummitScopes::WritePaymentProfiles @@ -262,6 +315,14 @@ public function __construct path: '/api/v1/summits/{id}/payment-gateway-profiles/{payment_profile_id}', summary: 'Delete a payment gateway profile', description: 'Deletes an existing payment gateway profile from the summit.', + x: [ + 'required-groups' => [ + IGroup::SuperAdmins, + IGroup::Administrators, + IGroup::SummitAdministrators, + IGroup::SummitRegistrationAdmins, + ] + ], security: [['summit_payment_gateway_oauth2' => SummitScopes::WriteSummitData, SummitScopes::WritePaymentProfiles diff --git a/app/Swagger/schemas.php b/app/Swagger/schemas.php index 430b4ea74..e82b226e0 100644 --- a/app/Swagger/schemas.php +++ b/app/Swagger/schemas.php @@ -469,24 +469,6 @@ class ChunkedFileUploadRequestSchema { } -#[OA\SecurityScheme( - type: 'oauth2', - securityScheme: 'summit_payment_gateway_oauth2', - flows: [ - new OA\Flow( - authorizationUrl: L5_SWAGGER_CONST_AUTH_URL, - tokenUrl: L5_SWAGGER_CONST_TOKEN_URL, - flow: 'authorizationCode', - scopes: [ - SummitScopes::ReadPaymentProfiles => 'Read Payment Profiles', - SummitScopes::WritePaymentProfiles => 'Write Payment Profiles', - ], - ), - ], - ) -] -class PaymentGatewayAuthSchema{} - #[OA\Schema( schema: 'PaginatedOrganizationsResponse', allOf: [ From ccf827174b95fe331a91bfde196bf3721c6ffe9f Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Thu, 13 Nov 2025 19:46:36 +0000 Subject: [PATCH 07/11] chore: Move the security schema for the controller to its own file --- ...uth2PaymentGatewayProfileApiController.php | 19 ------------- ...th2CPaymentGatewayProfileAPIAuthSchema.php | 27 +++++++++++++++++++ 2 files changed, 27 insertions(+), 19 deletions(-) create mode 100644 app/Swagger/Security/OAuth2CPaymentGatewayProfileAPIAuthSchema.php diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php index ed87d777b..2119feb1c 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php @@ -26,25 +26,6 @@ use OpenApi\Attributes as OA; use Symfony\Component\HttpFoundation\Response; -#[OA\SecurityScheme( - type: 'oauth2', - securityScheme: 'summit_payment_gateway_oauth2', - flows: [ - new OA\Flow( - authorizationUrl: L5_SWAGGER_CONST_AUTH_URL, - tokenUrl: L5_SWAGGER_CONST_TOKEN_URL, - flow: 'authorizationCode', - scopes: [ - SummitScopes::ReadAllSummitData => 'Read all summit data', - SummitScopes::ReadPaymentProfiles => 'Read payment profiles', - SummitScopes::WriteSummitData => 'Write summit data', - SummitScopes::WritePaymentProfiles => 'Write payment profiles', - ], - ), - ], - ) -] -class OAuth2CPaymentGatewayProfileAPIAuthSchema{} /** * Class OAuth2PaymentGatewayProfileApiController diff --git a/app/Swagger/Security/OAuth2CPaymentGatewayProfileAPIAuthSchema.php b/app/Swagger/Security/OAuth2CPaymentGatewayProfileAPIAuthSchema.php new file mode 100644 index 000000000..c3ee66a3a --- /dev/null +++ b/app/Swagger/Security/OAuth2CPaymentGatewayProfileAPIAuthSchema.php @@ -0,0 +1,27 @@ + 'Read all summit data', + SummitScopes::ReadPaymentProfiles => 'Read payment profiles', + SummitScopes::WriteSummitData => 'Write summit data', + SummitScopes::WritePaymentProfiles => 'Write payment profiles', + ], + ), + ], + ) +] +class OAuth2CPaymentGatewayProfileAPIAuthSchema{} From 32896fd4553fd59c9fde73d3f7a848a25e6808ce Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Tue, 2 Dec 2025 21:39:46 +0000 Subject: [PATCH 08/11] fix: format of the security definitions --- ...uth2PaymentGatewayProfileApiController.php | 85 ++++++++++++------- 1 file changed, 53 insertions(+), 32 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php index 2119feb1c..f1b51cd0f 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php @@ -57,8 +57,7 @@ public function __construct ISummitRepository $summit_repository, IPaymentGatewayProfileService $service, IResourceServerContext $resource_server_context - ) - { + ) { parent::__construct($resource_server_context); $this->repository = $repository; $this->summit_repository = $summit_repository; @@ -89,10 +88,14 @@ public function __construct IGroup::SummitRegistrationAdmins, ] ], - security: [['summit_payment_gateway_oauth2' => - SummitScopes::ReadAllSummitData, - SummitScopes::ReadPaymentProfiles - ]], + security: [ + [ + 'summit_payment_gateway_oauth2' => [ + SummitScopes::ReadAllSummitData, + SummitScopes::ReadPaymentProfiles + ] + ] + ], tags: ['Payment Gateway Profiles'], parameters: [ new OA\Parameter( @@ -161,10 +164,13 @@ public function __construct IGroup::SummitRegistrationAdmins, ] ], - security: [['summit_payment_gateway_oauth2' => - SummitScopes::ReadAllSummitData, - SummitScopes::ReadPaymentProfiles - ]], + security: [ + [ + 'summit_payment_gateway_oauth2' => + SummitScopes::ReadAllSummitData, + SummitScopes::ReadPaymentProfiles + ] + ], tags: ['Payment Gateway Profiles'], parameters: [ new OA\Parameter( @@ -207,10 +213,13 @@ public function __construct IGroup::SummitRegistrationAdmins, ] ], - security: [['summit_payment_gateway_oauth2' => - SummitScopes::WriteSummitData, - SummitScopes::WritePaymentProfiles - ]], + security: [ + [ + 'summit_payment_gateway_oauth2' => + SummitScopes::WriteSummitData, + SummitScopes::WritePaymentProfiles + ] + ], tags: ['Payment Gateway Profiles'], parameters: [ new OA\Parameter( @@ -252,10 +261,13 @@ public function __construct IGroup::SummitRegistrationAdmins, ] ], - security: [['summit_payment_gateway_oauth2' => - SummitScopes::WriteSummitData, - SummitScopes::WritePaymentProfiles - ]], + security: [ + [ + 'summit_payment_gateway_oauth2' => + SummitScopes::WriteSummitData, + SummitScopes::WritePaymentProfiles + ] + ], tags: ['Payment Gateway Profiles'], parameters: [ new OA\Parameter( @@ -304,10 +316,13 @@ public function __construct IGroup::SummitRegistrationAdmins, ] ], - security: [['summit_payment_gateway_oauth2' => - SummitScopes::WriteSummitData, - SummitScopes::WritePaymentProfiles - ]], + security: [ + [ + 'summit_payment_gateway_oauth2' => + SummitScopes::WriteSummitData, + SummitScopes::WritePaymentProfiles + ] + ], tags: ['Payment Gateway Profiles'], parameters: [ new OA\Parameter( @@ -396,46 +411,52 @@ protected function updateChild(Summit $summit, int $child_id, array $payload): I /** * @return array */ - protected function getFilterRules():array + protected function getFilterRules(): array { return [ 'application_type' => ['=@', '=='], - 'active' => ['=='], + 'active' => ['=='], ]; } /** * @return array */ - protected function getFilterValidatorRules():array{ + protected function getFilterValidatorRules(): array + { return [ 'application_type' => 'sometimes|required|string', - 'active' => 'sometimes|required|boolean', + 'active' => 'sometimes|required|boolean', ]; } /** * @return array */ - protected function getOrderRules():array{ + protected function getOrderRules(): array + { return [ 'id', 'application_type', ]; } - protected function serializerType():string{ + protected function serializerType(): string + { return SerializerRegistry::SerializerType_Private; } - protected function addSerializerType():string{ + protected function addSerializerType(): string + { return SerializerRegistry::SerializerType_Private; } - protected function updateSerializerType():string{ + protected function updateSerializerType(): string + { return SerializerRegistry::SerializerType_Private; } - public function getChildSerializer(){ + public function getChildSerializer() + { return SerializerRegistry::SerializerType_Private; } -} +} \ No newline at end of file From 8c16c21bec0d169109243f20d2672d88bf5b707a Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Tue, 2 Dec 2025 21:41:29 +0000 Subject: [PATCH 09/11] chore: add operationId --- .../Summit/OAuth2PaymentGatewayProfileApiController.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php index f1b51cd0f..876307df1 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php @@ -79,6 +79,7 @@ public function __construct #[OA\Get( path: '/api/v1/summits/{id}/payment-gateway-profiles', summary: 'Get all payment gateway profiles for a summit', + operationId: 'getAllPaymentGatewayProfiles', description: 'Retrieves a paginated list of payment gateway profiles configured for a specific summit. Payment profiles manage payment processing for registrations and bookable rooms.', x: [ 'required-groups' => [ @@ -155,6 +156,7 @@ public function __construct #[OA\Get( path: '/api/v1/summits/{id}/payment-gateway-profiles/{payment_profile_id}', summary: 'Get a payment gateway profile by ID', + operationId: 'getPaymentGatewayProfile', description: 'Retrieves detailed information about a specific payment gateway profile.', x: [ 'required-groups' => [ @@ -204,6 +206,7 @@ public function __construct #[OA\Post( path: '/api/v1/summits/{id}/payment-gateway-profiles', summary: 'Create a new payment gateway profile', + operationId: 'createPaymentGatewayProfile', description: 'Creates a new payment gateway profile for the summit. Supports Stripe and LawPay providers.', x: [ 'required-groups' => [ @@ -252,6 +255,7 @@ public function __construct #[OA\Put( path: '/api/v1/summits/{id}/payment-gateway-profiles/{payment_profile_id}', summary: 'Update a payment gateway profile', + operationId: 'updatePaymentGatewayProfile', description: 'Updates an existing payment gateway profile.', x: [ 'required-groups' => [ @@ -307,6 +311,7 @@ public function __construct #[OA\Delete( path: '/api/v1/summits/{id}/payment-gateway-profiles/{payment_profile_id}', summary: 'Delete a payment gateway profile', + operationId: 'deletePaymentGatewayProfile', description: 'Deletes an existing payment gateway profile from the summit.', x: [ 'required-groups' => [ From 4e0ced1929aea15de6d29729ef78a8a1ebff01cd Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Thu, 11 Dec 2025 20:24:55 +0000 Subject: [PATCH 10/11] chore: include PR requested changes --- ...uth2PaymentGatewayProfileApiController.php | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php index 876307df1..940301f87 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2PaymentGatewayProfileApiController.php @@ -168,9 +168,10 @@ public function __construct ], security: [ [ - 'summit_payment_gateway_oauth2' => + 'summit_payment_gateway_oauth2' => [ SummitScopes::ReadAllSummitData, - SummitScopes::ReadPaymentProfiles + SummitScopes::ReadPaymentProfiles + ] ] ], tags: ['Payment Gateway Profiles'], @@ -218,9 +219,10 @@ public function __construct ], security: [ [ - 'summit_payment_gateway_oauth2' => + 'summit_payment_gateway_oauth2' => [ SummitScopes::WriteSummitData, - SummitScopes::WritePaymentProfiles + SummitScopes::WritePaymentProfiles + ] ] ], tags: ['Payment Gateway Profiles'], @@ -267,9 +269,10 @@ public function __construct ], security: [ [ - 'summit_payment_gateway_oauth2' => + 'summit_payment_gateway_oauth2' => [ SummitScopes::WriteSummitData, - SummitScopes::WritePaymentProfiles + SummitScopes::WritePaymentProfiles + ] ] ], tags: ['Payment Gateway Profiles'], @@ -323,9 +326,10 @@ public function __construct ], security: [ [ - 'summit_payment_gateway_oauth2' => + 'summit_payment_gateway_oauth2' => [ SummitScopes::WriteSummitData, - SummitScopes::WritePaymentProfiles + SummitScopes::WritePaymentProfiles + ] ] ], tags: ['Payment Gateway Profiles'], @@ -464,4 +468,4 @@ public function getChildSerializer() { return SerializerRegistry::SerializerType_Private; } -} \ No newline at end of file +} From e33a3c4e9e07f1584df7371a0454d545c6cc97af Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Thu, 11 Dec 2025 20:27:17 +0000 Subject: [PATCH 11/11] fix: incorrect merge --- app/Swagger/schemas.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/Swagger/schemas.php b/app/Swagger/schemas.php index e82b226e0..b940875b5 100644 --- a/app/Swagger/schemas.php +++ b/app/Swagger/schemas.php @@ -499,9 +499,6 @@ class PaginatedOrganizationsResponseSchema class OrganizationCreateRequestSchema { } -class ChunkedFileUploadRequestSchema -{ -} #[OA\Schema( schema: 'PaymentGatewayProfile',