Skip to content

Commit

Permalink
add integration description
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Nov 22, 2024
1 parent feeab84 commit 8c05e9c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions www/src/Controller/Integration.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public function showType(string $type): mixed

$dtoFile = __DIR__ . '/../../resources/template/integration/' . $type . '_dto.txt';
$integrationFile = __DIR__ . '/../../resources/template/integration/' . $type . '_integration.txt';
$descriptionFile = __DIR__ . '/../../resources/template/integration/' . $type . '_description.html';

if (!is_file($dtoFile) || !is_file($integrationFile)) {
throw new BadRequestException('No integration available for the provided type');
Expand All @@ -64,6 +65,7 @@ public function showType(string $type): mixed
'parameters' => ['type' => $type],
'dto' => file_get_contents($dtoFile),
'integration' => file_get_contents($integrationFile),
'description' => is_file($descriptionFile) ? file_get_contents($descriptionFile) : '',
'type' => $type,
'typeName' => TypeName::getDisplayName($type),
];
Expand Down

0 comments on commit 8c05e9c

Please sign in to comment.