redo input swagger definition

This commit is contained in:
Torma Kristóf 2020-03-27 23:31:23 +01:00
parent 34f0706361
commit 39d58ff2a9

143
input.yml
View File

@ -1,81 +1,74 @@
openapi: 3.0.0 swagger: "2.0"
info: info:
title: Input endpoint of system description: "This s the input interface of the Birbnetes system."
version: 1.0.1 version: "1.0.10"
servers: title: "Input Service"
- url: https://dev.k8s.tcloud.enginner/api/input/v1 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"
paths: paths:
/sample: /sample:
post: post:
summary: Upload sound file into the system tags:
requestBody: - "input"
content: summary: "uploads a sample into the system"
multipart/form-data: description: ""
schema: operationId: "uploadFile"
type: object consumes:
properties: - "multipart/form-data"
description: produces:
type: object - "application/json"
properties: parameters:
date: - name: "date"
type: string in: "formData"
format: date description: "Date of recording"
device_id: required: true
type: string type: "string"
soundFile: format: "date"
type: string - name: "device_id"
format: binary 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"
responses: responses:
'200': 200:
description: OK Message description: "successful operation"
content: schema:
application/json: $ref: "#/definitions/ApiResponse"
schema: 416:
type: array description: "Media type error"
items: schema:
$ref: '#/components/schemas/OK' $ref: "#/definitions/ApiResponse"
'416': 400:
description: Media type error description: "JSON parse error"
content: schema:
application/json: $ref: "#/definitions/ApiResponse"
schema: 444:
type: array description: "JSON invalid schema"
items: schema:
$ref: '#/components/schemas/Error' $ref: "#/definitions/ApiResponse"
'400':
description: JSON parse error
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Error'
'444':
description: JSON invalid schema
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Error'
components: definitions:
schemas: ApiResponse:
OK: type: "object"
properties: properties:
status: status:
type: string type: "string"
description: "Status message from backend." message:
required: type: "string"
- status
Error:
properties:
status:
type: string
description: "Status message from backend."
message:
type: string
description: "Error message"
required:
- status
- message