swagger-docs/input.yml

81 lines
2.0 KiB
YAML
Raw Normal View History

2020-03-17 17:12:50 +01:00
openapi: 3.0.0
info:
title: Input endpoint of system
2020-03-20 20:08:50 +01:00
version: 1.0.1
2020-03-17 17:12:50 +01:00
servers:
- url: https://dev.k8s.tcloud.enginner/api/input/v1
paths:
/sample:
post:
summary: Upload sound file into the system
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
description:
2020-03-24 17:19:51 +01:00
type: object
2020-03-20 20:05:56 +01:00
properties:
date:
type: string
format: date
device_id:
type: string
2020-03-17 17:12:50 +01:00
soundFile:
type: string
format: binary
responses:
'200':
2020-03-25 02:16:36 +01:00
description: OK Message
2020-03-17 17:12:50 +01:00
content:
application/json:
schema:
type: array
items:
2020-03-25 02:16:36 +01:00
$ref: '#/components/schemas/OK'
'416':
description: Media type error
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Error'
2020-03-25 02:30:01 +01:00
'400':
2020-03-25 02:34:13 +01:00
description: JSON parse error
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Error'
2020-03-25 03:56:29 +01:00
'444':
2020-03-25 02:34:13 +01:00
description: JSON invalid schema
2020-03-25 02:30:01 +01:00
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Error'
2020-03-17 17:12:50 +01:00
components:
schemas:
2020-03-25 02:16:36 +01:00
OK:
2020-03-17 17:12:50 +01:00
properties:
status:
type: string
description: "Status message from backend."
required:
2020-03-25 02:16:36 +01:00
- status
Error:
properties:
status:
type: string
description: "Status message from backend."
message:
type: string
description: "Error message"
required:
- status
- message