redo input swagger definition
This commit is contained in:
parent
34f0706361
commit
39d58ff2a9
129
input.yml
129
input.yml
@ -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:
|
|
||||||
application/json:
|
|
||||||
schema:
|
schema:
|
||||||
type: array
|
$ref: "#/definitions/ApiResponse"
|
||||||
items:
|
416:
|
||||||
$ref: '#/components/schemas/OK'
|
description: "Media type error"
|
||||||
'416':
|
|
||||||
description: Media type error
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
schema:
|
||||||
type: array
|
$ref: "#/definitions/ApiResponse"
|
||||||
items:
|
400:
|
||||||
$ref: '#/components/schemas/Error'
|
description: "JSON parse error"
|
||||||
'400':
|
|
||||||
description: JSON parse error
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
schema:
|
||||||
type: array
|
$ref: "#/definitions/ApiResponse"
|
||||||
items:
|
444:
|
||||||
$ref: '#/components/schemas/Error'
|
description: "JSON invalid schema"
|
||||||
'444':
|
|
||||||
description: JSON invalid schema
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
schema:
|
||||||
type: array
|
$ref: "#/definitions/ApiResponse"
|
||||||
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."
|
|
||||||
required:
|
|
||||||
- status
|
|
||||||
Error:
|
|
||||||
properties:
|
|
||||||
status:
|
|
||||||
type: string
|
|
||||||
description: "Status message from backend."
|
|
||||||
message:
|
message:
|
||||||
type: string
|
type: "string"
|
||||||
description: "Error message"
|
|
||||||
required:
|
|
||||||
- status
|
|
||||||
- message
|
|
Loading…
Reference in New Issue
Block a user