Skip to content

Commit 900cd07

Browse files
committed
chore: remove RemoteCloudsResponse schema and add MarketPlaceReview schema
1 parent 2b383eb commit 900cd07

2 files changed

Lines changed: 34 additions & 36 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
namespace App\Swagger\schemas;
4+
5+
use OpenApi\Attributes as OA;
6+
7+
8+
#[OA\Schema(
9+
schema: 'MarketPlaceReview',
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: 'title', type: 'string', example: 'Great service'),
16+
new OA\Property(property: 'comment', type: 'string', example: 'Really enjoyed the experience'),
17+
new OA\Property(property: 'rating', type: 'integer', example: 5),
18+
19+
])
20+
]
21+
class MarketPlaceReviewSchema
22+
{
23+
}

app/Swagger/Models/RemoteCloudServiceSchema.php

Lines changed: 11 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,17 @@
77
#[OA\Schema(
88
schema: 'RemoteCloudService',
99
type: 'object',
10-
properties: [
11-
new OA\Property(property: 'id', type: 'integer', example: 1),
12-
new OA\Property(property: 'created', type: 'integer', example: 1),
13-
new OA\Property(property: 'last_edited', type: 'integer', example: 1),
14-
new OA\Property(property: 'class_name', type: 'string', example: 'RemoteCloudService'),
15-
new OA\Property(property: 'name', type: 'string', example: 'Managed OpenStack Cloud Service'),
16-
new OA\Property(property: 'overview', type: 'string', example: 'Remotely managed private OpenStack cloud'),
17-
new OA\Property(property: 'call_2_action_url', type: 'string', example: 'https://example.com/managed-cloud'),
18-
new OA\Property(property: 'slug', type: 'string', example: 'managed-openstack-service'),
19-
new OA\Property(property: 'company_id', type: 'integer', example: 1),
20-
new OA\Property(property: 'type_id', type: 'integer', example: 1, description: 'Marketplace Type ID'),
21-
22-
new OA\Property(property: 'company', ref: '#/components/schemas/Company'),
23-
24-
// @TODO: Remove this from the correspodent serializer, as there is no serializer for MarketPlaceType or create serializer for it
25-
// new OA\Property(property: 'type', ref: '#/components/schemas/MarketPlaceType'),
26-
new OA\Property(property: 'reviews', type: 'array', items: new OA\Items(ref: '#/components/schemas/MarketPlaceReview')),
27-
new OA\Property(property: 'supported_regions', type: 'array', items: new OA\Items(ref: '#/components/schemas/RegionalSupport')),
28-
29-
new OA\Property(property: 'is_compatible_with_storage', type: 'boolean', example: true),
30-
new OA\Property(property: 'is_compatible_with_compute', type: 'boolean', example: true),
31-
new OA\Property(property: 'is_compatible_with_federated_identity', type: 'boolean', example: true),
32-
new OA\Property(property: 'is_compatible_with_platform', type: 'boolean', example: true),
33-
new OA\Property(property: 'is_openstack_powered', type: 'boolean', example: true),
34-
new OA\Property(property: 'is_openstack_tested', type: 'boolean', example: true),
35-
new OA\Property(property: 'openstack_tested_info', type: 'string', example: 'Tested with OpenStack Bobcat'),
36-
37-
new OA\Property(property: 'capabilities', type: 'array', items: new OA\Items(ref: '#/components/schemas/OpenStackImplementationApiCoverage'), description: 'Only present if requested via relations'),
38-
new OA\Property(property: 'guests', type: 'array', items: new OA\Items(ref: '#/components/schemas/GuestOSType'), description: 'Only present if requested via relations'),
39-
new OA\Property(property: 'hypervisors', type: 'array', items: new OA\Items(ref: '#/components/schemas/HyperVisorType'), description: 'Only present if requested via relations'),
40-
41-
new OA\Property(property: 'hardware_spec', type: 'string', example: 'High-performance servers with SSD storage'),
42-
new OA\Property(property: 'pricing_models', type: 'string', example: 'Monthly subscription, Pay-as-you-use'),
43-
new OA\Property(property: 'published_sla', type: 'string', example: '99.9% uptime guarantee'),
44-
new OA\Property(property: 'is_vendor_managed_upgrades', type: 'boolean', example: true),
45-
10+
allOf: [
11+
new OA\Schema(ref: '#/components/schemas/OpenStackImplementation'),
12+
new OA\Schema(
13+
type: 'object',
14+
properties: [
15+
new OA\Property(property: 'hardware_spec', type: 'string', example: 'High-performance servers with SSD storage'),
16+
new OA\Property(property: 'pricing_models', type: 'string', example: 'Monthly subscription, Pay-as-you-use'),
17+
new OA\Property(property: 'published_sla', type: 'string', example: '99.9% uptime guarantee'),
18+
new OA\Property(property: 'is_vendor_managed_upgrades', type: 'boolean', example: true),
19+
]
20+
)
4621
]
4722
)]
4823
class RemoteCloudServiceSchema

0 commit comments

Comments
 (0)