Skip to content

Commit 2a7092d

Browse files
committed
chore: Add all the referenced schemas
1 parent e634151 commit 2a7092d

9 files changed

Lines changed: 239 additions & 22 deletions

app/Swagger/MarketplaceSchemas.php

Lines changed: 43 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -45,29 +45,48 @@ class PaginatedConsultantsResponseSchema {}
4545
schema: 'MarketplaceDistributionResponseSchema',
4646
type: 'object',
4747
properties: [
48-
'id' => new OA\Property(property: 'id', type: 'integer', example: 1),
49-
'class_name' => new OA\Property(property: 'class_name', type: 'string', example: 'Distribution'),
50-
'name' => new OA\Property(property: 'name', type: 'string', example: 'Ubuntu OpenStack'),
51-
'overview' => new OA\Property(property: 'overview', type: 'string', example: 'Ubuntu-based OpenStack distribution'),
52-
'call_2_action_url' => new OA\Property(property: 'call_2_action_url', type: 'string', example: 'https://example.com/download'),
53-
'slug' => new OA\Property(property: 'slug', type: 'string', example: 'ubuntu-openstack'),
54-
'is_compatible_with_storage' => new OA\Property(property: 'is_compatible_with_storage', type: 'boolean', example: true),
55-
'is_compatible_with_compute' => new OA\Property(property: 'is_compatible_with_compute', type: 'boolean', example: true),
56-
'is_compatible_with_federated_identity' => new OA\Property(property: 'is_compatible_with_federated_identity', type: 'boolean', example: false),
57-
'is_compatible_with_platform' => new OA\Property(property: 'is_compatible_with_platform', type: 'boolean', example: true),
58-
'is_openstack_powered' => new OA\Property(property: 'is_openstack_powered', type: 'boolean', example: true),
59-
'is_openstack_tested' => new OA\Property(property: 'is_openstack_tested', type: 'boolean', example: true),
60-
'openstack_tested_info' => new OA\Property(property: 'openstack_tested_info', type: 'string', example: 'Tested with OpenStack Zed')
61-
],
62-
anyOf: [
63-
'company_id' => new OA\Property(property: 'company_id', type: 'integer', example: 1),
64-
'company' => new OA\Property(property: 'company', type: 'Company'),
65-
'type_id' => new OA\Property(property: 'type_id', type: 'integer'),
66-
'type' => new OA\Property(property: 'type', type: 'MarketPlaceType'),
67-
'reviews' => new OA\Property(property: 'reviews', type: 'array', items: new OA\Items(type: 'MarketPlaceReview')),
48+
new OA\Property(property: 'id', type: 'integer', example: 1),
49+
new OA\Property(property: 'created', type: 'integer', example: 1),
50+
new OA\Property(property: 'last_edited', type: 'integer', example: 1),
51+
new OA\Property(property: 'name', type: 'string'),
52+
new OA\Property(property: 'url', type: 'string'),
53+
new OA\Property(property: 'url_segment', type: 'string'),
54+
new OA\Property(property: 'city', type: 'string'),
55+
new OA\Property(property: 'state', type: 'string'),
56+
new OA\Property(property: 'country', type: 'string'),
57+
new OA\Property(property: 'description', type: 'string'),
58+
new OA\Property(property: 'industry', type: 'string'),
59+
new OA\Property(property: 'contributions', type: 'string'),
60+
new OA\Property(property: 'member_level', type: 'string'),
61+
new OA\Property(property: 'overview', type: 'string'),
62+
new OA\Property(property: 'products', type: 'string'),
63+
new OA\Property(property: 'commitment', type: 'string'),
64+
new OA\Property(property: 'commitment_author', type: 'string'),
65+
new OA\Property(property: 'logo', type: 'string'),
66+
new OA\Property(property: 'big_logo', type: 'string'),
67+
new OA\Property(property: 'color', type: 'string'),
68+
new OA\Property(property: 'display_on_site', type: 'boolean'),
69+
new OA\Property(property: 'featured', type: 'boolean'),
70+
new OA\Property(property: 'contact_email', type: 'string'),
71+
new OA\Property(property: 'admin_email', type: 'string'),
72+
new OA\Property(property: 'sponsorships', type: 'array', items: new OA\Items(oneOf: [new OA\Schema(type: 'integer'), new OA\Schema(ref: '#/components/schemas/SummitSponsorship'),]), description: "SummitSponsorship, IDs when used as relationship, object when included in expand"),
73+
new OA\Property(property: 'project_sponsorships', type: 'array', items: new OA\Items(oneOf: [new OA\Schema(type: 'integer'), new OA\Schema(ref: '#/components/schemas/ProjectSponsorshipType'),]), description: "ProjectSponsorshipType supported by the distribution, IDs when used as relationship, object when included in expand"),
74+
new OA\Property(property: 'supported_regions', type: 'array', items: new OA\Items(oneOf: [new OA\Schema(type: 'integer'), new OA\Schema(ref: '#/components/schemas/RegionalSupport'),]), description: "RegionalSupport, only available on expand"),
75+
new OA\Property(property: 'is_compatible_with_storage', type: 'boolean', description: "RegionalSupport, only available on expand", ),
76+
new OA\Property(property: 'is_compatible_with_compute', type: 'boolean', description: "RegionalSupport, only available on expand", ),
77+
new OA\Property(property: 'is_compatible_with_federated_identity', type: 'boolean', description: "RegionalSupport, only available on expand", ),
78+
new OA\Property(property: 'is_compatible_with_platform', type: 'boolean', description: "RegionalSupport, only available on expand", ),
79+
new OA\Property(property: 'is_openstack_powered', type: 'boolean', description: "RegionalSupport, only available on expand", ),
80+
new OA\Property(property: 'is_openstack_tested', type: 'boolean', description: "RegionalSupport, only available on expand", ),
81+
new OA\Property(property: 'openstack_tested_info', type: 'string', description: "RegionalSupport, only available on expand", ),
82+
new OA\Property(property: 'capabilities', type: 'array', items: new OA\Items(ref: '#/components/schemas/OpenStackImplementationApiCoverage'), description: "OpenStackImplementationApiCoverage, only available on relations", ),
83+
new OA\Property(property: 'guests', type: 'array', items: new OA\Items(ref: '#/components/schemas/GuestOSType'), description: "GuestOSType, only available on relations", ),
84+
new OA\Property(property: 'hypervisors', type: 'array', items: new OA\Items(ref: '#/components/schemas/HyperVisorType'), description: "HyperVisorType, only available on relations", ),
6885
]
6986
)]
70-
class MarketplaceDistributionResponseSchema {}
87+
class MarketplaceDistributionResponseSchema
88+
{
89+
}
7190

