Skip to content

Commit 45f9678

Browse files
chore: move schema to independent file for Marketplace schemas
1 parent 25b285e commit 45f9678

File tree

2 files changed

+34
-35
lines changed

2 files changed

+34
-35
lines changed

app/Swagger/MarketplaceSchemas.php

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,37 @@
44

55
use OpenApi\Attributes as OA;
66

7-
//
7+
8+
#[OA\Schema(
9+
schema: 'ConsultantsResponse',
10+
type: 'object',
11+
properties: [
12+
'id' => new OA\Property(property: 'id', type: 'integer', example: 1),
13+
'class_name' => new OA\Property(property: 'class_name', type: 'string', example: 'Consultant'),
14+
'name' => new OA\Property(property: 'name', type: 'string', example: 'OpenStack Consulting Services'),
15+
'overview' => new OA\Property(property: 'overview', type: 'string', example: 'Professional OpenStack consulting and support services'),
16+
'call_2_action_url' => new OA\Property(property: 'call_2_action_url', type: 'string', example: 'https://example.com/contact'),
17+
'slug' => new OA\Property(property: 'slug', type: 'string', example: 'openstack-consulting'),
18+
'company_id' => new OA\Property(property: 'company_id', type: 'integer', example: 1),
19+
'type_id' => new OA\Property(property: 'type_id', type: 'integer', example: 1)
20+
]
21+
)]
22+
class ConsultantsResponseSchema {}
23+
24+
#[OA\Schema(
25+
schema: 'PaginatedConsultantsResponse',
26+
allOf: [
27+
new OA\Schema(ref: '#/components/schemas/PaginateDataSchemaResponse'),
28+
new OA\Schema(
29+
type: 'object',
30+
properties: [
31+
new OA\Property(
32+
property: 'data',
33+
type: 'array',
34+
items: new OA\Items(ref: '#/components/schemas/ConsultantsResponse')
35+
)
36+
]
37+
)
38+
]
39+
)]
40+
class PaginatedConsultantsResponseSchema {}

app/Swagger/schemas.php

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -351,37 +351,3 @@ class RSVPUpdateRequestSchema_{
351351
]
352352
)]
353353
class RSVPAdminAddRequestSchema {}
354-
355-
#[OA\Schema(
356-
schema: 'ConsultantsResponseSchema',
357-
type: 'object',
358-
properties: [
359-
'id' => new OA\Property(property: 'id', type: 'integer', example: 1),
360-
'class_name' => new OA\Property(property: 'class_name', type: 'string', example: 'Consultant'),
361-
'name' => new OA\Property(property: 'name', type: 'string', example: 'OpenStack Consulting Services'),
362-
'overview' => new OA\Property(property: 'overview', type: 'string', example: 'Professional OpenStack consulting and support services'),
363-
'call_2_action_url' => new OA\Property(property: 'call_2_action_url', type: 'string', example: 'https://example.com/contact'),
364-
'slug' => new OA\Property(property: 'slug', type: 'string', example: 'openstack-consulting'),
365-
'company_id' => new OA\Property(property: 'company_id', type: 'integer', example: 1),
366-
'type_id' => new OA\Property(property: 'type_id', type: 'integer', example: 1)
367-
]
368-
)]
369-
class ConsultantsResponseSchema {}
370-
371-
#[OA\Schema(
372-
schema: 'PaginatedConsultantsResponseSchema',
373-
allOf: [
374-
new OA\Schema(ref: '#/components/schemas/PaginateDataSchemaResponse'),
375-
new OA\Schema(
376-
type: 'object',
377-
properties: [
378-
new OA\Property(
379-
property: 'data',
380-
type: 'array',
381-
items: new OA\Items(ref: '#/components/schemas/ConsultantsResponseSchema')
382-
)
383-
]
384-
)
385-
]
386-
)]
387-
class PaginatedConsultantsResponseSchema {}

0 commit comments

Comments
 (0)