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

This commit is contained in:
Andras Bacsai
2025-04-23 11:59:01 +02:00
parent e4648bcf9c
commit 0dceb40a6e
4 changed files with 33 additions and 5 deletions

View File

@@ -17,8 +17,8 @@ use phpseclib3\Crypt\PublicKeyLoader;
'name' => ['type' => 'string'], 'name' => ['type' => 'string'],
'description' => ['type' => 'string'], 'description' => ['type' => 'string'],
'private_key' => ['type' => 'string', 'format' => 'private-key'], 'private_key' => ['type' => 'string', 'format' => 'private-key'],
'public_key' => ['type' => 'string'], 'public_key' => ['type' => 'string', 'description' => 'The public key of the private key.'],
'fingerprint' => ['type' => 'string'], 'fingerprint' => ['type' => 'string', 'description' => 'The fingerprint of the private key.'],
'is_git_related' => ['type' => 'boolean'], 'is_git_related' => ['type' => 'boolean'],
'team_id' => ['type' => 'integer'], 'team_id' => ['type' => 'integer'],
'created_at' => ['type' => 'string'], 'created_at' => ['type' => 'string'],

View File

@@ -7553,6 +7553,20 @@
"type": "string", "type": "string",
"nullable": true, "nullable": true,
"description": "Custom Nginx configuration base64 encoded." "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" "type": "object"
@@ -7730,10 +7744,12 @@
"format": "private-key" "format": "private-key"
}, },
"public_key": { "public_key": {
"type": "string" "type": "string",
"description": "The public key of the private key."
}, },
"fingerprint": { "fingerprint": {
"type": "string" "type": "string",
"description": "The fingerprint of the private key."
}, },
"is_git_related": { "is_git_related": {
"type": "boolean" "type": "boolean"

View File

@@ -5042,6 +5042,17 @@ components:
type: string type: string
nullable: true nullable: true
description: 'Custom Nginx configuration base64 encoded.' 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 type: object
ApplicationDeploymentQueue: ApplicationDeploymentQueue:
description: 'Project model' description: 'Project model'
@@ -5161,8 +5172,10 @@ components:
format: private-key format: private-key
public_key: public_key:
type: string type: string
description: 'The public key of the private key.'
fingerprint: fingerprint:
type: string type: string
description: 'The fingerprint of the private key.'
is_git_related: is_git_related:
type: boolean type: boolean
team_id: team_id:

View File

@@ -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/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::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::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::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']); Route::match(['get', 'post'], '/applications/{uuid}/start', [ApplicationsController::class, 'action_deploy'])->middleware(['api.ability:write']);