Skip to content

Commit 595d75c

Browse files
committed
fix: documentation build issues
1 parent cd0facc commit 595d75c

File tree

6 files changed

+29
-60
lines changed

6 files changed

+29
-60
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\SummitScopes;
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 & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,6 @@
55
use App\Security\SponsoredProjectScope;
66
use OpenApi\Attributes as OA;
77

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-
268
#[OA\Schema(
279
schema: 'PaginatedSponsoredProjectsResponse',
2810
title: 'Paginated Sponsored Projects',
@@ -41,27 +23,7 @@ class SponsoredProjectSchemas {}
4123
)
4224
]
4325
)]
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 {}
26+
class PaginatedSponsoredProjectsResponseSchema {}
6527

6628
#[OA\Schema(
6729
schema: 'PaginatedProjectSponsorshipTypesResponse',
@@ -81,24 +43,7 @@ class ProjectSponsorshipType {}
8143
)
8244
]
8345
)]
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 {}
46+
class PaginatedProjectSponsorshipTypesResponseSchema {}
10247

10348
#[OA\Schema(
10449
schema: 'PaginatedSupportingCompaniesResponse',
@@ -118,7 +63,7 @@ class SupportingCompany {}
11863
)
11964
]
12065
)]
121-
class PaginatedSupportingCompaniesResponse {}
66+
class PaginatedSupportingCompaniesResponseSchema {}
12267

12368
#[
12469
OA\SecurityScheme(

0 commit comments

Comments
 (0)