|
4 | 4 |
|
5 | 5 | use OpenApi\Attributes as OA; |
6 | 6 |
|
7 | | - |
8 | | - |
9 | 7 | #[OA\Schema( |
10 | 8 | schema: "Company", |
11 | 9 | description: "Company", |
12 | | - properties: [ |
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: "contact@acme.com"), |
36 | | - new OA\Property(property: "admin_email", type: "string", format: "email", example: "admin@acme.com"), |
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" |
| 10 | + type: "object", |
| 11 | + allOf: [ |
| 12 | + new OA\Schema(ref: '#/components/schemas/BaseCompany'), |
| 13 | + new OA\Schema( |
| 14 | + type: 'object', |
| 15 | + properties: [ |
| 16 | + new OA\Property(property: "display_on_site", type: "boolean", example: true), |
| 17 | + new OA\Property(property: "featured", type: "boolean", example: false), |
| 18 | + new OA\Property(property: "contact_email", type: "string", format: "email", example: "contact@acme.com"), |
| 19 | + new OA\Property(property: "admin_email", type: "string", format: "email", example: "admin@acme.com"), |
| 20 | + new OA\Property( |
| 21 | + property: "sponsorships", |
| 22 | + type: "array", |
| 23 | + items: new OA\Items(oneOf: [ |
| 24 | + new OA\Schema(type: "integer"), |
| 25 | + new OA\Schema(ref: "#/components/schemas/SummitSponsorship"), |
| 26 | + ]), |
| 27 | + description: "Array of sponsorship IDs (only when relations=sponsorships), full objects when ?expand=sponsorships", |
| 28 | + ), |
| 29 | + new OA\Property( |
| 30 | + property: "project_sponsorships", |
| 31 | + type: "array", |
| 32 | + items: new OA\Items(oneOf: [ |
| 33 | + new OA\Schema(type: "integer"), |
| 34 | + new OA\Schema(ref: "#/components/schemas/ProjectSponsorshipType"), |
| 35 | + ]), |
| 36 | + description: "Array of project sponsorship IDs (only when relations=project_sponsorships), full objects when ?expand=project_sponsorships", |
| 37 | + ), |
| 38 | + ], |
| 39 | + ) |
| 40 | + ] |
57 | 41 | )] |
58 | 42 | class CompanySchema |
59 | 43 | { |
|
0 commit comments