|
9 | 9 | use Fig\Http\Message\StatusCodeInterface; |
10 | 10 | use OpenApi\Attributes as OA; |
11 | 11 |
|
12 | | -#[OA\Info(version: '1.0', title: 'Dotkernel API')] |
13 | | -#[OA\Server(url: 'http://api.dotkernel.localhost', description: 'Local development server')] |
14 | | -#[OA\SecurityScheme(securityScheme: 'AuthToken', type: 'http', in: 'header', bearerFormat: 'JWT', scheme: 'bearer')] |
15 | | -#[OA\SecurityScheme(securityScheme: 'ErrorReportingToken', type: 'apiKey', name: 'Error-Reporting-Token', in: 'header')] |
16 | | - |
17 | | -#[OA\ExternalDocumentation( |
18 | | - description: 'Dotkernel API documentation', |
19 | | - url: 'https://docs.dotkernel.org/api-documentation/' |
| 12 | +#[OA\OpenApi( |
| 13 | + info: new OA\Info(version: '1.0', title: 'Dotkernel API'), |
| 14 | + servers: [ |
| 15 | + new OA\Server(url: 'http://api.dotkernel.localhost', description: 'Local development server'), |
| 16 | + ], |
| 17 | + externalDocs: new OA\ExternalDocumentation( |
| 18 | + description: 'Dotkernel API documentation', |
| 19 | + url: 'https://docs.dotkernel.org/api-documentation/', |
| 20 | + ), |
| 21 | + components: new OA\Components( |
| 22 | + securitySchemes: [ |
| 23 | + new OA\SecurityScheme( |
| 24 | + securityScheme: 'AuthToken', |
| 25 | + type: 'http', |
| 26 | + bearerFormat: 'JWT', |
| 27 | + scheme: 'bearer', |
| 28 | + ), |
| 29 | + new OA\SecurityScheme( |
| 30 | + securityScheme: 'ErrorReportingToken', |
| 31 | + type: 'apiKey', |
| 32 | + name: 'Error-Reporting-Token', |
| 33 | + in: 'header', |
| 34 | + ), |
| 35 | + ], |
| 36 | + ), |
20 | 37 | )] |
21 | 38 |
|
22 | 39 | /** |
|
0 commit comments