Conditions | 1 |
Paths | 1 |
Total Lines | 25 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | #[OA\Get( |
||
15 | path: '/', |
||
16 | description: '', |
||
17 | summary: 'Returns info about the API', |
||
18 | responses: [ |
||
19 | new OA\Response( |
||
20 | response:'200', |
||
21 | description:'Success', |
||
22 | content: new OA\JsonContent( |
||
23 | allOf: [ |
||
24 | new OA\Schema(ref: '#/components/schemas/Response'), |
||
25 | new OA\Schema(properties: [ |
||
26 | new OA\Property(property: 'data', properties: [ |
||
27 | new OA\Property(property: 'version', type: 'string', example: '3.0'), |
||
28 | new OA\Property(property: 'author', type: 'string', example: 'yiisoft'), |
||
29 | ], type: 'object'), |
||
30 | ]), |
||
31 | ] |
||
32 | ), |
||
33 | ), |
||
34 | ] |
||
35 | )] |
||
36 | public function index(DataResponseFactoryInterface $responseFactory): ResponseInterface |
||
37 | { |
||
38 | return $responseFactory->createResponse(['version' => '3.0', 'author' => 'yiisoft']); |
||
39 | } |
||
41 |