|
| 1 | +<?php |
| 2 | + |
| 3 | +namespace App\Swagger\schemas; |
| 4 | + |
| 5 | +use OpenApi\Attributes as OA; |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | +#[OA\Schema( |
| 10 | + schema: 'UserStory', |
| 11 | + type: 'object', |
| 12 | + properties: [ |
| 13 | + new OA\Property(property: 'id', type: 'integer', example: 1), |
| 14 | + new OA\Property(property: 'created', type: 'integer', example: 1633024800, description: 'Unix timestamp when created'), |
| 15 | + new OA\Property(property: 'last_edited', type: 'integer', example: 1633111200, description: 'Unix timestamp when last updated'), |
| 16 | + new OA\Property(property: 'name', type: 'string', example: 'Large Scale Cloud Infrastructure'), |
| 17 | + new OA\Property(property: 'description', type: 'string', example: 'Full description of how this organization uses OpenStack...'), |
| 18 | + new OA\Property(property: 'short_description', type: 'string', example: 'Brief overview of the use case'), |
| 19 | + new OA\Property(property: 'link', type: 'string', nullable: true, example: 'https://example.com/case-study'), |
| 20 | + new OA\Property(property: 'active', type: 'boolean', example: true), |
| 21 | + new OA\Property(property: 'is_million_core_club', type: 'boolean', example: false, description: 'Whether this is a million core club member'), |
| 22 | + new OA\Property(property: 'organization_id', type: 'integer', example: 14), |
| 23 | + new OA\Property(property: 'industry_id', type: 'integer', example: 14), |
| 24 | + new OA\Property(property: 'location_id', type: 'integer', example: 14), |
| 25 | + new OA\Property(property: 'image_id', type: 'integer', example: 14), |
| 26 | + new OA\Property(property: 'organization', ref: '#/components/schemas/Organization', description: 'Organization object, only available if expanded via ?expand=organization'), |
| 27 | + new OA\Property(property: 'industry', ref: '#/components/schemas/UserStoriesIndustry', description: 'UserStoriesIndustry object, only available if expanded via ?expand=industry'), |
| 28 | + new OA\Property(property: 'location', ref: '#/components/schemas/Continent', description: 'Continent object, only available if expanded via ?expand=location'), |
| 29 | + new OA\Property(property: 'image', ref: '#/components/schemas/File', description: 'File object, only available if expanded via ?expand=image'), |
| 30 | + new OA\Property( |
| 31 | + property: 'tags', |
| 32 | + type: 'array', |
| 33 | + description: 'Array of tag IDs, available only if included in ?relations=tags, use expand=tags for full objects instead of IDs', |
| 34 | + items: new OA\Items(type: 'integer'), |
| 35 | + example: [1, 2, 3] |
| 36 | + ), |
| 37 | + ] |
| 38 | +)] |
| 39 | +class UserStorySchema {} |
0 commit comments