Skip to content

Commit 57cc6cf

Browse files
chore: Move schema to its new file app/Swagger/MarketplaceSchemas.php
1 parent 408b9eb commit 57cc6cf

File tree

2 files changed

+41
-41
lines changed

2 files changed

+41
-41
lines changed

app/Swagger/MarketplaceSchemas.php

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,45 @@
11
<?php
22

33
namespace App\Swagger\schemas;
4+
use OpenApi\Attributes as OA;
45

5-
//
6+
#[OA\Schema(
7+
schema: 'MarketplaceDistributionResponseSchema',
8+
type: 'object',
9+
properties: [
10+
'id' => new OA\Property(property: 'id', type: 'integer', example: 1),
11+
'class_name' => new OA\Property(property: 'class_name', type: 'string', example: 'Distribution'),
12+
'name' => new OA\Property(property: 'name', type: 'string', example: 'Ubuntu OpenStack'),
13+
'overview' => new OA\Property(property: 'overview', type: 'string', example: 'Ubuntu-based OpenStack distribution'),
14+
'call_2_action_url' => new OA\Property(property: 'call_2_action_url', type: 'string', example: 'https://example.com/download'),
15+
'slug' => new OA\Property(property: 'slug', type: 'string', example: 'ubuntu-openstack'),
16+
'company_id' => new OA\Property(property: 'company_id', type: 'integer', example: 1),
17+
'type_id' => new OA\Property(property: 'type_id', type: 'integer', example: 1),
18+
'is_compatible_with_storage' => new OA\Property(property: 'is_compatible_with_storage', type: 'boolean', example: true),
19+
'is_compatible_with_compute' => new OA\Property(property: 'is_compatible_with_compute', type: 'boolean', example: true),
20+
'is_compatible_with_federated_identity' => new OA\Property(property: 'is_compatible_with_federated_identity', type: 'boolean', example: false),
21+
'is_compatible_with_platform' => new OA\Property(property: 'is_compatible_with_platform', type: 'boolean', example: true),
22+
'is_openstack_powered' => new OA\Property(property: 'is_openstack_powered', type: 'boolean', example: true),
23+
'is_openstack_tested' => new OA\Property(property: 'is_openstack_tested', type: 'boolean', example: true),
24+
'openstack_tested_info' => new OA\Property(property: 'openstack_tested_info', type: 'string', example: 'Tested with OpenStack Zed')
25+
]
26+
)]
27+
class MarketplaceDistributionResponseSchema {}
28+
29+
#[OA\Schema(
30+
schema: 'PaginatedMarketplaceDistributionResponseSchema',
31+
allOf: [
32+
new OA\Schema(ref: '#/components/schemas/PaginateDataSchemaResponse'),
33+
new OA\Schema(
34+
type: 'object',
35+
properties: [
36+
new OA\Property(
37+
property: 'data',
38+
type: 'array',
39+
items: new OA\Items(ref: '#/components/schemas/MarketplaceDistributionResponseSchema')
40+
)
41+
]
42+
)
43+
]
44+
)]
45+
class PaginatedMarketplaceDistributionResponseSchema {}

app/Swagger/schemas.php

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -377,43 +377,3 @@ class RSVPUpdateRequestSchema_{
377377
)]
378378
class RSVPAdminAddRequestSchema {}
379379

380-
#[OA\Schema(
381-
schema: 'MarketplaceDistributionResponseSchema',
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: 'Distribution'),
386-
'name' => new OA\Property(property: 'name', type: 'string', example: 'Ubuntu OpenStack'),
387-
'overview' => new OA\Property(property: 'overview', type: 'string', example: 'Ubuntu-based OpenStack distribution'),
388-
'call_2_action_url' => new OA\Property(property: 'call_2_action_url', type: 'string', example: 'https://example.com/download'),
389-
'slug' => new OA\Property(property: 'slug', type: 'string', example: 'ubuntu-openstack'),
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-
'is_compatible_with_storage' => new OA\Property(property: 'is_compatible_with_storage', type: 'boolean', example: true),
393-
'is_compatible_with_compute' => new OA\Property(property: 'is_compatible_with_compute', type: 'boolean', example: true),
394-
'is_compatible_with_federated_identity' => new OA\Property(property: 'is_compatible_with_federated_identity', type: 'boolean', example: false),
395-
'is_compatible_with_platform' => new OA\Property(property: 'is_compatible_with_platform', type: 'boolean', example: true),
396-
'is_openstack_powered' => new OA\Property(property: 'is_openstack_powered', type: 'boolean', example: true),
397-
'is_openstack_tested' => new OA\Property(property: 'is_openstack_tested', type: 'boolean', example: true),
398-
'openstack_tested_info' => new OA\Property(property: 'openstack_tested_info', type: 'string', example: 'Tested with OpenStack Zed')
399-
]
400-
)]
401-
class MarketplaceDistributionResponseSchema {}
402-
403-
#[OA\Schema(
404-
schema: 'PaginatedMarketplaceDistributionResponseSchema',
405-
allOf: [
406-
new OA\Schema(ref: '#/components/schemas/PaginateDataSchemaResponse'),
407-
new OA\Schema(
408-
type: 'object',
409-
properties: [
410-
new OA\Property(
411-
property: 'data',
412-
type: 'array',
413-
items: new OA\Items(ref: '#/components/schemas/MarketplaceDistributionResponseSchema')
414-
)
415-
]
416-
)
417-
]
418-
)]
419-
class PaginatedMarketplaceDistributionResponseSchema {}

0 commit comments

Comments
 (0)