2020-03-28 00:10:53 +01:00
|
|
|
swagger: "2.0"
|
2020-03-17 17:07:51 +01:00
|
|
|
info:
|
2020-03-28 00:10:53 +01:00
|
|
|
description: "This is the internal storage interface of the Birbnetes system."
|
|
|
|
version: "1.1.2"
|
|
|
|
title: "Storage 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/storage/v1"
|
|
|
|
tags:
|
|
|
|
- name: "storage"
|
|
|
|
description: "Storage Service definition"
|
|
|
|
schemes:
|
|
|
|
- "https"
|
|
|
|
- "http"
|
2020-03-17 17:07:51 +01:00
|
|
|
paths:
|
|
|
|
/object:
|
|
|
|
post:
|
2020-03-28 00:10:53 +01:00
|
|
|
tags:
|
|
|
|
- "storage"
|
2020-03-29 21:48:18 +02:00
|
|
|
summary: "Uploads an object into the service"
|
2020-03-28 00:10:53 +01:00
|
|
|
description: ""
|
|
|
|
operationId: "uploadFile"
|
|
|
|
consumes:
|
|
|
|
- "multipart/form-data"
|
|
|
|
produces:
|
|
|
|
- "application/json"
|
|
|
|
parameters:
|
|
|
|
- name: "tag"
|
|
|
|
in: "formData"
|
|
|
|
description: "Tag of sound file"
|
|
|
|
required: true
|
|
|
|
type: "string"
|
|
|
|
- name: "file"
|
|
|
|
in: "formData"
|
|
|
|
description: "Wave file to upload"
|
|
|
|
required: true
|
|
|
|
type: "file"
|
2020-03-17 17:07:51 +01:00
|
|
|
responses:
|
2020-03-28 00:10:53 +01:00
|
|
|
200:
|
|
|
|
description: "Object successfully stored. This means that a get request for this object should be successful."
|
|
|
|
schema:
|
|
|
|
$ref: "#/definitions/ApiResponse"
|
|
|
|
409:
|
|
|
|
description: "An object with this Tag already exists"
|
|
|
|
schema:
|
|
|
|
$ref: "#/definitions/ApiResponse"
|
|
|
|
/object/{objectTag}:
|
2020-03-25 01:36:49 +01:00
|
|
|
get:
|
2020-03-28 00:10:53 +01:00
|
|
|
tags:
|
|
|
|
- "storage"
|
2020-03-29 21:48:18 +02:00
|
|
|
summary: "Download a wave file identified by Tag"
|
2020-03-28 00:10:53 +01:00
|
|
|
description: "Returns a single pet"
|
|
|
|
operationId: "getPetById"
|
|
|
|
produces:
|
|
|
|
- "application/json"
|
|
|
|
- "audio/wave"
|
2020-03-25 01:36:49 +01:00
|
|
|
parameters:
|
2020-03-28 00:10:53 +01:00
|
|
|
- name: "objectTag"
|
|
|
|
in: "path"
|
|
|
|
description: "Tag of wave file to return"
|
|
|
|
required: true
|
|
|
|
type: "string"
|
2020-03-25 01:36:49 +01:00
|
|
|
responses:
|
2020-03-28 00:10:53 +01:00
|
|
|
200:
|
|
|
|
description: "The requested audio file."
|
|
|
|
404:
|
|
|
|
description: "An object with this Tag does not exist."
|
|
|
|
schema:
|
|
|
|
$ref: "#/definitions/ApiResponse"
|
2020-03-25 01:36:49 +01:00
|
|
|
delete:
|
2020-03-28 00:10:53 +01:00
|
|
|
tags:
|
|
|
|
- "storage"
|
2020-03-29 21:48:18 +02:00
|
|
|
summary: "Deletes a wave file identified by Tag"
|
2020-03-28 00:10:53 +01:00
|
|
|
description: ""
|
|
|
|
operationId: "deleteWave"
|
|
|
|
produces:
|
|
|
|
- "application/json"
|
2020-03-25 01:36:49 +01:00
|
|
|
parameters:
|
2020-03-28 00:10:53 +01:00
|
|
|
- name: "objectTag"
|
|
|
|
in: "path"
|
|
|
|
description: "Tag of wave file to delete"
|
|
|
|
required: true
|
|
|
|
type: "string"
|
2020-03-25 01:36:49 +01:00
|
|
|
responses:
|
2020-03-28 00:10:53 +01:00
|
|
|
200:
|
|
|
|
description: "Successful deletion"
|
|
|
|
404:
|
|
|
|
description: "An object with this Tag does not exist."
|
|
|
|
schema:
|
|
|
|
$ref: "#/definitions/ApiResponse"
|
|
|
|
|
|
|
|
definitions:
|
|
|
|
ApiResponse:
|
|
|
|
type: "object"
|
|
|
|
properties:
|
|
|
|
status:
|
|
|
|
type: "string"
|
|
|
|
msg:
|
|
|
|
type: "string"
|