Skip to content

Commit 214745b

Browse files
committed
fix: documentation build issues
1 parent cd0facc commit 214745b

File tree

6 files changed

+29
-80
lines changed

6 files changed

+29
-80
lines changed

app/Swagger/Models/ProjectSponsorshipTypeSchema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@
3333
)]
3434
class ProjectSponsorshipTypeSchema
3535
{
36-
}
36+
}

app/Swagger/Models/SupportingCompanySchema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
]
2323
class SupportingCompanySchema
2424
{
25-
}
25+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace App\Swagger\schemas;
4+
use App\Security\SponsoredProjectScope;
5+
6+
use OpenApi\Attributes as OA;
7+
8+
#[OA\SecurityScheme(
9+
type: 'oauth2',
10+
securityScheme: 'sponsored_projects_oauth2',
11+
flows: [
12+
new OA\Flow(
13+
authorizationUrl: L5_SWAGGER_CONST_AUTH_URL,
14+
tokenUrl: L5_SWAGGER_CONST_TOKEN_URL,
15+
flow: 'authorizationCode',
16+
scopes: [
17+
SponsoredProjectScope::Read => 'Read Sponsored Projects',
18+
SponsoredProjectScope::Write => 'Write Sponsored Projects',
19+
],
20+
),
21+
],
22+
)
23+
]
24+
class SponsoredProjectsAuthSchema {}
File renamed without changes.

app/Swagger/security/SummitBookableRoomsAttributeTypeSecurity.php renamed to app/Swagger/Security/SummitBookableRoomsAttributeTypeAuthSchema.php

File renamed without changes.

app/Swagger/SponsoredProjectSchemas.php

Lines changed: 3 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,8 @@
22

33
namespace App\Swagger\schemas;
44

5-
use App\Security\SponsoredProjectScope;
65
use OpenApi\Attributes as OA;
76

8-
#[OA\Schema(
9-
schema: 'SponsoredProject',
10-
title: 'SponsoredProject',
11-
description: 'Represents a Sponsored Project',
12-
type: 'object',
13-
required: ['name'],
14-
properties: [
15-
new OA\Property(property: 'id', type: 'integer', format: 'int64'),
16-
new OA\Property(property: 'name', type: 'string'),
17-
new OA\Property(property: 'slug', type: 'string'),
18-
new OA\Property(property: 'description', type: 'string'),
19-
new OA\Property(property: 'is_active', type: 'boolean'),
20-
new OA\Property(property: 'created', type: 'integer', format: 'int64'),
21-
new OA\Property(property: 'last_edited', type: 'integer', format: 'int64'),
22-
]
23-
)]
24-
class SponsoredProjectSchemas {}
25-
267
#[OA\Schema(
278
schema: 'PaginatedSponsoredProjectsResponse',
289
title: 'Paginated Sponsored Projects',
@@ -41,27 +22,7 @@ class SponsoredProjectSchemas {}
4122
)
4223
]
4324
)]
44-
class PaginatedSponsoredProjectsResponse {}
45-
46-
#[OA\Schema(
47-
schema: 'ProjectSponsorshipType',
48-
title: 'Project Sponsorship Type',
49-
description: 'Represents a Project Sponsorship Type',
50-
type: 'object',
51-
required: ['name'],
52-
properties: [
53-
new OA\Property(property: 'id', type: 'integer', format: 'int64'),
54-
new OA\Property(property: 'name', type: 'string'),
55-
new OA\Property(property: 'slug', type: 'string'),
56-
new OA\Property(property: 'description', type: 'string'),
57-
new OA\Property(property: 'is_active', type: 'boolean'),
58-
new OA\Property(property: 'order', type: 'integer'),
59-
new OA\Property(property: 'sponsored_project_id', type: 'integer', format: 'int64'),
60-
new OA\Property(property: 'created', type: 'integer', format: 'int64'),
61-
new OA\Property(property: 'last_edited', type: 'integer', format: 'int64'),
62-
]
63-
)]
64-
class ProjectSponsorshipType {}
25+
class PaginatedSponsoredProjectsResponseSchema {}
6526

6627
#[OA\Schema(
6728
schema: 'PaginatedProjectSponsorshipTypesResponse',
@@ -81,24 +42,7 @@ class ProjectSponsorshipType {}
8142
)
8243
]
8344
)]
84-
class PaginatedProjectSponsorshipTypesResponse {}
85-
86-
#[OA\Schema(
87-
schema: 'SupportingCompany',
88-
title: 'Supporting Company',
89-
description: 'Represents a Supporting Company for a Sponsorship Type',
90-
type: 'object',
91-
required: ['company_id'],
92-
properties: [
93-
new OA\Property(property: 'id', type: 'integer', format: 'int64'),
94-
new OA\Property(property: 'company_id', type: 'integer', format: 'int64'),
95-
new OA\Property(property: 'sponsorship_type_id', type: 'integer', format: 'int64'),
96-
new OA\Property(property: 'order', type: 'integer'),
97-
new OA\Property(property: 'created', type: 'integer', format: 'int64'),
98-
new OA\Property(property: 'last_edited', type: 'integer', format: 'int64'),
99-
]
100-
)]
101-
class SupportingCompany {}
45+
class PaginatedProjectSponsorshipTypesResponseSchema {}
10246

10347
#[OA\Schema(
10448
schema: 'PaginatedSupportingCompaniesResponse',
@@ -118,23 +62,4 @@ class SupportingCompany {}
11862
)
11963
]
12064
)]
121-
class PaginatedSupportingCompaniesResponse {}
122-
123-
#[
124-
OA\SecurityScheme(
125-
type: 'oauth2',
126-
securityScheme: 'sponsored_projects_oauth2',
127-
flows: [
128-
new OA\Flow(
129-
authorizationUrl: L5_SWAGGER_CONST_AUTH_URL,
130-
tokenUrl: L5_SWAGGER_CONST_TOKEN_URL,
131-
flow: 'authorizationCode',
132-
scopes: [
133-
SponsoredProjectScope::Read => 'Read Sponsored Projects',
134-
SponsoredProjectScope::Write => 'Write Sponsored Projects',
135-
],
136-
),
137-
],
138-
)
139-
]
140-
class SponsoredProjectsAuthSchema {}
65+
class PaginatedSupportingCompaniesResponseSchema {}

0 commit comments

Comments
 (0)