feat(OpenApi): enhance OpenAPI specifications by adding UUID parameters for application, project, and service updates; improve deployment listing with pagination parameters; update command signature for OpenApi generation

This commit is contained in:
Andras Bacsai
2025-04-13 15:48:00 +02:00
parent 28fab5665a
commit 927caefb42
3 changed files with 94 additions and 3 deletions

View File

@@ -8,7 +8,7 @@ use Symfony\Component\Yaml\Yaml;
class OpenApi extends Command class OpenApi extends Command
{ {
protected $signature = 'openapi'; protected $signature = 'generate:openapi';
protected $description = 'Generate OpenApi file.'; protected $description = 'Generate OpenApi file.';

View File

@@ -1798,6 +1798,18 @@
"summary": "Update", "summary": "Update",
"description": "Update application by UUID.", "description": "Update application by UUID.",
"operationId": "update-application-by-uuid", "operationId": "update-application-by-uuid",
"parameters": [
{
"name": "uuid",
"in": "path",
"description": "UUID of the application.",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": { "requestBody": {
"description": "Application updated.", "description": "Application updated.",
"required": true, "required": true,
@@ -4441,7 +4453,7 @@
"Deployments" "Deployments"
], ],
"summary": "Deploy", "summary": "Deploy",
"description": "Deploy by tag or uuid. `Post` request also accepted.", "description": "Deploy by tag or uuid. `Post` request also accepted with `uuid` and `tag` json body.",
"operationId": "deploy-by-tag-or-uuid", "operationId": "deploy-by-tag-or-uuid",
"parameters": [ "parameters": [
{ {
@@ -4529,6 +4541,40 @@
"summary": "List application deployments", "summary": "List application deployments",
"description": "List application deployments by using the app uuid", "description": "List application deployments by using the app uuid",
"operationId": "list-deployments-by-app-uuid", "operationId": "list-deployments-by-app-uuid",
"parameters": [
{
"name": "uuid",
"in": "path",
"description": "UUID of the application.",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
},
{
"name": "skip",
"in": "query",
"description": "Number of records to skip.",
"required": false,
"schema": {
"type": "integer",
"default": 0,
"minimum": 0
}
},
{
"name": "take",
"in": "query",
"description": "Number of records to take.",
"required": false,
"schema": {
"type": "integer",
"default": 10,
"minimum": 1
}
}
],
"responses": { "responses": {
"200": { "200": {
"description": "List application deployments by using the app uuid.", "description": "List application deployments by using the app uuid.",
@@ -4921,6 +4967,18 @@
"summary": "Update", "summary": "Update",
"description": "Update Project.", "description": "Update Project.",
"operationId": "update-project-by-uuid", "operationId": "update-project-by-uuid",
"parameters": [
{
"name": "uuid",
"in": "path",
"description": "UUID of the project.",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": { "requestBody": {
"description": "Project updated.", "description": "Project updated.",
"required": true, "required": true,
@@ -5321,6 +5379,22 @@
}, },
"404": { "404": {
"description": "Private Key not found." "description": "Private Key not found."
},
"422": {
"description": "Private Key is in use and cannot be deleted.",
"content": {
"application\/json": {
"schema": {
"properties": {
"message": {
"type": "string",
"example": "Private Key is in use and cannot be deleted."
}
},
"type": "object"
}
}
}
} }
}, },
"security": [ "security": [
@@ -6222,6 +6296,18 @@
"summary": "Update", "summary": "Update",
"description": "Update service by UUID.", "description": "Update service by UUID.",
"operationId": "update-service-by-uuid", "operationId": "update-service-by-uuid",
"parameters": [
{
"name": "uuid",
"in": "path",
"description": "UUID of the service.",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": { "requestBody": {
"description": "Service updated.", "description": "Service updated.",
"required": true, "required": true,
@@ -7198,6 +7284,11 @@
"nullable": true, "nullable": true,
"description": "Ports mappings." "description": "Ports mappings."
}, },
"custom_network_aliases": {
"type": "string",
"nullable": true,
"description": "Network aliases for Docker container."
},
"base_directory": { "base_directory": {
"type": "string", "type": "string",
"description": "Base directory for all commands." "description": "Base directory for all commands."

View File

@@ -3094,7 +3094,7 @@ paths:
tags: tags:
- Deployments - Deployments
summary: Deploy summary: Deploy
description: 'Deploy by tag or uuid. `Post` request also accepted.' description: 'Deploy by tag or uuid. `Post` request also accepted with `uuid` and `tag` json body.'
operationId: deploy-by-tag-or-uuid operationId: deploy-by-tag-or-uuid
parameters: parameters:
- -