mirror of
https://github.com/cupcakearmy/coolify.git
synced 2024-10-22 08:04:19 +02:00
refactor: Update OpenApi command to generate documentation
This commit is contained in:
parent
de34150451
commit
094499e1a3
26
app/Console/Commands/OpenApi.php
Normal file
26
app/Console/Commands/OpenApi.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Process;
|
||||
|
||||
class OpenApi extends Command
|
||||
{
|
||||
protected $signature = 'openapi';
|
||||
|
||||
protected $description = 'Generate OpenApi file.';
|
||||
|
||||
public function handle()
|
||||
{
|
||||
// Generate OpenAPI documentation
|
||||
echo "Generating OpenAPI documentation.\n";
|
||||
$process = Process::run(['/var/www/html/vendor/bin/openapi', 'app', '-o', 'openapi.yaml']);
|
||||
$error = $process->errorOutput();
|
||||
$error = preg_replace('/^.*an object literal,.*$/m', '', $error);
|
||||
$error = preg_replace('/^\h*\v+/m', '', $error);
|
||||
echo $error;
|
||||
echo $process->output();
|
||||
|
||||
}
|
||||
}
|
@ -201,7 +201,7 @@ public function create_public_application(Request $request)
|
||||
#[OA\Post(
|
||||
summary: 'Create (Private - GH App)',
|
||||
description: 'Create new application based on a private repository through a Github App.',
|
||||
path: '/applications/private-gh-app',
|
||||
path: '/applications/private-github-app',
|
||||
security: [
|
||||
['bearerAuth' => []],
|
||||
],
|
||||
|
@ -247,13 +247,13 @@ paths:
|
||||
security:
|
||||
-
|
||||
bearerAuth: []
|
||||
/applications/private-gh-app:
|
||||
/applications/private-github-app:
|
||||
post:
|
||||
tags:
|
||||
- Applications
|
||||
summary: 'Create (Private - GH App)'
|
||||
description: 'Create new application based on a private repository through a Github App.'
|
||||
operationId: 4d46c84bda4f1a411f6dda15fce4061f
|
||||
operationId: 8b7af9c9a509385963bf3e72eeeea786
|
||||
requestBody:
|
||||
description: 'Application object that needs to be created.'
|
||||
required: true
|
||||
|
Loading…
Reference in New Issue
Block a user