From d13d4e01abee292c2f9f3e41ef3efdc8a3714530 Mon Sep 17 00:00:00 2001 From: smarcet Date: Thu, 2 Oct 2025 13:23:36 -0300 Subject: [PATCH 01/17] chore: add to table SummitAttendeeTicket fild summit id to improve performance chore: add needed IDX --- ...DoctrineSummitAttendeeTicketRepository.php | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/app/Repositories/Summit/DoctrineSummitAttendeeTicketRepository.php b/app/Repositories/Summit/DoctrineSummitAttendeeTicketRepository.php index 9629a92fd..769fb9d63 100644 --- a/app/Repositories/Summit/DoctrineSummitAttendeeTicketRepository.php +++ b/app/Repositories/Summit/DoctrineSummitAttendeeTicketRepository.php @@ -52,26 +52,26 @@ public function __construct(EntityManagerInterface $em, ClassMetadata $class) /** @var array}> */ private array $joinCatalog = [ - 'o' => ['e.order', 'join', []], - 's' => ['e.summit', 'join', []], - 'ord_m' => ['o.owner', 'leftJoin', ['o']], - 'a' => ['e.owner', 'leftJoin', []], - 'a_c' => ['a.company', 'leftJoin', ['a']], - 'm' => ['a.member', 'leftJoin', ['a']], - 'am' => ['a.manager', 'leftJoin', ['a']], - 'm2' => ['am.member', 'leftJoin', ['am']], - 'b' => ['e.badge', 'leftJoin', []], - 'bt' => ['b.type', 'leftJoin', ['b']], - 'al' => ['bt.access_levels', 'leftJoin', ['bt']], - 'bf' => ['b.features', 'leftJoin', ['b']], - 'bt_bf' => ['bt.badge_features', 'leftJoin', ['bt']], - 'prt' => ['b.prints', 'leftJoin', ['b']], - 'rr' => ['e.refund_requests', 'leftJoin', []], - 'ta' => ['e.applied_taxes', 'leftJoin', []], - 'tt' => ['e.ticket_type', 'join', []], - 'pc' => ['e.promo_code', 'leftJoin', []], - 'pct' => ['pc.tags', 'leftJoin', ['pc']], - 'avt' => ['bt.allowed_view_types', 'join', ['bt']], + 'o' => ['e.order', 'join', []], + 's' => ['e.summit', 'join', []], + 'ord_m' => ['o.owner', 'leftJoin', ['o']], + 'a' => ['e.owner', 'leftJoin', []], + 'a_c' => ['a.company', 'leftJoin', ['a']], + 'm' => ['a.member', 'leftJoin', ['a']], + 'am' => ['a.manager', 'leftJoin', ['a']], + 'm2' => ['am.member', 'leftJoin', ['am']], + 'b' => ['e.badge', 'leftJoin', []], + 'bt' => ['b.type', 'leftJoin', ['b']], + 'al' => ['bt.access_levels', 'leftJoin', ['bt']], + 'bf' => ['b.features', 'leftJoin', ['b']], + 'bt_bf' => ['bt.badge_features', 'leftJoin', ['bt']], + 'prt' => ['b.prints', 'leftJoin', ['b']], + 'rr' => ['e.refund_requests', 'leftJoin', []], + 'ta' => ['e.applied_taxes', 'leftJoin', []], + 'tt' => ['e.ticket_type', 'join', []], + 'pc' => ['e.promo_code', 'leftJoin', []], + 'pct' => ['pc.tags', 'leftJoin', ['pc']], + 'avt' => ['bt.allowed_view_types', 'join', ['bt']], ]; private function ensureJoin(QueryBuilder $qb, string $alias): void From 9dbbe4a26f46f8f9fbb834a2128a44af09abc386 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Tue, 7 Oct 2025 15:17:04 -0300 Subject: [PATCH 02/17] feat: Extend Swagger Coverage for controller Apis/Protected/Summit/OAuth2SummitBadgesApiController.php --- .../OAuth2SummitBadgesApiController.php | 131 +++++++++++++++++- ...DoctrineSummitAttendeeTicketRepository.php | 40 +++--- 2 files changed, 150 insertions(+), 21 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php index 55cac8eb6..3f383af2b 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php @@ -12,9 +12,11 @@ * limitations under the License. **/ use App\Models\Foundation\Summit\Repositories\ISummitAttendeeBadgeRepository; +use App\Security\SummitScopes; use models\oauth2\IResourceServerContext; use models\summit\ISummitRepository; use ModelSerializers\SerializerRegistry; +use OpenApi\Attributes as OA; use utils\Filter; use utils\FilterElement; @@ -52,6 +54,78 @@ protected function getSummitRepository(): ISummitRepository return $this->summit_repository; } + // OpenAPI Documentation + + #[OA\Get( + path: '/api/v1/summits/{id}/badges', + summary: 'Get all attendee badges for a summit', + description: 'Retrieves a paginated list of attendee badges for a specific summit. Badges are issued to attendees and contain ticket information, badge type, printing details, and feature assignments (ribbons, special access indicators, etc.).', + security: [['oauth2_security_scope' => [SummitScopes::ReadAllSummitData]]], + tags: ['Summit Badges'], + 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: owner_first_name, owner_last_name, owner_full_name, owner_email, ticket_number, order_number (all support =@, ==). Operators: == (equals), =@ (contains)', + style: 'form', + explode: true, + schema: new OA\Schema( + type: 'array', + items: new OA\Items(type: 'string', example: 'owner_email==john@example.com') + ) + ), + new OA\Parameter( + name: 'order', + in: 'query', + required: false, + description: 'Order by field(s). Available fields: id, ticket_number, order_number, created. Use "-" prefix for descending order.', + schema: new OA\Schema(type: 'string', example: 'created') + ), + new OA\Parameter( + name: 'expand', + in: 'query', + required: false, + description: 'Expand relationships. Available: ticket, type, features', + schema: new OA\Schema(type: 'string', example: 'ticket,type,features') + ), + ], + responses: [ + new OA\Response( + response: 200, + description: 'Attendee badges retrieved successfully', + content: new OA\JsonContent(ref: '#/components/schemas/PaginatedSummitAttendeeBadgesResponse') + ), + 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'), + ] + )] + /** * @param $summit_id * @return mixed @@ -103,6 +177,61 @@ function(){ ); } + #[OA\Get( + path: '/api/v1/summits/{id}/badges/csv', + summary: 'Export all attendee badges for a summit to CSV', + description: 'Exports a CSV file containing all attendee badges for a specific summit. Supports the same filtering and ordering capabilities as the standard list endpoint.', + security: [['oauth2_security_scope' => [SummitScopes::ReadAllSummitData]]], + tags: ['Summit Badges'], + parameters: [ + new OA\Parameter( + name: 'id', + in: 'path', + required: true, + description: 'Summit ID', + schema: new OA\Schema(type: 'integer') + ), + new OA\Parameter( + name: 'filter[]', + in: 'query', + required: false, + description: 'Filter expressions. Format: fieldvalue. Available fields: owner_first_name, owner_last_name, owner_full_name, owner_email, ticket_number, order_number (all support =@, ==)', + style: 'form', + explode: true, + schema: new OA\Schema( + type: 'array', + items: new OA\Items(type: 'string', example: 'owner_email=@example.com') + ) + ), + new OA\Parameter( + name: 'order', + in: 'query', + required: false, + description: 'Order by field(s). Available fields: id, ticket_number, order_number, created', + schema: new OA\Schema(type: 'string', example: '-created') + ), + ], + responses: [ + new OA\Response( + response: 200, + description: 'CSV file generated successfully', + content: new OA\MediaType( + mediaType: 'text/csv', + schema: new OA\Schema( + type: 'string', + format: 'binary' + ) + ) + ), + 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'), + ] + )] + /** * @param $summit_id * @return mixed @@ -163,4 +292,4 @@ function(){ -} \ No newline at end of file +} diff --git a/app/Repositories/Summit/DoctrineSummitAttendeeTicketRepository.php b/app/Repositories/Summit/DoctrineSummitAttendeeTicketRepository.php index 769fb9d63..9629a92fd 100644 --- a/app/Repositories/Summit/DoctrineSummitAttendeeTicketRepository.php +++ b/app/Repositories/Summit/DoctrineSummitAttendeeTicketRepository.php @@ -52,26 +52,26 @@ public function __construct(EntityManagerInterface $em, ClassMetadata $class) /** @var array}> */ private array $joinCatalog = [ - 'o' => ['e.order', 'join', []], - 's' => ['e.summit', 'join', []], - 'ord_m' => ['o.owner', 'leftJoin', ['o']], - 'a' => ['e.owner', 'leftJoin', []], - 'a_c' => ['a.company', 'leftJoin', ['a']], - 'm' => ['a.member', 'leftJoin', ['a']], - 'am' => ['a.manager', 'leftJoin', ['a']], - 'm2' => ['am.member', 'leftJoin', ['am']], - 'b' => ['e.badge', 'leftJoin', []], - 'bt' => ['b.type', 'leftJoin', ['b']], - 'al' => ['bt.access_levels', 'leftJoin', ['bt']], - 'bf' => ['b.features', 'leftJoin', ['b']], - 'bt_bf' => ['bt.badge_features', 'leftJoin', ['bt']], - 'prt' => ['b.prints', 'leftJoin', ['b']], - 'rr' => ['e.refund_requests', 'leftJoin', []], - 'ta' => ['e.applied_taxes', 'leftJoin', []], - 'tt' => ['e.ticket_type', 'join', []], - 'pc' => ['e.promo_code', 'leftJoin', []], - 'pct' => ['pc.tags', 'leftJoin', ['pc']], - 'avt' => ['bt.allowed_view_types', 'join', ['bt']], + 'o' => ['e.order', 'join', []], + 's' => ['e.summit', 'join', []], + 'ord_m' => ['o.owner', 'leftJoin', ['o']], + 'a' => ['e.owner', 'leftJoin', []], + 'a_c' => ['a.company', 'leftJoin', ['a']], + 'm' => ['a.member', 'leftJoin', ['a']], + 'am' => ['a.manager', 'leftJoin', ['a']], + 'm2' => ['am.member', 'leftJoin', ['am']], + 'b' => ['e.badge', 'leftJoin', []], + 'bt' => ['b.type', 'leftJoin', ['b']], + 'al' => ['bt.access_levels', 'leftJoin', ['bt']], + 'bf' => ['b.features', 'leftJoin', ['b']], + 'bt_bf' => ['bt.badge_features', 'leftJoin', ['bt']], + 'prt' => ['b.prints', 'leftJoin', ['b']], + 'rr' => ['e.refund_requests', 'leftJoin', []], + 'ta' => ['e.applied_taxes', 'leftJoin', []], + 'tt' => ['e.ticket_type', 'join', []], + 'pc' => ['e.promo_code', 'leftJoin', []], + 'pct' => ['pc.tags', 'leftJoin', ['pc']], + 'avt' => ['bt.allowed_view_types', 'join', ['bt']], ]; private function ensureJoin(QueryBuilder $qb, string $alias): void From 53472c3b873ebca5fa767bce11c6f7744daa5295 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Tue, 7 Oct 2025 15:21:06 -0300 Subject: [PATCH 03/17] chore: Move schemas to the new app/Swagger/SummitSchemas.php file --- app/Swagger/SummitSchemas.php | 101 +++++++++++++++++++++++++++++++++- 1 file changed, 100 insertions(+), 1 deletion(-) diff --git a/app/Swagger/SummitSchemas.php b/app/Swagger/SummitSchemas.php index 3803ca47b..a8ffa0a8f 100644 --- a/app/Swagger/SummitSchemas.php +++ b/app/Swagger/SummitSchemas.php @@ -4,7 +4,106 @@ use OpenApi\Attributes as OA; -// + +// Summit Badge Feature Types + +#[OA\Schema( + schema: 'SummitBadgeFeatureType', + type: 'object', + properties: [ + new OA\Property(property: 'id', type: 'integer', example: 1), + new OA\Property(property: 'name', type: 'string', example: 'Speaker Ribbon'), + new OA\Property(property: 'description', type: 'string', nullable: true, example: 'Special ribbon indicating speaker status'), + new OA\Property(property: 'template_content', type: 'string', nullable: true, example: '
{{name}}
'), + new OA\Property(property: 'summit_id', type: 'integer', example: 42), + new OA\Property(property: 'image', type: 'string', nullable: true, example: 'https://example.com/images/speaker-ribbon.png'), + ] +)] +class SummitBadgeFeatureTypeSchema {} + +#[OA\Schema( + schema: 'PaginatedSummitBadgeFeatureTypesResponse', + allOf: [ + new OA\Schema(ref: '#/components/schemas/PaginateDataSchemaResponse'), + new OA\Schema( + type: 'object', + properties: [ + new OA\Property( + property: 'data', + type: 'array', + items: new OA\Items(ref: '#/components/schemas/SummitBadgeFeatureType') + ) + ] + ) + ] +)] +class PaginatedSummitBadgeFeatureTypesResponseSchema {} + +#[OA\Schema( + schema: 'SummitBadgeFeatureTypeCreateRequest', + type: 'object', + required: ['name'], + properties: [ + new OA\Property(property: 'name', type: 'string', example: 'Speaker Ribbon'), + new OA\Property(property: 'description', type: 'string', nullable: true, example: 'Special ribbon for speakers'), + new OA\Property(property: 'template_content', type: 'string', nullable: true, example: '
{{name}}
'), + ] +)] +class SummitBadgeFeatureTypeCreateRequestSchema {} + +#[OA\Schema( + schema: 'SummitBadgeFeatureTypeUpdateRequest', + type: 'object', + properties: [ + new OA\Property(property: 'name', type: 'string', example: 'VIP Ribbon'), + new OA\Property(property: 'description', type: 'string', nullable: true, example: 'VIP attendee designation'), + new OA\Property(property: 'template_content', type: 'string', nullable: true, example: '
{{name}}
'), + ] +)] +class SummitBadgeFeatureTypeUpdateRequestSchema {} + +// Summit Attendee Badges + +#[OA\Schema( + schema: 'SummitAttendeeBadge', + type: 'object', + properties: [ + new OA\Property(property: 'id', type: 'integer', example: 1), + new OA\Property(property: 'print_date', type: 'integer', nullable: true, example: 1633024800, description: 'Unix timestamp of when the badge was printed'), + new OA\Property(property: 'qr_code', type: 'string', nullable: true, example: 'QR123456789'), + new OA\Property(property: 'is_void', type: 'boolean', example: false, description: 'Whether the badge has been voided'), + new OA\Property(property: 'ticket_id', type: 'integer', example: 123, description: 'Associated ticket ID'), + new OA\Property(property: 'type_id', type: 'integer', example: 5, description: 'Badge type ID'), + new OA\Property(property: 'printed_times', type: 'integer', example: 2, description: 'Number of times this badge has been printed'), + new OA\Property(property: 'print_excerpt', type: 'string', example: 'John Doe - Speaker', description: 'Short text excerpt for printing'), + new OA\Property( + property: 'features', + type: 'array', + description: 'Array of feature IDs assigned to this badge (use expand=features for full details)', + items: new OA\Items(type: 'integer'), + example: [1, 2, 3] + ), + ] +)] +class SummitAttendeeBadgeSchema {} + +#[OA\Schema( + schema: 'PaginatedSummitAttendeeBadgesResponse', + allOf: [ + new OA\Schema(ref: '#/components/schemas/PaginateDataSchemaResponse'), + new OA\Schema( + type: 'object', + properties: [ + new OA\Property( + property: 'data', + type: 'array', + items: new OA\Items(ref: '#/components/schemas/SummitAttendeeBadge') + ) + ] + ) + ] +)] +class PaginatedSummitAttendeeBadgesResponseSchema {} #[OA\Schema( schema: 'SummitMediaFileType', From 9ee0675d494f849fe15f0ea22182bdb154c297df Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Tue, 7 Oct 2025 16:58:35 -0300 Subject: [PATCH 04/17] fix: error HTTP responses and remove reference --- .../OAuth2SummitBadgesApiController.php | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php index 3f383af2b..ddad9fe1d 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php @@ -117,12 +117,12 @@ protected function getSummitRepository(): ISummitRepository description: 'Attendee badges retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/PaginatedSummitAttendeeBadgesResponse') ), - 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: 400, description: "Bad Request"), + new OA\Response(response: 401, description: "Unauthorized"), + new OA\Response(response: 403, description: "Forbidden"), + new OA\Response(response: 404, description: "Not Found"), + new OA\Response(response: 412, description: "Precondition Failed"), + new OA\Response(response: 500, description: "Internal Server Error"), ] )] @@ -223,12 +223,12 @@ function(){ ) ) ), - 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: 400, description: "Bad Request"), + new OA\Response(response: 401, description: "Unauthorized"), + new OA\Response(response: 403, description: "Forbidden"), + new OA\Response(response: 404, description: "Not Found"), + new OA\Response(response: 412, description: "Precondition Failed"), + new OA\Response(response: 500, description: "Internal Server Error"), ] )] From 097f89b0235c2de325ca407b271c472ddacb2305 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Tue, 7 Oct 2025 16:59:22 -0300 Subject: [PATCH 05/17] fix: Remove unnecessary schemas and double require --- app/Swagger/SummitSchemas.php | 66 ++++------------------------------- 1 file changed, 6 insertions(+), 60 deletions(-) diff --git a/app/Swagger/SummitSchemas.php b/app/Swagger/SummitSchemas.php index a8ffa0a8f..79c1bafb7 100644 --- a/app/Swagger/SummitSchemas.php +++ b/app/Swagger/SummitSchemas.php @@ -4,64 +4,6 @@ use OpenApi\Attributes as OA; - -// Summit Badge Feature Types - -#[OA\Schema( - schema: 'SummitBadgeFeatureType', - type: 'object', - properties: [ - new OA\Property(property: 'id', type: 'integer', example: 1), - new OA\Property(property: 'name', type: 'string', example: 'Speaker Ribbon'), - new OA\Property(property: 'description', type: 'string', nullable: true, example: 'Special ribbon indicating speaker status'), - new OA\Property(property: 'template_content', type: 'string', nullable: true, example: '
{{name}}
'), - new OA\Property(property: 'summit_id', type: 'integer', example: 42), - new OA\Property(property: 'image', type: 'string', nullable: true, example: 'https://example.com/images/speaker-ribbon.png'), - ] -)] -class SummitBadgeFeatureTypeSchema {} - -#[OA\Schema( - schema: 'PaginatedSummitBadgeFeatureTypesResponse', - allOf: [ - new OA\Schema(ref: '#/components/schemas/PaginateDataSchemaResponse'), - new OA\Schema( - type: 'object', - properties: [ - new OA\Property( - property: 'data', - type: 'array', - items: new OA\Items(ref: '#/components/schemas/SummitBadgeFeatureType') - ) - ] - ) - ] -)] -class PaginatedSummitBadgeFeatureTypesResponseSchema {} - -#[OA\Schema( - schema: 'SummitBadgeFeatureTypeCreateRequest', - type: 'object', - required: ['name'], - properties: [ - new OA\Property(property: 'name', type: 'string', example: 'Speaker Ribbon'), - new OA\Property(property: 'description', type: 'string', nullable: true, example: 'Special ribbon for speakers'), - new OA\Property(property: 'template_content', type: 'string', nullable: true, example: '
{{name}}
'), - ] -)] -class SummitBadgeFeatureTypeCreateRequestSchema {} - -#[OA\Schema( - schema: 'SummitBadgeFeatureTypeUpdateRequest', - type: 'object', - properties: [ - new OA\Property(property: 'name', type: 'string', example: 'VIP Ribbon'), - new OA\Property(property: 'description', type: 'string', nullable: true, example: 'VIP attendee designation'), - new OA\Property(property: 'template_content', type: 'string', nullable: true, example: '
{{name}}
'), - ] -)] -class SummitBadgeFeatureTypeUpdateRequestSchema {} - // Summit Attendee Badges #[OA\Schema( @@ -72,9 +14,13 @@ class SummitBadgeFeatureTypeUpdateRequestSchema {} new OA\Property(property: 'print_date', type: 'integer', nullable: true, example: 1633024800, description: 'Unix timestamp of when the badge was printed'), new OA\Property(property: 'qr_code', type: 'string', nullable: true, example: 'QR123456789'), new OA\Property(property: 'is_void', type: 'boolean', example: false, description: 'Whether the badge has been voided'), + new OA\Property(property: 'printed_times', type: 'integer', example: 2, description: 'Number of times this badge has been printed'), + ], + anyOf: [ new OA\Property(property: 'ticket_id', type: 'integer', example: 123, description: 'Associated ticket ID'), + new OA\Property(property: 'ticket', type: 'Ticket'), new OA\Property(property: 'type_id', type: 'integer', example: 5, description: 'Badge type ID'), - new OA\Property(property: 'printed_times', type: 'integer', example: 2, description: 'Number of times this badge has been printed'), + new OA\Property(property: 'type', type: 'BadgeType'), new OA\Property(property: 'print_excerpt', type: 'string', example: 'John Doe - Speaker', description: 'Short text excerpt for printing'), new OA\Property( property: 'features', @@ -83,7 +29,7 @@ class SummitBadgeFeatureTypeUpdateRequestSchema {} items: new OA\Items(type: 'integer'), example: [1, 2, 3] ), - ] + ], )] class SummitAttendeeBadgeSchema {} From 608f93efa7f68430cee6e971f51fe3c18be4b369 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Wed, 8 Oct 2025 19:15:11 -0300 Subject: [PATCH 06/17] fix: incorrect types and descriptions for errors --- .../OAuth2SummitBadgesApiController.php | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php index ddad9fe1d..071accd1e 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php @@ -17,6 +17,7 @@ use models\summit\ISummitRepository; use ModelSerializers\SerializerRegistry; use OpenApi\Attributes as OA; +use Symfony\Component\HttpFoundation\Response; use utils\Filter; use utils\FilterElement; @@ -117,12 +118,12 @@ protected function getSummitRepository(): ISummitRepository description: 'Attendee badges retrieved successfully', content: new OA\JsonContent(ref: '#/components/schemas/PaginatedSummitAttendeeBadgesResponse') ), - new OA\Response(response: 400, description: "Bad Request"), - new OA\Response(response: 401, description: "Unauthorized"), - new OA\Response(response: 403, description: "Forbidden"), - new OA\Response(response: 404, description: "Not Found"), - new OA\Response(response: 412, description: "Precondition Failed"), - new OA\Response(response: 500, description: "Internal Server Error"), + 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"), ] )] @@ -223,12 +224,12 @@ function(){ ) ) ), - new OA\Response(response: 400, description: "Bad Request"), - new OA\Response(response: 401, description: "Unauthorized"), - new OA\Response(response: 403, description: "Forbidden"), - new OA\Response(response: 404, description: "Not Found"), - new OA\Response(response: 412, description: "Precondition Failed"), - new OA\Response(response: 500, description: "Internal Server Error"), + 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 e2b701731220687285e414fcabf0ae2ee310708b Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Tue, 14 Oct 2025 14:26:30 -0300 Subject: [PATCH 07/17] fix: Change "namespace" word positioning --- .../Protected/Summit/OAuth2SummitBadgesApiController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php index 071accd1e..ec4063ced 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php @@ -1,4 +1,7 @@ - Date: Fri, 31 Oct 2025 15:41:06 -0300 Subject: [PATCH 08/17] fix: add the right security schema --- .../Apis/Protected/Summit/OAuth2SummitBadgesApiController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php index ec4063ced..466b5af0a 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php @@ -64,7 +64,7 @@ protected function getSummitRepository(): ISummitRepository path: '/api/v1/summits/{id}/badges', summary: 'Get all attendee badges for a summit', description: 'Retrieves a paginated list of attendee badges for a specific summit. Badges are issued to attendees and contain ticket information, badge type, printing details, and feature assignments (ribbons, special access indicators, etc.).', - security: [['oauth2_security_scope' => [SummitScopes::ReadAllSummitData]]], + security: [['Bearer' => [SummitScopes::ReadAllSummitData]]], tags: ['Summit Badges'], parameters: [ new OA\Parameter( From b5369cff2ab9200d571142c7944a4cc812e15a54 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Fri, 31 Oct 2025 15:43:25 -0300 Subject: [PATCH 09/17] fix: minort text Title case --- .../Apis/Protected/Summit/OAuth2SummitBadgesApiController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php index 466b5af0a..fc549c17c 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php @@ -124,7 +124,7 @@ protected function getSummitRepository(): ISummitRepository 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"), ] From 3570b3023f658c29ce4377f24fcb5247836529b7 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Thu, 13 Nov 2025 20:00:17 +0000 Subject: [PATCH 10/17] chore: Move the security schema for the controller to its own file --- .../OAuth2SummitBadgesApiController.php | 4 ++-- .../Security/SummitBadgesOauth2Schema.php | 23 +++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 app/Swagger/Security/SummitBadgesOauth2Schema.php diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php index fc549c17c..72a0a0f03 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php @@ -64,7 +64,7 @@ protected function getSummitRepository(): ISummitRepository path: '/api/v1/summits/{id}/badges', summary: 'Get all attendee badges for a summit', description: 'Retrieves a paginated list of attendee badges for a specific summit. Badges are issued to attendees and contain ticket information, badge type, printing details, and feature assignments (ribbons, special access indicators, etc.).', - security: [['Bearer' => [SummitScopes::ReadAllSummitData]]], + security: [['summit_badges_api_oauth2' => [SummitScopes::ReadAllSummitData]]], tags: ['Summit Badges'], parameters: [ new OA\Parameter( @@ -185,7 +185,7 @@ function(){ path: '/api/v1/summits/{id}/badges/csv', summary: 'Export all attendee badges for a summit to CSV', description: 'Exports a CSV file containing all attendee badges for a specific summit. Supports the same filtering and ordering capabilities as the standard list endpoint.', - security: [['oauth2_security_scope' => [SummitScopes::ReadAllSummitData]]], + security: [['summit_badges_api_oauth2' => [SummitScopes::ReadAllSummitData]]], tags: ['Summit Badges'], parameters: [ new OA\Parameter( diff --git a/app/Swagger/Security/SummitBadgesOauth2Schema.php b/app/Swagger/Security/SummitBadgesOauth2Schema.php new file mode 100644 index 000000000..1f3e18c87 --- /dev/null +++ b/app/Swagger/Security/SummitBadgesOauth2Schema.php @@ -0,0 +1,23 @@ + 'Read All Summit Data', + ], + ), + ], + ) +] +class SummitBadgesOAuth2Schema{} From 402a50ce52f04214db13b94a904ff2aba34643ae Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Fri, 21 Nov 2025 17:40:48 +0000 Subject: [PATCH 11/17] chore: add operationId --- .../OAuth2SummitBadgesApiController.php | 97 ++++++++++--------- app/Swagger/SummitSchemas.php | 6 +- 2 files changed, 53 insertions(+), 50 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php index 72a0a0f03..68286d7b9 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php @@ -43,8 +43,7 @@ public function __construct ISummitAttendeeBadgeRepository $repository, ISummitRepository $summit_repository, IResourceServerContext $resource_server_context - ) - { + ) { parent::__construct($resource_server_context); $this->repository = $repository; $this->summit_repository = $summit_repository; @@ -62,6 +61,7 @@ protected function getSummitRepository(): ISummitRepository #[OA\Get( path: '/api/v1/summits/{id}/badges', + operationId: 'getAllBySummit', summary: 'Get all attendee badges for a summit', description: 'Retrieves a paginated list of attendee badges for a specific summit. Badges are issued to attendees and contain ticket information, badge type, printing details, and feature assignments (ribbons, special access indicators, etc.).', security: [['summit_badges_api_oauth2' => [SummitScopes::ReadAllSummitData]]], @@ -134,34 +134,35 @@ protected function getSummitRepository(): ISummitRepository * @param $summit_id * @return mixed */ - public function getAllBySummit($summit_id){ + public function getAllBySummit($summit_id) + { $summit = SummitFinderStrategyFactory::build($this->summit_repository, $this->getResourceServerContext())->find($summit_id); - if (is_null($summit)) return $this->error404(); + if (is_null($summit)) + return $this->error404(); return $this->_getAll( - function(){ + function () { return [ - 'owner_first_name' => ['=@', '=='], - 'owner_last_name' => ['=@', '=='], - 'owner_full_name' => ['=@', '=='], - 'owner_email' => ['=@', '=='], - 'ticket_number' => ['=@', '=='], - 'order_number' => ['=@', '=='], + 'owner_first_name' => ['=@', '=='], + 'owner_last_name' => ['=@', '=='], + 'owner_full_name' => ['=@', '=='], + 'owner_email' => ['=@', '=='], + 'ticket_number' => ['=@', '=='], + 'order_number' => ['=@', '=='], ]; }, - function(){ + function () { return [ - 'owner_first_name' => 'sometimes|string', - 'owner_last_name' => 'sometimes|string', - 'owner_full_name' => 'sometimes|string', - 'owner_email' => 'sometimes|string', - 'ticket_number' => 'sometimes|string', - 'order_number' => 'sometimes|string', + 'owner_first_name' => 'sometimes|string', + 'owner_last_name' => 'sometimes|string', + 'owner_full_name' => 'sometimes|string', + 'owner_email' => 'sometimes|string', + 'ticket_number' => 'sometimes|string', + 'order_number' => 'sometimes|string', ]; }, - function() - { + function () { return [ 'id', 'ticket_number', @@ -169,13 +170,13 @@ function() 'created' ]; }, - function($filter) use($summit){ - if($filter instanceof Filter){ + function ($filter) use ($summit) { + if ($filter instanceof Filter) { $filter->addFilterCondition(FilterElement::makeEqual('summit_id', $summit->getId())); } return $filter; }, - function(){ + function () { return SerializerRegistry::SerializerType_Private; } ); @@ -183,6 +184,7 @@ function(){ #[OA\Get( path: '/api/v1/summits/{id}/badges/csv', + operationId: 'getAllBySummitCSV', summary: 'Export all attendee badges for a summit to CSV', description: 'Exports a CSV file containing all attendee badges for a specific summit. Supports the same filtering and ordering capabilities as the standard list endpoint.', security: [['summit_badges_api_oauth2' => [SummitScopes::ReadAllSummitData]]], @@ -240,34 +242,35 @@ function(){ * @param $summit_id * @return mixed */ - public function getAllBySummitCSV($summit_id){ + public function getAllBySummitCSV($summit_id) + { $summit = SummitFinderStrategyFactory::build($this->summit_repository, $this->getResourceServerContext())->find($summit_id); - if (is_null($summit)) return $this->error404(); + if (is_null($summit)) + return $this->error404(); return $this->_getAllCSV( - function(){ + function () { return [ - 'owner_first_name' => ['=@', '=='], - 'owner_last_name' => ['=@', '=='], - 'owner_full_name' => ['=@', '=='], - 'owner_email' => ['=@', '=='], - 'ticket_number' => ['=@', '=='], - 'order_number' => ['=@', '=='], + 'owner_first_name' => ['=@', '=='], + 'owner_last_name' => ['=@', '=='], + 'owner_full_name' => ['=@', '=='], + 'owner_email' => ['=@', '=='], + 'ticket_number' => ['=@', '=='], + 'order_number' => ['=@', '=='], ]; }, - function(){ + function () { return [ - 'owner_first_name' => 'sometimes|string', - 'owner_last_name' => 'sometimes|string', - 'owner_full_name' => 'sometimes|string', - 'owner_email' => 'sometimes|string', - 'ticket_number' => 'sometimes|string', - 'order_number' => 'sometimes|string', + 'owner_first_name' => 'sometimes|string', + 'owner_last_name' => 'sometimes|string', + 'owner_full_name' => 'sometimes|string', + 'owner_email' => 'sometimes|string', + 'ticket_number' => 'sometimes|string', + 'order_number' => 'sometimes|string', ]; }, - function() - { + function () { return [ 'id', 'ticket_number', @@ -275,19 +278,19 @@ function() 'created' ]; }, - function($filter) use($summit){ - if($filter instanceof Filter){ + function ($filter) use ($summit) { + if ($filter instanceof Filter) { $filter->addFilterCondition(FilterElement::makeEqual('summit_id', $summit->getId())); } return $filter; }, - function(){ + function () { return SerializerRegistry::SerializerType_Private; }, - function(){ + function () { return []; }, - function(){ + function () { return []; }, 'attendees-badges-' @@ -296,4 +299,4 @@ function(){ -} +} \ No newline at end of file diff --git a/app/Swagger/SummitSchemas.php b/app/Swagger/SummitSchemas.php index 79c1bafb7..aa5973567 100644 --- a/app/Swagger/SummitSchemas.php +++ b/app/Swagger/SummitSchemas.php @@ -15,8 +15,6 @@ new OA\Property(property: 'qr_code', type: 'string', nullable: true, example: 'QR123456789'), new OA\Property(property: 'is_void', type: 'boolean', example: false, description: 'Whether the badge has been voided'), new OA\Property(property: 'printed_times', type: 'integer', example: 2, description: 'Number of times this badge has been printed'), - ], - anyOf: [ new OA\Property(property: 'ticket_id', type: 'integer', example: 123, description: 'Associated ticket ID'), new OA\Property(property: 'ticket', type: 'Ticket'), new OA\Property(property: 'type_id', type: 'integer', example: 5, description: 'Badge type ID'), @@ -31,7 +29,9 @@ ), ], )] -class SummitAttendeeBadgeSchema {} +class SummitAttendeeBadgeSchema +{ +} #[OA\Schema( schema: 'PaginatedSummitAttendeeBadgesResponse', From 0a3c7eca3ef8b403c5e5105acd8d3627fc957096 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Fri, 21 Nov 2025 17:45:28 +0000 Subject: [PATCH 12/17] chore: remove expand fields and add a description in related fields to be expanded --- app/Swagger/SummitSchemas.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/Swagger/SummitSchemas.php b/app/Swagger/SummitSchemas.php index aa5973567..2f81f7b08 100644 --- a/app/Swagger/SummitSchemas.php +++ b/app/Swagger/SummitSchemas.php @@ -15,10 +15,8 @@ new OA\Property(property: 'qr_code', type: 'string', nullable: true, example: 'QR123456789'), new OA\Property(property: 'is_void', type: 'boolean', example: false, description: 'Whether the badge has been voided'), new OA\Property(property: 'printed_times', type: 'integer', example: 2, description: 'Number of times this badge has been printed'), - new OA\Property(property: 'ticket_id', type: 'integer', example: 123, description: 'Associated ticket ID'), - new OA\Property(property: 'ticket', type: 'Ticket'), - new OA\Property(property: 'type_id', type: 'integer', example: 5, description: 'Badge type ID'), - new OA\Property(property: 'type', type: 'BadgeType'), + new OA\Property(property: 'ticket_id', type: 'integer', example: 123, description: 'Ticket ID, use expand=ticket for full object details (ticket field)'), + new OA\Property(property: 'type_id', type: 'integer', example: 5, description: 'BadgeType ID, use expand=type for full object details (type field)'), new OA\Property(property: 'print_excerpt', type: 'string', example: 'John Doe - Speaker', description: 'Short text excerpt for printing'), new OA\Property( property: 'features', From 663709833ab5a276a49ae45eb71bea791192ae46 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Fri, 21 Nov 2025 17:53:32 +0000 Subject: [PATCH 13/17] fix: owner email example --- .../Apis/Protected/Summit/OAuth2SummitBadgesApiController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php index 68286d7b9..c6fe47701 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php @@ -206,7 +206,7 @@ function () { explode: true, schema: new OA\Schema( type: 'array', - items: new OA\Items(type: 'string', example: 'owner_email=@example.com') + items: new OA\Items(type: 'string', example: 'owner_email=@john') ) ), new OA\Parameter( From f25d625a1431e8938adeb63c816d43348f9a5ddd Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Fri, 21 Nov 2025 17:54:48 +0000 Subject: [PATCH 14/17] fix: title case on description for Not Found --- .../Apis/Protected/Summit/OAuth2SummitBadgesApiController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php index c6fe47701..0cd99235d 100644 --- a/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php +++ b/app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitBadgesApiController.php @@ -232,7 +232,7 @@ function () { 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"), ] @@ -299,4 +299,4 @@ function () { -} \ No newline at end of file +} From aa55b16654e3a20ee05a5749602ba8f2cdc512ed Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Fri, 21 Nov 2025 18:21:14 +0000 Subject: [PATCH 15/17] chore: include PR requested changes --- .../Models/SummitBadgeFeatureTypeSchema.php | 24 ++++++++++ app/Swagger/Models/SummitBadgeTypeSchema.php | 45 +++++++++++++++++++ app/Swagger/SummitSchemas.php | 12 +++-- 3 files changed, 77 insertions(+), 4 deletions(-) create mode 100644 app/Swagger/Models/SummitBadgeFeatureTypeSchema.php create mode 100644 app/Swagger/Models/SummitBadgeTypeSchema.php diff --git a/app/Swagger/Models/SummitBadgeFeatureTypeSchema.php b/app/Swagger/Models/SummitBadgeFeatureTypeSchema.php new file mode 100644 index 000000000..4baed7609 --- /dev/null +++ b/app/Swagger/Models/SummitBadgeFeatureTypeSchema.php @@ -0,0 +1,24 @@ + Date: Fri, 5 Dec 2025 14:26:30 +0000 Subject: [PATCH 16/17] chore: move SummitBadgeFeatureType schema to its own file (rebase to main issue) --- app/Swagger/SummitRegistrationSchemas.php | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/app/Swagger/SummitRegistrationSchemas.php b/app/Swagger/SummitRegistrationSchemas.php index 80812cf41..7f0741dac 100644 --- a/app/Swagger/SummitRegistrationSchemas.php +++ b/app/Swagger/SummitRegistrationSchemas.php @@ -8,20 +8,6 @@ // Summit Badge Feature Types -#[OA\Schema( - schema: 'SummitBadgeFeatureType', - type: 'object', - properties: [ - new OA\Property(property: 'id', type: 'integer', example: 1), - new OA\Property(property: 'name', type: 'string', example: 'Speaker Ribbon'), - new OA\Property(property: 'description', type: 'string', nullable: true, example: 'Special ribbon indicating speaker status'), - new OA\Property(property: 'template_content', type: 'string', nullable: true, example: '
{{name}}
'), - new OA\Property(property: 'summit_id', type: 'integer', example: 42), - new OA\Property(property: 'image', type: 'string', nullable: true, example: 'https://example.com/images/speaker-ribbon.png'), - ] -)] -class SummitBadgeFeatureTypeSchema {} - #[OA\Schema( schema: 'PaginatedSummitBadgeFeatureTypesResponse', allOf: [ From c35ad9cf778c0d29fded9efcdc72ac81299a54a2 Mon Sep 17 00:00:00 2001 From: Matias Perrone Date: Fri, 5 Dec 2025 14:27:58 +0000 Subject: [PATCH 17/17] chore: move to OpenAPI 3.1 --- app/Swagger/SummitRegistrationSchemas.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Swagger/SummitRegistrationSchemas.php b/app/Swagger/SummitRegistrationSchemas.php index 7f0741dac..a18b67974 100644 --- a/app/Swagger/SummitRegistrationSchemas.php +++ b/app/Swagger/SummitRegistrationSchemas.php @@ -32,8 +32,8 @@ class PaginatedSummitBadgeFeatureTypesResponseSchema {} required: ['name'], properties: [ new OA\Property(property: 'name', type: 'string', example: 'Speaker Ribbon'), - new OA\Property(property: 'description', type: 'string', nullable: true, example: 'Special ribbon for speakers'), - new OA\Property(property: 'template_content', type: 'string', nullable: true, example: '
{{name}}
'), + new OA\Property(property: 'description', type: 'string', example: 'Special ribbon for speakers'), + new OA\Property(property: 'template_content', type: 'string', example: '
{{name}}
'), ] )] class SummitBadgeFeatureTypeCreateRequestSchema {} @@ -43,8 +43,8 @@ class SummitBadgeFeatureTypeCreateRequestSchema {} type: 'object', properties: [ new OA\Property(property: 'name', type: 'string', example: 'VIP Ribbon'), - new OA\Property(property: 'description', type: 'string', nullable: true, example: 'VIP attendee designation'), - new OA\Property(property: 'template_content', type: 'string', nullable: true, example: '
{{name}}
'), + new OA\Property(property: 'description', type: 'string', example: 'VIP attendee designation'), + new OA\Property(property: 'template_content', type: 'string', example: '
{{name}}
'), ] )] class SummitBadgeFeatureTypeUpdateRequestSchema {}