Skip to content

Commit 69bd922

Browse files
chore: move schema to independent file for Marketplace schemas
1 parent 44ea73b commit 69bd922

2 files changed

Lines changed: 34 additions & 35 deletions

File tree

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
@@ -376,37 +376,3 @@ class RSVPUpdateRequestSchema_{
376376
]
377377
)]
378378
class RSVPAdminAddRequestSchema {}
379-
380-
#[OA\Schema(
381-
schema: 'ConsultantsResponseSchema',
382-
type: 'object',
383-
properties: [
384-
'id' => new OA\Property(property: 'id', type: 'integer', example: 1),
385-
'class_name' => new OA\Property(property: 'class_name', type: 'string', example: 'Consultant'),
386-
'name' => new OA\Property(property: 'name', type: 'string', example: 'OpenStack Consulting Services'),
387-
'overview' => new OA\Property(property: 'overview', type: 'string', example: 'Professional OpenStack consulting and support services'),
388-
'call_2_action_url' => new OA\Property(property: 'call_2_action_url', type: 'string', example: 'https://example.com/contact'),
389-
'slug' => new OA\Property(property: 'slug', type: 'string', example: 'openstack-consulting'),
390-
'company_id' => new OA\Property(property: 'company_id', type: 'integer', example: 1),
391-
'type_id' => new OA\Property(property: 'type_id', type: 'integer', example: 1)
392-
]
393-
)]
394-
class ConsultantsResponseSchema {}
395-
396-
#[OA\Schema(
397-
schema: 'PaginatedConsultantsResponseSchema',
398-
allOf: [
399-
new OA\Schema(ref: '#/components/schemas/PaginateDataSchemaResponse'),
400-
new OA\Schema(
401-
type: 'object',
402-
properties: [
403-
new OA\Property(
404-
property: 'data',
405-
type: 'array',
406-
items: new OA\Items(ref: '#/components/schemas/ConsultantsResponseSchema')
407-
)
408-
]
409-
)
410-
]
411-
)]
412-
class PaginatedConsultantsResponseSchema {}

0 commit comments

Comments
 (0)