22
33namespace App \Swagger \schemas ;
44
5- use App \Security \SponsoredProjectScope ;
65use 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