Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 26 additions & 8 deletions src/App/src/OpenAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,32 @@
use Fig\Http\Message\StatusCodeInterface;
use OpenApi\Attributes as OA;

#[OA\Info(version: '1.0', title: 'Dotkernel API')]
#[OA\Server(url: 'http://api.dotkernel.localhost', description: 'Local development server')]
#[OA\SecurityScheme(securityScheme: 'AuthToken', type: 'http', in: 'header', bearerFormat: 'JWT', scheme: 'bearer')]
#[OA\SecurityScheme(securityScheme: 'ErrorReportingToken', type: 'apiKey', name: 'Error-Reporting-Token', in: 'header')]

#[OA\ExternalDocumentation(
description: 'Dotkernel API documentation',
url: 'https://docs.dotkernel.org/api-documentation/'
#[OA\OpenApi(
info: new OA\Info(version: '1.0', title: 'Dotkernel API'),
servers: [
new OA\Server(url: 'http://api.dotkernel.localhost', description: 'Local development server'),
],
components: new OA\Components(
securitySchemes: [
new OA\SecurityScheme(
securityScheme: 'AuthToken',
type: 'http',
in: 'header',
bearerFormat: 'JWT',
scheme: 'bearer'
),
Comment on lines +19 to +25
new OA\SecurityScheme(
securityScheme: 'ErrorReportingToken',
type: 'apiKey',
name: 'Error-Reporting-Token',
in: 'header'
),
],
),
externalDocs: new OA\ExternalDocumentation(
description: 'Dotkernel API documentation',
url: 'https://docs.dotkernel.org/api-documentation/'
),
)]

/**
Expand Down
Loading