Skip to content

Commit 6cb5226

Browse files
chore: Add ISOElementSchema
1 parent f0429bb commit 6cb5226

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

app/Http/Controllers/Apis/CountriesApiController.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,7 @@ final class CountriesApiController extends JsonController
5454
'data' => new OA\Property(
5555
property: 'data',
5656
type: 'array',
57-
items: new OA\Items(
58-
properties: [
59-
'iso_code' => new OA\Property(property: 'iso_code', type: 'string', example: 'US'),
60-
'name' => new OA\Property(property: 'name', type: 'string', example: 'United States')
61-
],
62-
type: 'object'
63-
)
57+
items: new OA\Items(ref: "#/components/schemas/ISOElementSchema")
6458
)
6559
],
6660
type: 'object'

app/Swagger/schemas.php

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php namespace App\Swagger\schemas;
1+
<?php
2+
3+
namespace App\Swagger\schemas;
24

35
use App\Jobs\Emails\Schedule\RSVP\ReRSVPInviteEmail;
46
use App\Jobs\Emails\Schedule\RSVP\RSVPInviteEmail;
@@ -338,7 +340,6 @@ class RSVPUpdateRequestSchema_{
338340

339341
}
340342

341-
342343
#[OA\Schema(
343344
schema: 'RSVPAdminAddRequest',
344345
type: 'object',
@@ -348,4 +349,14 @@ class RSVPUpdateRequestSchema_{
348349

349350
]
350351
)]
351-
class RSVPAdminAddRequestSchema {}
352+
class RSVPAdminAddRequestSchema {}
353+
354+
#[OA\Schema(
355+
schema: 'ISOElementSchema',
356+
type: 'object',
357+
properties: [
358+
'iso_code' => new OA\Property(property: 'iso_code', type: 'string', example: 'US'),
359+
'name' => new OA\Property(property: 'name', type: 'string', example: 'United States')
360+
]
361+
)]
362+
class ISOElementSchema {};

0 commit comments

Comments
 (0)