|
5 | 5 | use OpenApi\Attributes as OA; |
6 | 6 |
|
7 | 7 |
|
| 8 | + |
8 | 9 | #[OA\Schema( |
9 | | - schema: 'Company', |
10 | | - type: 'object', |
| 10 | + schema: "Company", |
| 11 | + description: "Company", |
11 | 12 | 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: 'url', type: 'string'), |
17 | | - new OA\Property(property: 'url_segment', type: 'string'), |
18 | | - new OA\Property(property: 'city', type: 'string'), |
19 | | - new OA\Property(property: 'state', type: 'string'), |
20 | | - new OA\Property(property: 'country', type: 'string'), |
21 | | - new OA\Property(property: 'description', type: 'string'), |
22 | | - new OA\Property(property: 'industry', type: 'string'), |
23 | | - new OA\Property(property: 'contributions', type: 'string'), |
24 | | - new OA\Property(property: 'member_level', type: 'string'), |
25 | | - new OA\Property(property: 'overview', type: 'string'), |
26 | | - new OA\Property(property: 'products', type: 'string'), |
27 | | - new OA\Property(property: 'commitment', type: 'string'), |
28 | | - new OA\Property(property: 'commitment_author', type: 'string'), |
29 | | - new OA\Property(property: 'logo', type: 'string'), |
30 | | - new OA\Property(property: 'big_logo', type: 'string'), |
31 | | - new OA\Property(property: 'color', type: 'string'), |
32 | | - new OA\Property(property: 'display_on_site', type: 'boolean'), |
33 | | - new OA\Property(property: 'featured', type: 'boolean'), |
34 | | - new OA\Property(property: 'contact_email', type: 'string'), |
35 | | - new OA\Property(property: 'admin_email', type: 'string'), |
36 | | - 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"), |
37 | | - 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"), |
38 | | - ]) |
39 | | -] |
| 13 | + new OA\Property(property: "id", type: "integer", example: 1), |
| 14 | + new OA\Property(property: "created", type: "integer", format: "int64", description: "Creation timestamp (epoch)", example: 1234567890), |
| 15 | + new OA\Property(property: "last_edited", type: "integer", format: "int64", description: "Last edit timestamp (epoch)", example: 1234567890), |
| 16 | + new OA\Property(property: "name", type: "string", example: "Acme Corporation"), |
| 17 | + new OA\Property(property: "url", type: "string", format: "uri", example: "https://www.acme.com"), |
| 18 | + new OA\Property(property: "url_segment", type: "string", example: "acme-corporation"), |
| 19 | + new OA\Property(property: "city", type: "string", example: "San Francisco"), |
| 20 | + new OA\Property(property: "state", type: "string", example: "California"), |
| 21 | + new OA\Property(property: "country", type: "string", example: "United States"), |
| 22 | + new OA\Property(property: "description", type: "string", example: "Leading technology company"), |
| 23 | + new OA\Property(property: "industry", type: "string", example: "Technology"), |
| 24 | + new OA\Property(property: "contributions", type: "string", example: "OpenStack contributions"), |
| 25 | + new OA\Property(property: "member_level", type: "string", example: "Platinum"), |
| 26 | + new OA\Property(property: "overview", type: "string", example: "Company overview"), |
| 27 | + new OA\Property(property: "products", type: "string", example: "Cloud services, Software"), |
| 28 | + new OA\Property(property: "commitment", type: "string", example: "Commitment to open source"), |
| 29 | + new OA\Property(property: "commitment_author", type: "string", example: "John Doe, CEO"), |
| 30 | + new OA\Property(property: "logo", type: "string", format: "uri", example: "https://cdn.example.com/logo.png"), |
| 31 | + new OA\Property(property: "big_logo", type: "string", format: "uri", example: "https://cdn.example.com/big_logo.png"), |
| 32 | + new OA\Property(property: "color", type: "string", example: "#FF5733"), |
| 33 | + new OA\Property(property: "display_on_site", type: "boolean", example: true), |
| 34 | + new OA\Property(property: "featured", type: "boolean", example: false), |
| 35 | + new OA\ Property(property: "contact_email", type: "string", format: "email", example: "[email protected]"), |
| 36 | + new OA\ Property(property: "admin_email", type: "string", format: "email", example: "[email protected]"), |
| 37 | + new OA\Property( |
| 38 | + property: "sponsorships", |
| 39 | + type: "array", |
| 40 | + items: new OA\Items(oneOf: [ |
| 41 | + new OA\Schema(type: "integer"), |
| 42 | + new OA\Schema(ref: "#/components/schemas/SummitSponsorship"), |
| 43 | + ]), |
| 44 | + description: "Array of sponsorship IDs (only when relations=sponsorships)", |
| 45 | + ), |
| 46 | + new OA\Property( |
| 47 | + property: "project_sponsorships", |
| 48 | + type: "array", |
| 49 | + items: new OA\Items(oneOf: [ |
| 50 | + new OA\Schema(type: "integer"), |
| 51 | + new OA\Schema(ref: "#/components/schemas/ProjectSponsorshipType"), |
| 52 | + ]), |
| 53 | + description: "Array of project sponsorship IDs (only when relations=project_sponsorships)", |
| 54 | + ), |
| 55 | + ], |
| 56 | + type: "object" |
| 57 | +)] |
40 | 58 | class CompanySchema |
41 | 59 | { |
42 | 60 | } |
0 commit comments