Skip to content
Merged
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
33 changes: 25 additions & 8 deletions src/App/src/OpenAPI.php
Comment thread
alexmerlin marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,31 @@
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'),
],
externalDocs: new OA\ExternalDocumentation(
description: 'Dotkernel API documentation',
url: 'https://docs.dotkernel.org/api-documentation/',
),
components: new OA\Components(
securitySchemes: [
new OA\SecurityScheme(
securityScheme: 'AuthToken',
type: 'http',
bearerFormat: 'JWT',
scheme: 'bearer',
),
new OA\SecurityScheme(
securityScheme: 'ErrorReportingToken',
type: 'apiKey',
name: 'Error-Reporting-Token',
in: 'header',
),
],
),
)]

/**
Expand Down
Loading