|
5 | 5 | use OpenApi\Attributes as OA; |
6 | 6 |
|
7 | 7 | // |
| 8 | + |
| 9 | +#[OA\Schema( |
| 10 | + schema: 'SummitMediaFileType', |
| 11 | + type: 'object', |
| 12 | + properties: [ |
| 13 | + new OA\Property(property: 'id', type: 'integer', example: 1), |
| 14 | + new OA\Property(property: 'created', type: 'integer', format: 'int64', example: 1633024800), |
| 15 | + new OA\Property(property: 'last_edited', type: 'integer', format: 'int64', example: 1633024800), |
| 16 | + new OA\Property(property: 'name', type: 'string', example: 'Presentation'), |
| 17 | + new OA\Property(property: 'description', type: 'string', example: 'Presentation files for events'), |
| 18 | + new OA\Property(property: 'is_system_defined', type: 'boolean', example: false), |
| 19 | + new OA\Property( |
| 20 | + property: 'allowed_extensions', |
| 21 | + type: 'array', |
| 22 | + items: new OA\Items(type: 'string'), |
| 23 | + example: ['pdf', 'ppt', 'pptx'] |
| 24 | + ), |
| 25 | + ] |
| 26 | +)] |
| 27 | +class SummitMediaFileTypeSchema {} |
| 28 | + |
| 29 | +#[OA\Schema( |
| 30 | + schema: 'PaginatedSummitMediaFileTypesResponse', |
| 31 | + allOf: [ |
| 32 | + new OA\Schema(ref: '#/components/schemas/PaginateDataSchemaResponse'), |
| 33 | + new OA\Schema( |
| 34 | + properties: [ |
| 35 | + new OA\Property( |
| 36 | + property: 'data', |
| 37 | + type: 'array', |
| 38 | + items: new OA\Items(ref: '#/components/schemas/SummitMediaFileType') |
| 39 | + ) |
| 40 | + ] |
| 41 | + ) |
| 42 | + ] |
| 43 | +)] |
| 44 | +class PaginatedSummitMediaFileTypesResponseSchema {} |
| 45 | + |
| 46 | +#[OA\Schema( |
| 47 | + schema: 'SummitMediaFileTypeCreateRequest', |
| 48 | + required: ['name', 'allowed_extensions'], |
| 49 | + type: 'object', |
| 50 | + properties: [ |
| 51 | + new OA\Property(property: 'name', type: 'string', maxLength: 255, example: 'Presentation'), |
| 52 | + new OA\Property(property: 'description', type: 'string', maxLength: 255, example: 'Presentation files for events'), |
| 53 | + new OA\Property( |
| 54 | + property: 'allowed_extensions', |
| 55 | + type: 'array', |
| 56 | + items: new OA\Items(type: 'string'), |
| 57 | + example: ['pdf', 'ppt', 'pptx'], |
| 58 | + description: 'Array of allowed file extensions' |
| 59 | + ), |
| 60 | + ] |
| 61 | +)] |
| 62 | +class SummitMediaFileTypeCreateRequestSchema {} |
| 63 | + |
| 64 | +#[OA\Schema( |
| 65 | + schema: 'SummitMediaFileTypeUpdateRequest', |
| 66 | + required: ['allowed_extensions'], |
| 67 | + type: 'object', |
| 68 | + properties: [ |
| 69 | + new OA\Property(property: 'name', type: 'string', maxLength: 255, example: 'Presentation'), |
| 70 | + new OA\Property(property: 'description', type: 'string', maxLength: 255, example: 'Presentation files for events'), |
| 71 | + new OA\Property( |
| 72 | + property: 'allowed_extensions', |
| 73 | + type: 'array', |
| 74 | + items: new OA\Items(type: 'string'), |
| 75 | + example: ['pdf', 'ppt', 'pptx'], |
| 76 | + description: 'Array of allowed file extensions' |
| 77 | + ), |
| 78 | + ] |
| 79 | +)] |
| 80 | +class SummitMediaFileTypeUpdateRequestSchema {} |
0 commit comments