mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-17 15:20:40 +00:00
fix(api): correct OpenAPI schema annotations for array items
- Replace OA\Schema with OA\Items for array items in DatabasesController - Replace OA\Items with OA\Schema for array type properties in GithubController - Update generated OpenAPI documentation files (openapi.json and openapi.yaml)
This commit is contained in:
559
openapi.yaml
559
openapi.yaml
@@ -2097,6 +2097,39 @@ paths:
|
||||
security:
|
||||
-
|
||||
bearerAuth: []
|
||||
'/databases/{uuid}/backups':
|
||||
get:
|
||||
tags:
|
||||
- Databases
|
||||
summary: Get
|
||||
description: 'Get backups details by database UUID.'
|
||||
operationId: get-database-backups-by-uuid
|
||||
parameters:
|
||||
-
|
||||
name: uuid
|
||||
in: path
|
||||
description: 'UUID of the database.'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
responses:
|
||||
'200':
|
||||
description: 'Get all backups for a database'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: string
|
||||
example: 'Content is very complex. Will be implemented later.'
|
||||
'401':
|
||||
$ref: '#/components/responses/401'
|
||||
'400':
|
||||
$ref: '#/components/responses/400'
|
||||
'404':
|
||||
$ref: '#/components/responses/404'
|
||||
security:
|
||||
-
|
||||
bearerAuth: []
|
||||
'/databases/{uuid}':
|
||||
get:
|
||||
tags:
|
||||
@@ -2347,6 +2380,139 @@ paths:
|
||||
security:
|
||||
-
|
||||
bearerAuth: []
|
||||
'/databases/{uuid}/backups/{scheduled_backup_uuid}':
|
||||
delete:
|
||||
tags:
|
||||
- Databases
|
||||
summary: 'Delete backup configuration'
|
||||
description: 'Deletes a backup configuration and all its executions.'
|
||||
operationId: delete-backup-configuration-by-uuid
|
||||
parameters:
|
||||
-
|
||||
name: uuid
|
||||
in: path
|
||||
description: 'UUID of the database'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
-
|
||||
name: scheduled_backup_uuid
|
||||
in: path
|
||||
description: 'UUID of the backup configuration to delete'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
-
|
||||
name: delete_s3
|
||||
in: query
|
||||
description: 'Whether to delete all backup files from S3'
|
||||
required: false
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
responses:
|
||||
'200':
|
||||
description: 'Backup configuration deleted.'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
'': { type: string, example: 'Backup configuration and all executions deleted.' }
|
||||
type: object
|
||||
'404':
|
||||
description: 'Backup configuration not found.'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
'': { type: string, example: 'Backup configuration not found.' }
|
||||
type: object
|
||||
security:
|
||||
-
|
||||
bearerAuth: []
|
||||
patch:
|
||||
tags:
|
||||
- Databases
|
||||
summary: Update
|
||||
description: 'Update a specific backup configuration for a given database, identified by its UUID and the backup ID'
|
||||
operationId: update-database-backup
|
||||
parameters:
|
||||
-
|
||||
name: uuid
|
||||
in: path
|
||||
description: 'UUID of the database.'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
-
|
||||
name: scheduled_backup_uuid
|
||||
in: path
|
||||
description: 'UUID of the backup configuration.'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
requestBody:
|
||||
description: 'Database backup configuration data'
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
save_s3:
|
||||
type: boolean
|
||||
description: 'Whether data is saved in s3 or not'
|
||||
s3_storage_uuid:
|
||||
type: string
|
||||
description: 'S3 storage UUID'
|
||||
backup_now:
|
||||
type: boolean
|
||||
description: 'Whether to take a backup now or not'
|
||||
enabled:
|
||||
type: boolean
|
||||
description: 'Whether the backup is enabled or not'
|
||||
databases_to_backup:
|
||||
type: string
|
||||
description: 'Comma separated list of databases to backup'
|
||||
dump_all:
|
||||
type: boolean
|
||||
description: 'Whether all databases are dumped or not'
|
||||
frequency:
|
||||
type: string
|
||||
description: 'Frequency of the backup'
|
||||
database_backup_retention_amount_locally:
|
||||
type: integer
|
||||
description: 'Retention amount of the backup locally'
|
||||
database_backup_retention_days_locally:
|
||||
type: integer
|
||||
description: 'Retention days of the backup locally'
|
||||
database_backup_retention_max_storage_locally:
|
||||
type: integer
|
||||
description: 'Max storage of the backup locally'
|
||||
database_backup_retention_amount_s3:
|
||||
type: integer
|
||||
description: 'Retention amount of the backup in s3'
|
||||
database_backup_retention_days_s3:
|
||||
type: integer
|
||||
description: 'Retention days of the backup in s3'
|
||||
database_backup_retention_max_storage_s3:
|
||||
type: integer
|
||||
description: 'Max storage of the backup in S3'
|
||||
type: object
|
||||
responses:
|
||||
'200':
|
||||
description: 'Database backup configuration updated'
|
||||
'401':
|
||||
$ref: '#/components/responses/401'
|
||||
'400':
|
||||
$ref: '#/components/responses/400'
|
||||
'404':
|
||||
$ref: '#/components/responses/404'
|
||||
security:
|
||||
-
|
||||
bearerAuth: []
|
||||
/databases/postgresql:
|
||||
post:
|
||||
tags:
|
||||
@@ -3094,6 +3260,102 @@ paths:
|
||||
security:
|
||||
-
|
||||
bearerAuth: []
|
||||
'/databases/{uuid}/backups/{scheduled_backup_uuid}/executions/{execution_uuid}':
|
||||
delete:
|
||||
tags:
|
||||
- Databases
|
||||
summary: 'Delete backup execution'
|
||||
description: 'Deletes a specific backup execution.'
|
||||
operationId: delete-backup-execution-by-uuid
|
||||
parameters:
|
||||
-
|
||||
name: uuid
|
||||
in: path
|
||||
description: 'UUID of the database'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
-
|
||||
name: scheduled_backup_uuid
|
||||
in: path
|
||||
description: 'UUID of the backup configuration'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
-
|
||||
name: execution_uuid
|
||||
in: path
|
||||
description: 'UUID of the backup execution to delete'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
-
|
||||
name: delete_s3
|
||||
in: query
|
||||
description: 'Whether to delete the backup from S3'
|
||||
required: false
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
responses:
|
||||
'200':
|
||||
description: 'Backup execution deleted.'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
'': { type: string, example: 'Backup execution deleted.' }
|
||||
type: object
|
||||
'404':
|
||||
description: 'Backup execution not found.'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
'': { type: string, example: 'Backup execution not found.' }
|
||||
type: object
|
||||
security:
|
||||
-
|
||||
bearerAuth: []
|
||||
'/databases/{uuid}/backups/{scheduled_backup_uuid}/executions':
|
||||
get:
|
||||
tags:
|
||||
- Databases
|
||||
summary: 'List backup executions'
|
||||
description: 'Get all executions for a specific backup configuration.'
|
||||
operationId: list-backup-executions
|
||||
parameters:
|
||||
-
|
||||
name: uuid
|
||||
in: path
|
||||
description: 'UUID of the database'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
-
|
||||
name: scheduled_backup_uuid
|
||||
in: path
|
||||
description: 'UUID of the backup configuration'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
responses:
|
||||
'200':
|
||||
description: 'List of backup executions'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
'': { type: array, items: { properties: { uuid: { type: string }, filename: { type: string }, size: { type: integer }, created_at: { type: string }, message: { type: string }, status: { type: string } }, type: object } }
|
||||
type: object
|
||||
'404':
|
||||
description: 'Backup configuration not found.'
|
||||
security:
|
||||
-
|
||||
bearerAuth: []
|
||||
'/databases/{uuid}/start':
|
||||
get:
|
||||
tags:
|
||||
@@ -3348,6 +3610,300 @@ paths:
|
||||
security:
|
||||
-
|
||||
bearerAuth: []
|
||||
/github-apps:
|
||||
post:
|
||||
tags:
|
||||
- 'GitHub Apps'
|
||||
summary: 'Create GitHub App'
|
||||
description: 'Create a new GitHub app.'
|
||||
operationId: create-github-app
|
||||
requestBody:
|
||||
description: 'GitHub app creation payload.'
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- name
|
||||
- api_url
|
||||
- html_url
|
||||
- app_id
|
||||
- installation_id
|
||||
- client_id
|
||||
- client_secret
|
||||
- private_key_uuid
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: 'Name of the GitHub app.'
|
||||
organization:
|
||||
type: string
|
||||
nullable: true
|
||||
description: 'Organization to associate the app with.'
|
||||
api_url:
|
||||
type: string
|
||||
description: 'API URL for the GitHub app (e.g., https://api.github.com).'
|
||||
html_url:
|
||||
type: string
|
||||
description: 'HTML URL for the GitHub app (e.g., https://github.com).'
|
||||
custom_user:
|
||||
type: string
|
||||
description: 'Custom user for SSH access (default: git).'
|
||||
custom_port:
|
||||
type: integer
|
||||
description: 'Custom port for SSH access (default: 22).'
|
||||
app_id:
|
||||
type: integer
|
||||
description: 'GitHub App ID from GitHub.'
|
||||
installation_id:
|
||||
type: integer
|
||||
description: 'GitHub Installation ID.'
|
||||
client_id:
|
||||
type: string
|
||||
description: 'GitHub OAuth App Client ID.'
|
||||
client_secret:
|
||||
type: string
|
||||
description: 'GitHub OAuth App Client Secret.'
|
||||
webhook_secret:
|
||||
type: string
|
||||
description: 'Webhook secret for GitHub webhooks.'
|
||||
private_key_uuid:
|
||||
type: string
|
||||
description: 'UUID of an existing private key for GitHub App authentication.'
|
||||
is_system_wide:
|
||||
type: boolean
|
||||
description: 'Is this app system-wide (cloud only).'
|
||||
type: object
|
||||
responses:
|
||||
'201':
|
||||
description: 'GitHub app created successfully.'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
id: { type: integer }
|
||||
uuid: { type: string }
|
||||
name: { type: string }
|
||||
organization: { type: string, nullable: true }
|
||||
api_url: { type: string }
|
||||
html_url: { type: string }
|
||||
custom_user: { type: string }
|
||||
custom_port: { type: integer }
|
||||
app_id: { type: integer }
|
||||
installation_id: { type: integer }
|
||||
client_id: { type: string }
|
||||
private_key_id: { type: integer }
|
||||
is_system_wide: { type: boolean }
|
||||
team_id: { type: integer }
|
||||
type: object
|
||||
'400':
|
||||
$ref: '#/components/responses/400'
|
||||
'401':
|
||||
$ref: '#/components/responses/401'
|
||||
'422':
|
||||
$ref: '#/components/responses/422'
|
||||
security:
|
||||
-
|
||||
bearerAuth: []
|
||||
'/github-apps/{github_app_id}/repositories':
|
||||
get:
|
||||
tags:
|
||||
- 'GitHub Apps'
|
||||
summary: 'Load Repositories for a GitHub App'
|
||||
description: 'Fetch repositories from GitHub for a given GitHub app.'
|
||||
operationId: load-repositories
|
||||
parameters:
|
||||
-
|
||||
name: github_app_id
|
||||
in: path
|
||||
description: 'GitHub App ID'
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
responses:
|
||||
'200':
|
||||
description: 'Repositories loaded successfully.'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
'': { type: array, items: { type: object } }
|
||||
type: object
|
||||
'400':
|
||||
$ref: '#/components/responses/400'
|
||||
'401':
|
||||
$ref: '#/components/responses/401'
|
||||
'404':
|
||||
$ref: '#/components/responses/404'
|
||||
security:
|
||||
-
|
||||
bearerAuth: []
|
||||
'/github-apps/{github_app_id}/repositories/{owner}/{repo}/branches':
|
||||
get:
|
||||
tags:
|
||||
- 'GitHub Apps'
|
||||
summary: 'Load Branches for a GitHub Repository'
|
||||
description: 'Fetch branches from GitHub for a given repository.'
|
||||
operationId: load-branches
|
||||
parameters:
|
||||
-
|
||||
name: github_app_id
|
||||
in: path
|
||||
description: 'GitHub App ID'
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
-
|
||||
name: owner
|
||||
in: path
|
||||
description: 'Repository owner'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
-
|
||||
name: repo
|
||||
in: path
|
||||
description: 'Repository name'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: 'Branches loaded successfully.'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
'': { type: array, items: { type: object } }
|
||||
type: object
|
||||
'400':
|
||||
$ref: '#/components/responses/400'
|
||||
'401':
|
||||
$ref: '#/components/responses/401'
|
||||
'404':
|
||||
$ref: '#/components/responses/404'
|
||||
security:
|
||||
-
|
||||
bearerAuth: []
|
||||
'/github-apps/{github_app_id}':
|
||||
delete:
|
||||
tags:
|
||||
- 'GitHub Apps'
|
||||
summary: 'Delete GitHub App'
|
||||
description: "Delete a GitHub app if it's not being used by any applications."
|
||||
operationId: deleteGithubApp
|
||||
parameters:
|
||||
-
|
||||
name: github_app_id
|
||||
in: path
|
||||
description: 'GitHub App ID'
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
responses:
|
||||
'200':
|
||||
description: 'GitHub app deleted successfully'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
message: { type: string, example: 'GitHub app deleted successfully' }
|
||||
type: object
|
||||
'401':
|
||||
description: Unauthorized
|
||||
'404':
|
||||
description: 'GitHub app not found'
|
||||
'409':
|
||||
description: 'Conflict - GitHub app is in use'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
message: { type: string, example: 'This GitHub app is being used by 5 application(s). Please delete all applications first.' }
|
||||
type: object
|
||||
security:
|
||||
-
|
||||
bearerAuth: []
|
||||
patch:
|
||||
tags:
|
||||
- 'GitHub Apps'
|
||||
summary: 'Update GitHub App'
|
||||
description: 'Update an existing GitHub app.'
|
||||
operationId: updateGithubApp
|
||||
parameters:
|
||||
-
|
||||
name: github_app_id
|
||||
in: path
|
||||
description: 'GitHub App ID'
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: 'GitHub App name'
|
||||
organization:
|
||||
type: string
|
||||
nullable: true
|
||||
description: 'GitHub organization'
|
||||
api_url:
|
||||
type: string
|
||||
description: 'GitHub API URL'
|
||||
html_url:
|
||||
type: string
|
||||
description: 'GitHub HTML URL'
|
||||
custom_user:
|
||||
type: string
|
||||
description: 'Custom user for SSH'
|
||||
custom_port:
|
||||
type: integer
|
||||
description: 'Custom port for SSH'
|
||||
app_id:
|
||||
type: integer
|
||||
description: 'GitHub App ID'
|
||||
installation_id:
|
||||
type: integer
|
||||
description: 'GitHub Installation ID'
|
||||
client_id:
|
||||
type: string
|
||||
description: 'GitHub Client ID'
|
||||
client_secret:
|
||||
type: string
|
||||
description: 'GitHub Client Secret'
|
||||
webhook_secret:
|
||||
type: string
|
||||
description: 'GitHub Webhook Secret'
|
||||
private_key_uuid:
|
||||
type: string
|
||||
description: 'Private key UUID'
|
||||
is_system_wide:
|
||||
type: boolean
|
||||
description: 'Is system wide (non-cloud instances only)'
|
||||
type: object
|
||||
responses:
|
||||
'200':
|
||||
description: 'GitHub app updated successfully'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
message: { type: string, example: 'GitHub app updated successfully' }
|
||||
data: { type: object, description: 'Updated GitHub app data' }
|
||||
type: object
|
||||
'401':
|
||||
description: Unauthorized
|
||||
'404':
|
||||
description: 'GitHub app not found'
|
||||
'422':
|
||||
description: 'Validation error'
|
||||
security:
|
||||
-
|
||||
bearerAuth: []
|
||||
/version:
|
||||
get:
|
||||
summary: Version
|
||||
@@ -5781,6 +6337,9 @@ tags:
|
||||
-
|
||||
name: Deployments
|
||||
description: Deployments
|
||||
-
|
||||
name: 'GitHub Apps'
|
||||
description: 'GitHub Apps'
|
||||
-
|
||||
name: Projects
|
||||
description: Projects
|
||||
|
||||
Reference in New Issue
Block a user