swagger-docs/input.yml

168 lines
4.1 KiB
YAML
Raw Permalink Normal View History

2020-07-26 18:40:47 +02:00
openapi: 3.0.3
2020-03-17 17:12:50 +01:00
info:
2020-07-26 18:40:47 +02:00
title: Input Service
description: This is the input interface of the Birbnetes system.
2020-03-27 23:31:23 +01:00
contact:
2020-07-26 18:40:47 +02:00
email: tormakristof@tormakristof.eu
2020-03-27 23:31:23 +01:00
license:
2020-07-26 18:40:47 +02:00
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 1.1.3
servers:
2020-09-30 01:27:57 +02:00
- url: https://birb.k8s.kmlabz.com
2020-03-27 23:31:23 +01:00
tags:
2020-07-26 18:40:47 +02:00
- name: input
description: Input Service interaction
2020-03-17 17:12:50 +01:00
paths:
/sample:
2020-04-06 19:06:04 +02:00
get:
2020-07-26 18:40:47 +02:00
tags:
- input
2020-04-06 19:06:04 +02:00
summary: Get all stored input queries
operationId: getall
responses:
2020-07-26 18:40:47 +02:00
200:
2020-04-08 03:12:40 +02:00
description: Array of input objects
2020-07-26 18:40:47 +02:00
content:
application/json:
schema:
$ref: '#/components/schemas/InputResponse'
404:
2020-04-06 19:06:04 +02:00
description: No object matching filter
2020-07-26 18:40:47 +02:00
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
2020-03-17 17:12:50 +01:00
post:
2020-03-27 23:31:23 +01:00
tags:
2020-07-26 18:40:47 +02:00
- input
summary: uploads a sample into the system
operationId: uploadFile
requestBody:
content:
multipart/form-data:
schema:
required:
- description
- file
properties:
description:
type: object
description: Metadata json
properties:
deviceid:
type: string
date:
type: string
format: date
file:
type: string
description: Wave file to upload
format: binary
2020-03-27 23:31:23 +01:00
required: true
2020-03-17 17:12:50 +01:00
responses:
2020-03-27 23:31:23 +01:00
200:
2020-07-26 18:40:47 +02:00
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
2020-03-27 23:31:23 +01:00
400:
2020-07-26 18:40:47 +02:00
description: JSON parse error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
415:
description: Media type error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
2020-04-06 19:06:04 +02:00
417:
2020-07-26 18:40:47 +02:00
description: JSON invalid schema
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
2020-04-06 19:06:04 +02:00
469:
2020-07-26 18:40:47 +02:00
description: No file found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
2020-04-06 19:06:04 +02:00
470:
2020-07-26 18:40:47 +02:00
description: Description missing
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
2020-04-13 00:52:52 +02:00
/sample/{tagID}:
2020-04-06 19:06:04 +02:00
get:
2020-07-26 18:40:47 +02:00
tags:
- input
2020-04-08 03:12:40 +02:00
summary: Get input object by ID
2020-04-06 19:06:04 +02:00
operationId: getInput
parameters:
2020-07-26 18:40:47 +02:00
- name: tagID
in: path
description: ID of input object file
required: true
schema:
2020-04-06 19:06:04 +02:00
type: string
format: uuid
responses:
2020-07-26 18:40:47 +02:00
200:
2020-04-08 03:12:40 +02:00
description: input object
2020-07-26 18:40:47 +02:00
content:
application/json:
schema:
$ref: '#/components/schemas/InputSingeResponse'
404:
2020-04-06 19:06:04 +02:00
description: Tag not found
2020-07-26 18:40:47 +02:00
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
components:
schemas:
InputSingeResponse:
required:
2020-04-06 19:06:04 +02:00
- message
2020-07-26 18:40:47 +02:00
- status
type: object
properties:
status:
type: string
message:
$ref: '#/components/schemas/InputObject'
InputResponse:
type: array
items:
$ref: '#/components/schemas/InputObject'
InputObject:
required:
2020-04-06 19:06:04 +02:00
- date
- device_id
2020-07-26 18:40:47 +02:00
- tag
type: object
properties:
tag:
type: string
format: uuid
date:
type: string
format: date
device_id:
type: integer
ApiResponse:
required:
- message
2020-04-06 19:06:04 +02:00
- status
2020-07-26 18:40:47 +02:00
type: object
properties:
status:
type: string
message:
type: string