update all definitions to openapi3

This commit is contained in:
2020-07-26 18:40:47 +02:00
parent edb2a102b4
commit ad3a7db0d9
3 changed files with 237 additions and 212 deletions

View File

@@ -1,108 +1,114 @@
swagger: "2.0"
openapi: 3.0.3
info:
description: "This is the internal storage interface of the Birbnetes system."
version: "1.1.3"
title: "Storage Service"
title: Storage Service
description: This is the internal storage interface of the Birbnetes system.
contact:
email: "tormakristof@tormakristof.eu"
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"
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 1.1.4
servers:
- url: https://dev.k8s.tcloud.enginner/api/storage/v1
- url: http://dev.k8s.tcloud.enginner/api/storage/v1
tags:
- name: "storage"
description: "Storage Service definition"
schemes:
- "https"
- "http"
- name: storage
description: Storage Service definition
paths:
/object:
post:
tags:
- "storage"
summary: "Uploads an object into the service"
description: ""
operationId: "uploadFile"
consumes:
- "multipart/form-data"
produces:
- "application/json"
parameters:
- name: "description"
in: "formData"
description: "This is actually a SoundDescription but swagger 2.0 does not support that"
- storage
summary: Uploads an object into the service
operationId: uploadFile
requestBody:
content:
multipart/form-data:
schema:
required:
- description
- soundFile
properties:
description:
type: object
description: Metadata JSON
properties:
tag:
type: string
soundFile:
type: string
description: Wave file to upload
format: binary
required: true
type: "string"
- name: "soundFile"
in: "formData"
description: "Wave file to upload"
required: true
type: "file"
responses:
200:
description: "Object successfully stored. This means that a get request for this object should be successful."
schema:
$ref: "#/definitions/ApiResponse"
description: Object successfully stored. This means that a get request for
this object should be successful.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
409:
description: "An object with this Tag already exists"
schema:
$ref: "#/definitions/ApiResponse"
description: An object with this Tag already exists
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
/object/{objectTag}:
get:
tags:
- "storage"
summary: "Download a wave file identified by Tag"
description: "Returns a single pet"
operationId: "getPetById"
produces:
- "application/json"
- "audio/wave"
- storage
summary: Download a wave file identified by Tag
description: Returns a single pet
operationId: getPetById
parameters:
- name: "objectTag"
in: "path"
description: "Tag of wave file to return"
- name: objectTag
in: path
description: Tag of wave file to return
required: true
type: "string"
schema:
type: string
responses:
200:
description: "The requested audio file."
description: The requested audio file.
content: {}
404:
description: "An object with this Tag does not exist."
schema:
$ref: "#/definitions/ApiResponse"
description: An object with this Tag does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
audio/wave:
schema:
$ref: '#/components/schemas/ApiResponse'
delete:
tags:
- "storage"
summary: "Deletes a wave file identified by Tag"
description: ""
operationId: "deleteWave"
produces:
- "application/json"
- storage
summary: Deletes a wave file identified by Tag
operationId: deleteWave
parameters:
- name: "objectTag"
in: "path"
description: "Tag of wave file to delete"
- name: objectTag
in: path
description: Tag of wave file to delete
required: true
type: "string"
schema:
type: string
responses:
200:
description: "Successful deletion"
description: Successful deletion
content: {}
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"
SoundDescription:
type: "object"
properties:
tag:
type: "string"
description: An object with this Tag does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponse'
components:
schemas:
ApiResponse:
type: object
properties:
status:
type: string
msg:
type: string