Maxim Slipenko
db49ea2c51
All checks were successful
Format and Lint / format-check (push) Successful in 14m34s
131 lines
3.1 KiB
YAML
131 lines
3.1 KiB
YAML
definitions:
|
|
errors.ErrResponse:
|
|
properties:
|
|
code:
|
|
description: application-specific error code
|
|
type: integer
|
|
error:
|
|
description: application-level error message, for debugging
|
|
type: string
|
|
status:
|
|
description: user-level status message
|
|
type: string
|
|
type: object
|
|
models.TaskStatus:
|
|
enum:
|
|
- 0
|
|
- 1
|
|
- 2
|
|
- 3
|
|
- 4
|
|
type: integer
|
|
x-enum-comments:
|
|
StatusCancelled: "4"
|
|
StatusCompleted: "2"
|
|
StatusFailed: "3"
|
|
StatusInProgress: "1"
|
|
StatusPending: "0"
|
|
x-enum-varnames:
|
|
- StatusPending
|
|
- StatusInProgress
|
|
- StatusCompleted
|
|
- StatusFailed
|
|
- StatusCancelled
|
|
taskcontroller.CreateTaskDTO:
|
|
properties:
|
|
repo:
|
|
type: string
|
|
type: object
|
|
taskcontroller.CreateTaskResponse:
|
|
properties:
|
|
status:
|
|
$ref: '#/definitions/models.TaskStatus'
|
|
taskID:
|
|
type: integer
|
|
type: object
|
|
taskcontroller.TaskUploadResponse:
|
|
properties:
|
|
status:
|
|
type: string
|
|
taskID:
|
|
type: string
|
|
type: object
|
|
info:
|
|
contact: {}
|
|
description: API For Aides repo
|
|
license:
|
|
name: GPL-3.0
|
|
url: https://www.gnu.org/licenses/gpl-3.0-standalone.html
|
|
title: Aides Repo API
|
|
paths:
|
|
/tasks:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Create a new task for a specific repository
|
|
parameters:
|
|
- description: Request body to create a task
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/taskcontroller.CreateTaskDTO'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"201":
|
|
description: Created
|
|
schema:
|
|
$ref: '#/definitions/taskcontroller.CreateTaskResponse'
|
|
"400":
|
|
description: Invalid JSON or missing required fields
|
|
schema:
|
|
$ref: '#/definitions/errors.ErrResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/errors.ErrResponse'
|
|
summary: Create a new task
|
|
tags:
|
|
- tasks
|
|
/tasks/{taskID}/upload:
|
|
post:
|
|
consumes:
|
|
- multipart/form-data
|
|
description: Upload multiple files associated with a specific task ID. Each
|
|
file must be less than 10MB.
|
|
parameters:
|
|
- description: Task ID
|
|
in: path
|
|
name: taskID
|
|
required: true
|
|
type: string
|
|
- description: Files to upload
|
|
in: formData
|
|
name: files
|
|
required: true
|
|
type: file
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Successful file upload
|
|
schema:
|
|
$ref: '#/definitions/taskcontroller.TaskUploadResponse'
|
|
"400":
|
|
description: Bad Request or File too large
|
|
schema:
|
|
$ref: '#/definitions/errors.ErrResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/errors.ErrResponse'
|
|
summary: Upload files to a task
|
|
tags:
|
|
- tasks
|
|
schemes:
|
|
- https
|
|
swagger: "2.0"
|
|
tags:
|
|
- description: Work with tags
|
|
name: tasks
|