From 371a440b9a26bed827c8a69bc1de67d7afd67872 Mon Sep 17 00:00:00 2001 From: Vadim Troshchinskiy Date: Mon, 28 Apr 2025 12:14:36 +0200 Subject: [PATCH] Swagger fixes --- api/swagger.yaml | 94 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 76 insertions(+), 18 deletions(-) diff --git a/api/swagger.yaml b/api/swagger.yaml index a7ca255..1508c93 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -1978,15 +1978,17 @@ paths: Devuelve una lista de repositorios de Git tags: - "Git" - parameters: responses: "200": description: "Lista de repositorios" schema: - type: array - items: - type: string - example: linux + type: object + properties: + repositories: + type: array + items: + type: string + example: linux "500": description: "Excepción" @@ -2034,7 +2036,7 @@ paths: error: type: string example: "Parameters missing" - /ogrepository/v1/git/tags: + /ogrepository/v1/git/repositories/{repository}/tags: get: summary: "Obtener lista de tags" description: | @@ -2042,14 +2044,22 @@ paths: tags: - "Git" parameters: + - name: repository + in: path + required: true + type: string + description: "Nombre de repositorio" responses: "200": description: "Lista de tags" schema: - type: array - items: - type: string - example: v0.1 + type: object + properties: + tags: + type: array + items: + type: string + example: v0.1 "500": description: "Excepción" @@ -2062,7 +2072,7 @@ paths: exception: type: string example: "(Exception description)" - /ogrepository/v1/git/tags/{branchId}: + /ogrepository/v1/git/repositories/{repository}/tags/{tag}: post: summary: "Crear tag" description: | @@ -2070,6 +2080,16 @@ paths: tags: - "Git" parameters: + - name: repository + in: path + required: true + type: string + description: "Nombre de repositorio" + - name: tag + in: path + required: true + type: string + description: "Tag del repositorio" - name: JSON in: body required: true @@ -2125,6 +2145,16 @@ paths: tags: - "Git" parameters: + - name: repository + in: path + required: true + type: string + description: "Nombre de repositorio" + - name: tag + in: path + required: true + type: string + description: "Rama del repositorio" responses: "200": description: "Tag eliminado" @@ -2135,7 +2165,7 @@ paths: type: string example: deleted "500": - description: "Git no instalado" + description: "Excepción" schema: type: object properties: @@ -2145,7 +2175,7 @@ paths: exception: type: string example: "(Exception description)" - /ogrepository/v1/git/branches: + /ogrepository/v1/git/repositories/{repository}/branches: get: summary: "Obtener lista de branches" description: | @@ -2153,14 +2183,22 @@ paths: tags: - "Git" parameters: + - name: repository + in: path + required: true + type: string + description: "Nombre de repositorio" responses: "200": description: "Lista de branches" schema: - type: array - items: - type: string - example: main + type: object + properties: + branches: + type: array + items: + type: string + example: main "500": description: "Excepción" @@ -2190,7 +2228,7 @@ paths: type: string example: "Branch already exists" - /ogrepository/v1/git/branches/{branchId}: + /ogrepository/v1/git/repositories/{repository}/branches/{branch}: post: summary: "Crear branch" description: | @@ -2198,6 +2236,16 @@ paths: tags: - "Git" parameters: + - name: repository + in: path + required: true + type: string + description: "Nombre de repositorio" + - name: branch + in: path + required: true + type: string + description: "Branch del repositorio" - name: JSON in: body required: true @@ -2236,6 +2284,16 @@ paths: tags: - "Git" parameters: + - name: repository + in: path + required: true + type: string + description: "Nombre de repositorio" + - name: branch + in: path + required: true + type: string + description: "Branch del repositorio" responses: "200": description: "Branch eliminado"