Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

feat(api): add HTTP Basic Authentication fields to OpenAPI specifications and enhance PrivateKey model descriptions

Andras Bacsai0dceb40a6edb
diff --git a/app/Models/PrivateKey.php b/app/Models/PrivateKey.php
index 97c32fa315..dbed7b4390 100644
--- a/app/Models/PrivateKey.php
+++ b/app/Models/PrivateKey.php
@@ -17,8 +17,8 @@ use phpseclib3\Crypt\PublicKeyLoader;
'name' => ['type' => 'string'],
'description' => ['type' => 'string'],
'private_key' => ['type' => 'string', 'format' => 'private-key'],
- 'public_key' => ['type' => 'string'],
- 'fingerprint' => ['type' => 'string'],
+ 'public_key' => ['type' => 'string', 'description' => 'The public key of the private key.'],
+ 'fingerprint' => ['type' => 'string', 'description' => 'The fingerprint of the private key.'],
'is_git_related' => ['type' => 'boolean'],
'team_id' => ['type' => 'integer'],
'created_at' => ['type' => 'string'],
diff --git a/openapi.json b/openapi.json
index b48bd85e9b..ccd7e2d83e 100644
--- a/openapi.json
+++ b/openapi.json
@@ -7553,6 +7553,20 @@
"type": "string",
"nullable": true,
"description": "Custom Nginx configuration base64 encoded."
+ },
+ "http_basic_auth_enabled": {
+ "type": "boolean",
+ "description": "HTTP Basic Authentication enabled."
+ },
+ "http_basic_auth_username": {
+ "type": "string",
+ "nullable": true,
+ "description": "Username for HTTP Basic Authentication"
+ },
+ "http_basic_auth_password": {
+ "type": "string",
+ "nullable": true,
+ "description": "Password for HTTP Basic Authentication"
}
},
"type": "object"
@@ -7730,10 +7744,12 @@
"format": "private-key"
},
"public_key": {
- "type": "string"
+ "type": "string",
+ "description": "The public key of the private key."
},
"fingerprint": {
- "type": "string"
+ "type": "string",
+ "description": "The fingerprint of the private key."
},
"is_git_related": {
"type": "boolean"
diff --git a/openapi.yaml b/openapi.yaml
index 239da68201..41b1efdae5 100644
--- a/openapi.yaml
+++ b/openapi.yaml
@@ -5042,6 +5042,17 @@ components:
type: string
nullable: true
description: 'Custom Nginx configuration base64 encoded.'
+ http_basic_auth_enabled:
+ type: boolean
+ description: 'HTTP Basic Authentication enabled.'
+ http_basic_auth_username:
+ type: string
+ nullable: true
+ description: 'Username for HTTP Basic Authentication'
+ http_basic_auth_password:
+ type: string
+ nullable: true
+ description: 'Password for HTTP Basic Authentication'
type: object
ApplicationDeploymentQueue:
description: 'Project model'
@@ -5161,8 +5172,10 @@ components:
format: private-key
public_key:
type: string
+ description: 'The public key of the private key.'
fingerprint:
type: string
+ description: 'The fingerprint of the private key.'
is_git_related:
type: boolean
team_id:
diff --git a/routes/api.php b/routes/api.php
index 405d8240e2..8ac8aef145 100644
--- a/routes/api.php
+++ b/routes/api.php
@@ -93,7 +93,6 @@ Route::group([
Route::patch('/applications/{uuid}/envs/bulk', [ApplicationsController::class, 'create_bulk_envs'])->middleware(['api.ability:write']);
Route::patch('/applications/{uuid}/envs', [ApplicationsController::class, 'update_env_by_uuid'])->middleware(['api.ability:write']);
Route::delete('/applications/{uuid}/envs/{env_uuid}', [ApplicationsController::class, 'delete_env_by_uuid'])->middleware(['api.ability:write']);
- // Route::post('/applications/{uuid}/execute', [ApplicationsController::class, 'execute_command_by_uuid'])->middleware(['ability:write']);
Route::get('/applications/{uuid}/logs', [ApplicationsController::class, 'logs_by_uuid'])->middleware(['api.ability:read']);
Route::match(['get', 'post'], '/applications/{uuid}/start', [ApplicationsController::class, 'action_deploy'])->middleware(['api.ability:write']);