7291
#[OA\Schema(
7392
schema: 'PaginatedMarketplaceDistributionResponseSchema',
@@ -85,4 +104,6 @@ class MarketplaceDistributionResponseSchema {}
85104
)
86105
]
87106
)]
88-
class PaginatedMarketplaceDistributionResponseSchema {}
107+
class PaginatedMarketplaceDistributionResponseSchema
108+
{
109+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
namespace App\Swagger\schemas;
4+
5+
use OpenApi\Attributes as OA;
6+
7+
8+
#[OA\Schema(
9+
schema: 'OpenStackComponent',
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: 'name', type: 'string'),
16+
new OA\Property(property: 'code_name', type: 'string'),
17+
])
18+
]
19+
class OpenStackComponentSchema
20+
{
21+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
namespace App\Swagger\schemas;
4+
5+
use OpenApi\Attributes as OA;
6+
7+
8+
#[OA\Schema(
9+
schema: 'OpenStackImplementationApiCoverage',
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: 'api_coverage', type: 'integer', example: 1),
16+
new OA\Property(property: 'component', ref: '#/components/schemas/OpenStackComponent'),
17+
new OA\Property(property: 'release', ref: '#/components/schemas/OpenStackRelease'),
18+
]
19+
)]
20+
class OpenStackImplementationApiCoverageSchema
21+
{
22+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
namespace App\Swagger\schemas;
4+
5+
use OpenApi\Attributes as OA;
6+
7+
8+
#[OA\Schema(
9+
schema: 'OpenStackRelease',
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: 'name', type: 'string'),
16+
new OA\Property(property: 'components', type: 'array', items: new OA\Items(
17+
oneOf: [
18+
new OA\Schema(type: 'integer'),
19+
new OA\Schema(ref: '#/components/schemas/OpenStackComponent'),
20+
]
21+
), description: "OpenStackComponent supported by the distribution, IDs when used as relationship, object when included in expand"),
22+
])
23+
]
24+
class OpenStackReleaseSchema
25+
{
26+
}
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: 'SponsorshipType',
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: 'name', type: 'string', ),
16+
new OA\Property(property: 'label', type: 'string', ),
17+
new OA\Property(property: 'order', type: 'integer', ),
18+
new OA\Property(property: 'size', type: 'string', ),
19+
])
20+
]
21+
class SponsorshipTypeSchema
22+
{
23+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
namespace App\Swagger\schemas;
4+
5+
use OpenApi\Attributes as OA;
6+
7+
8+
#[OA\Schema(
9+
schema: 'Summit',
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+
// @TODO: complete properties
16+
])
17+
]
18+
class SummitSchema
19+
{
20+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
namespace App\Swagger\schemas;
4+
5+
use OpenApi\Attributes as OA;
6+
7+
8+
#[OA\Schema(
9+
schema: 'SummitSponsorshipAddOn',
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+
// @TODO: Complete properties
16+
])
17+
]
18+
class SummitSponsorshipAddOnSchema
19+
{
20+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
namespace App\Swagger\schemas;
4+
5+
use OpenApi\Attributes as OA;
6+
7+
8+
#[OA\Schema(
9+
schema: 'SummitSponsorship',
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: 'type_id', type: 'integer', example: 1, description: 'SummitSponsorshipType id, only available when not expanded'),
16+
new OA\Property(property: 'add_ons', type: 'array', items: new OA\Items(
17+
oneOf: [
18+
new OA\Schema(type: 'integer'),
19+
new OA\Schema(ref: '#/components/schemas/SummitSponsorshipAddOn'),
20+
]
21+
), description: "SummitSponsorshipAddOn, IDs when in relations, object when included in expand"),
22+
new OA\Property(property: 'type', ref: '#/components/schemas/SummitSponsorshipType', description: 'SummitSponsorshipType object, only available when expanded'),
23+
])
24+
]
25+
class SummitSponsorshipSchema
26+
{
27+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
namespace App\Swagger\schemas;
4+
5+
use OpenApi\Attributes as OA;
6+
7+
8+
#[OA\Schema(
9+
schema: 'SummitSponsorshipType',
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: 'widget_title', type: 'string', ),
16+
new OA\Property(property: 'lobby_template', type: 'string', ),
17+
new OA\Property(property: 'expo_hall_template', type: 'string', ),
18+
new OA\Property(property: 'sponsor_page_template', type: 'string', ),
19+
new OA\Property(property: 'event_page_template', type: 'string', ),
20+
new OA\Property(property: 'sponsor_page_use_disqus_widget', type: 'boolean', ),
21+
new OA\Property(property: 'sponsor_page_use_live_event_widget', type: 'boolean', ),
22+
new OA\Property(property: 'sponsor_page_use_schedule_widget', type: 'boolean', ),
23+
new OA\Property(property: 'sponsor_page_use_banner_widget', type: 'boolean', ),
24+
new OA\Property(property: 'type_id', type: 'int', description: "SponsorshipType ID only available when NOT expanded"),
25+
new OA\Property(property: 'badge_image', type: 'string', ),
26+
new OA\Property(property: 'badge_image_alt_text', type: 'string', ),
27+
new OA\Property(property: 'summit_id', type: 'int', ),
28+
new OA\Property(property: 'order', type: 'int', ),
29+
new OA\Property(property: 'should_display_on_expo_hall_page', type: 'boolean', ),
30+
new OA\Property(property: 'should_display_on_lobby_page', type: 'boolean', ),
31+
new OA\Property(property: 'summit', ref: '#/components/schemas/Summit', description: "Summit object, only available when expanded"),
32+
new OA\Property(property: 'type', ref: '#/components/schemas/SponsorshipType', description: "SponsorshipType object, only available when expanded"),
33+
])
34+
]
35+
class SummitSponsorshipTypeSchema
36+
{
37+
}

0 commit comments

Comments
 (0)