swagger-docs/input.yml

157 lines
3.5 KiB
YAML
Raw Normal View History

2020-03-27 23:31:23 +01:00
swagger: "2.0"
2020-03-17 17:12:50 +01:00
info:
2020-04-06 19:06:04 +02:00
description: "This is the input interface of the Birbnetes system."
version: "1.1.0"
2020-03-27 23:31:23 +01:00
title: "Input Service"
contact:
email: "tormakristof@tormakristof.eu"
license:
name: "Apache 2.0"
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
host: "dev.k8s.tcloud.enginner"
basePath: "/api/input/v1"
tags:
- name: "input"
description: "Input Service interaction"
schemes:
- "https"
- "http"
2020-03-17 17:12:50 +01:00
paths:
/sample:
2020-04-06 19:06:04 +02:00
get:
summary: Get all stored input queries
operationId: getall
tags:
- input
responses:
"200":
description: Array of decision objects
schema:
$ref: '#/definitions/InputResponse'
"404":
description: No object matching filter
schema:
$ref: '#/definitions/ApiResponse'
2020-03-17 17:12:50 +01:00
post:
2020-03-27 23:31:23 +01:00
tags:
- "input"
summary: "uploads a sample into the system"
description: ""
operationId: "uploadFile"
consumes:
- "multipart/form-data"
produces:
- "application/json"
parameters:
- name: "date"
in: "formData"
description: "Date of recording"
required: true
type: "string"
format: "date"
- name: "device_id"
in: "formData"
description: "ID of recording device"
required: true
type: "integer"
format: "int64"
- name: "file"
in: "formData"
description: "Wave file to upload"
required: true
type: "file"
2020-03-17 17:12:50 +01:00
responses:
2020-03-27 23:31:23 +01:00
200:
description: "successful operation"
schema:
$ref: "#/definitions/ApiResponse"
2020-04-06 19:06:04 +02:00
415:
2020-03-27 23:31:23 +01:00
description: "Media type error"
schema:
$ref: "#/definitions/ApiResponse"
400:
description: "JSON parse error"
schema:
$ref: "#/definitions/ApiResponse"
2020-04-06 19:06:04 +02:00
417:
2020-03-27 23:31:23 +01:00
description: "JSON invalid schema"
schema:
$ref: "#/definitions/ApiResponse"
2020-04-06 19:06:04 +02:00
469:
description: "No file found"
schema:
$ref: "#/definitions/ApiResponse"
470:
description: "Description missing"
schema:
$ref: "#/definitions/ApiResponse"
/output/{tagID}:
get:
summary: Get decision by ID
operationId: getInput
tags:
- input
parameters:
- name: tagID
in: path
description: ID of input object file
required: true
type: string
format: uuid
responses:
"200":
description: Decision object
schema:
$ref: '#/definitions/InputSingeResponse'
"404":
description: Tag not found
schema:
$ref: '#/definitions/ApiResponse'
2020-03-17 17:12:50 +01:00
2020-03-27 23:31:23 +01:00
definitions:
2020-04-06 19:06:04 +02:00
InputSingeResponse:
type: "object"
properties:
status:
type: "string"
message:
$ref: '#/definitions/InputObject'
required:
- status
- message
InputResponse:
type: "array"
items:
$ref: "#/definitions/InputObject"
InputObject:
type: "object"
properties:
tag:
type: "string"
format: "uuid"
date:
type: "string"
format: "date"
device_id:
type: "integer"
required:
- tag
- date
- device_id
2020-03-27 23:31:23 +01:00
ApiResponse:
type: "object"
properties:
status:
type: "string"
message:
2020-04-06 19:06:04 +02:00
type: "string"
required:
- status
- message