Skip to content

Commit c1d9309

Browse files
committed
chore: change HTTP code 200 to constant and fix merge conflicts
Signed-off-by: Matias Perrone <github@matiasperrone.com>
1 parent 99728f5 commit c1d9309

File tree

2 files changed

+8
-68
lines changed

2 files changed

+8
-68
lines changed

app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitSpeakersAssistanceApiController.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public function __construct
135135
],
136136
responses: [
137137
new OA\Response(
138-
response: 200,
138+
response: Response::HTTP_OK,
139139
description: "OK",
140140
content: new OA\JsonContent(ref: "#/components/schemas/PaginatedPresentationSpeakerSummitAssistanceConfirmationRequestsResponse")
141141
),
@@ -263,7 +263,7 @@ public function getBySummit($summit_id)
263263
],
264264
responses: [
265265
new OA\Response(
266-
response: 200,
266+
response: Response::HTTP_OK,
267267
description: "OK",
268268
content: new OA\MediaType(mediaType: "text/csv", schema: new OA\Schema(type: "string"))
269269
),
@@ -375,7 +375,7 @@ public function getBySummitCSV($summit_id){
375375
),
376376
responses: [
377377
new OA\Response(
378-
response: 201,
378+
response: Response::HTTP_CREATED,
379379
description: "Created",
380380
content: new OA\JsonContent(ref: "#/components/schemas/PresentationSpeakerSummitAssistanceConfirmationRequest")
381381
),
@@ -473,7 +473,7 @@ public function addSpeakerSummitAssistance($summit_id)
473473
),
474474
responses: [
475475
new OA\Response(
476-
response: 200,
476+
response: Response::HTTP_OK,
477477
description: "OK",
478478
content: new OA\JsonContent(ref: "#/components/schemas/PresentationSpeakerSummitAssistanceConfirmationRequest")
479479
),
@@ -563,7 +563,7 @@ public function updateSpeakerSummitAssistance($summit_id, $assistance_id)
563563
)
564564
],
565565
responses: [
566-
new OA\Response(response: 204, description: "No Content"),
566+
new OA\Response(response: Response::HTTP_NO_CONTENT, description: "No Content"),
567567
new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"),
568568
new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"),
569569
new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"),
@@ -632,7 +632,7 @@ public function deleteSpeakerSummitAssistance($summit_id, $assistance_id)
632632
],
633633
responses: [
634634
new OA\Response(
635-
response: 200,
635+
response: Response::HTTP_OK,
636636
description: "OK",
637637
content: new OA\JsonContent(ref: "#/components/schemas/PresentationSpeakerSummitAssistanceConfirmationRequest")
638638
),
@@ -673,4 +673,4 @@ public function getSpeakerSummitAssistanceBySummit($summit_id, $assistance_id)
673673
}
674674
}
675675

676-
}
676+
}

app/Swagger/SummitPresentationSchemas.php

Lines changed: 1 addition & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -280,64 +280,4 @@ class PresentationActionTypeCreateRequestSchema
280280
)]
281281
class PresentationActionTypeUpdateRequestSchema
282282
{
283-
}
284-
285-
#[OA\Schema(
286-
schema: 'PresentationActionType',
287-
type: 'object',
288-
properties: [
289-
new OA\Property(property: 'id', type: 'integer', example: 1),
290-
new OA\Property(property: 'created', type: 'integer', example: 1630500518),
291-
new OA\Property(property: 'last_edited', type: 'integer', example: 1630500518),
292-
new OA\Property(property: 'label', type: 'string', example: 'Review'),
293-
new OA\Property(property: 'summit_id', type: 'integer', example: 42, description: 'Summit ID, add ?expand=summit to get full summit object'),
294-
new OA\Property(property: 'order', type: 'integer', example: 1, description: 'Order within a selection plan. Only present when filtering by selection_plan_id', ),
295-
]
296-
)]
297-
class PresentationActionTypeSchema
298-
{
299-
}
300-
301-
#[OA\Schema(
302-
schema: 'PaginatedPresentationActionTypesResponse',
303-
allOf: [
304-
new OA\Schema(ref: '#/components/schemas/PaginateDataSchemaResponse'),
305-
new OA\Schema(
306-
type: 'object',
307-
properties: [
308-
new OA\Property(
309-
property: 'data',
310-
type: 'array',
311-
items: new OA\Items(ref: '#/components/schemas/PresentationActionType')
312-
)
313-
]
314-
)
315-
]
316-
)]
317-
class PaginatedPresentationActionTypesResponseSchema
318-
{
319-
}
320-
321-
#[OA\Schema(
322-
schema: 'PresentationActionTypeCreateRequest',
323-
type: 'object',
324-
required: ['label'],
325-
properties: [
326-
new OA\Property(property: 'label', type: 'string', example: 'Review', maxLength: 255),
327-
new OA\Property(property: 'selection_plan_id', type: 'integer', example: 42, description: 'If provided, the order field will be set within the context of the selection plan'),
328-
]
329-
)]
330-
class PresentationActionTypeCreateRequestSchema
331-
{
332-
}
333-
334-
#[OA\Schema(
335-
schema: 'PresentationActionTypeUpdateRequest',
336-
type: 'object',
337-
properties: [
338-
new OA\Property(property: 'label', type: 'string', example: 'Review', maxLength: 255),
339-
]
340-
)]
341-
class PresentationActionTypeUpdateRequestSchema
342-
{
343-
}
283+
}

0 commit comments

Comments
 (0)