Skip to content

Commit 348b4cf

Browse files
committed
chore: update with refs
1 parent 3a748c3 commit 348b4cf

File tree

3 files changed

+66
-29
lines changed

3 files changed

+66
-29
lines changed

app/Http/Controllers/Apis/Marketplace/PublicCloudsApiController.php

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,22 @@ public function __construct(IPublicCloudServiceRepository $repository, IResource
3939
description: "Get all marketplace public cloud services (OpenStack implementations)",
4040
summary: 'Get all public clouds',
4141
operationId: 'getAllPublicClouds',
42-
tags: ['Marketplace'],
42+
tags: ['Marketplace', 'Clouds'],
4343
parameters: [
44+
new OA\Parameter(
45+
name: 'page',
46+
in: 'query',
47+
required: false,
48+
description: 'Page number for pagination',
49+
schema: new OA\Schema(type: 'integer', example: 1)
50+
),
51+
new OA\Parameter(
52+
name: 'per_page',
53+
in: 'query',
54+
required: false,
55+
description: 'Items per page',
56+
schema: new OA\Schema(type: 'integer', example: 10, maximum: 100)
57+
),
4458
new OA\Parameter(
4559
name: 'filter[]',
4660
in: 'query',
@@ -96,4 +110,4 @@ public function getAll()
96110
{
97111
return parent::getAll();
98112
}
99-
}
113+
}

app/Swagger/MarketplaceSchemas.php

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
'type_id' => new OA\Property(property: 'type_id', type: 'integer', example: 1)
2020
]
2121
)]
22-
class ConsultantsResponseSchema {}
22+
class ConsultantsResponseSchema
23+
{
24+
}
2325

2426
#[OA\Schema(
2527
schema: 'PaginatedConsultantsResponse',
@@ -37,32 +39,11 @@ class ConsultantsResponseSchema {}
3739
)
3840
]
3941
)]
40-
class PaginatedConsultantsResponseSchema {}
42+
class PaginatedConsultantsResponseSchema
43+
{
44+
}
4145

4246

43-
#[OA\Schema(
44-
schema: 'PublicOrPrivateCloudsResponse',
45-
type: 'object',
46-
properties: [
47-
'id' => new OA\Property(property: 'id', type: 'integer', example: 1),
48-
'class_name' => new OA\Property(property: 'class_name', type: 'string', example: 'PublicCloudService'),
49-
'name' => new OA\Property(property: 'name', type: 'string', example: 'AWS OpenStack Compatible Service'),
50-
'overview' => new OA\Property(property: 'overview', type: 'string', example: 'Public cloud service with OpenStack compatibility'),
51-
'call_2_action_url' => new OA\Property(property: 'call_2_action_url', type: 'string', example: 'https://example.com/public-cloud'),
52-
'slug' => new OA\Property(property: 'slug', type: 'string', example: 'aws-openstack-service'),
53-
'company_id' => new OA\Property(property: 'company_id', type: 'integer', example: 1),
54-
'type_id' => new OA\Property(property: 'type_id', type: 'integer', example: 1),
55-
'is_compatible_with_storage' => new OA\Property(property: 'is_compatible_with_storage', type: 'boolean', example: true),
56-
'is_compatible_with_compute' => new OA\Property(property: 'is_compatible_with_compute', type: 'boolean', example: true),
57-
'is_compatible_with_federated_identity' => new OA\Property(property: 'is_compatible_with_federated_identity', type: 'boolean', example: true),
58-
'is_compatible_with_platform' => new OA\Property(property: 'is_compatible_with_platform', type: 'boolean', example: true),
59-
'is_openstack_powered' => new OA\Property(property: 'is_openstack_powered', type: 'boolean', example: false),
60-
'is_openstack_tested' => new OA\Property(property: 'is_openstack_tested', type: 'boolean', example: true),
61-
'openstack_tested_info' => new OA\Property(property: 'openstack_tested_info', type: 'string', example: 'Compatible with OpenStack APIs')
62-
]
63-
)]
64-
class PublicOrPrivateCloudsResponseSchema {}
65-
6647
#[OA\Schema(
6748
schema: 'PaginatedPublicOrPrivateCloudsResponse',
6849
allOf: [
@@ -73,10 +54,12 @@ class PublicOrPrivateCloudsResponseSchema {}
7354
new OA\Property(
7455
property: 'data',
7556
type: 'array',
76-
items: new OA\Items(ref: '#/components/schemas/PublicOrPrivateCloudsResponse')
57+
items: new OA\Items(ref: '#/components/schemas/CloudService')
7758
)
7859
]
7960
)
8061
]
8162
)]
82-
class PaginatedPublicOrPrivateCloudsResponseSchema {}
63+
class PaginatedPublicOrPrivateCloudsResponseSchema
64+
{
65+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
namespace App\Swagger\schemas;
4+
5+
use OpenApi\Attributes as OA;
6+
7+
8+
#[OA\Schema(
9+
schema: 'CloudService',
10+
type: 'object',
11+
properties: [
12+
new OA\Property(property: 'id', type: 'integer', example: 1),
13+
new OA\Property(property: 'created', type: 'integer', example: 1),
14+
new OA\Property(property: 'last_edited', type: 'integer', example: 1),
15+
new OA\Property(property: 'class_name', type: 'string', example: 'PublicCloudService'),
16+
new OA\Property(property: 'name', type: 'string', example: 'AWS OpenStack Compatible Service'),
17+
new OA\Property(property: 'overview', type: 'string', example: 'Public cloud service with OpenStack compatibility'),
18+
new OA\Property(property: 'call_2_action_url', type: 'string', example: 'https://example.com/public-cloud'),
19+
new OA\Property(property: 'slug', type: 'string', example: 'aws-openstack-service'),
20+
new OA\Property(property: 'company_id', type: 'integer', example: 1),
21+
new OA\Property(property: 'type_id', type: 'integer', example: 1),
22+
new OA\Property(property: 'is_compatible_with_storage', type: 'boolean', example: true),
23+
new OA\Property(property: 'is_compatible_with_compute', type: 'boolean', example: true),
24+
new OA\Property(property: 'is_compatible_with_federated_identity', type: 'boolean', example: true),
25+
new OA\Property(property: 'is_compatible_with_platform', type: 'boolean', example: true),
26+
new OA\Property(property: 'is_openstack_powered', type: 'boolean', example: false),
27+
new OA\Property(property: 'is_openstack_tested', type: 'boolean', example: true),
28+
new OA\Property(property: 'openstack_tested_info', type: 'string', example: 'Compatible with OpenStack APIs'),
29+
new OA\Property(property: 'company', ref: '#/components/schemas/Company'),
30+
new OA\Property(property: 'type', ref: '#/components/schemas/SponsorshipType'),
31+
new OA\Property(property: 'reviews', type: 'array', items: new OA\Items(ref: '#/components/schemas/MarketPlaceReview')),
32+
new OA\Property(property: 'capabilities', type: 'array', items: new OA\Items(ref: '#/components/schemas/OpenStackImplementationApiCoverage')),
33+
new OA\Property(property: 'guests', type: 'array', items: new OA\Items(ref: '#/components/schemas/HyperVisorType')),
34+
new OA\Property(property: 'hypervisors', type: 'array', items: new OA\Items(ref: '#/components/schemas/GuestOSType')),
35+
new OA\Property(property: 'supported_regions', type: 'array', items: new OA\Items(ref: '#/components/schemas/RegionalSupport')),
36+
]
37+
)]
38+
class CloudServiceSchema
39+
{
40+
}

0 commit comments

Comments
 (0)