update all definitions to openapi3
This commit is contained in:
parent
edb2a102b4
commit
ad3a7db0d9
237
input.yml
237
input.yml
@ -1,151 +1,168 @@
|
|||||||
swagger: "2.0"
|
openapi: 3.0.3
|
||||||
info:
|
info:
|
||||||
description: "This is the input interface of the Birbnetes system."
|
title: Input Service
|
||||||
version: "1.1.0"
|
description: This is the input interface of the Birbnetes system.
|
||||||
title: "Input Service"
|
|
||||||
contact:
|
contact:
|
||||||
email: "tormakristof@tormakristof.eu"
|
email: tormakristof@tormakristof.eu
|
||||||
license:
|
license:
|
||||||
name: "Apache 2.0"
|
name: Apache 2.0
|
||||||
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
|
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
host: "dev.k8s.tcloud.enginner"
|
version: 1.1.3
|
||||||
basePath: "/api/input/v1"
|
servers:
|
||||||
|
- url: https://dev.k8s.tcloud.enginner/api/input/v1
|
||||||
|
- url: http://dev.k8s.tcloud.enginner/api/input/v1
|
||||||
tags:
|
tags:
|
||||||
- name: "input"
|
- name: input
|
||||||
description: "Input Service interaction"
|
description: Input Service interaction
|
||||||
schemes:
|
|
||||||
- "https"
|
|
||||||
- "http"
|
|
||||||
paths:
|
paths:
|
||||||
/sample:
|
/sample:
|
||||||
get:
|
get:
|
||||||
|
tags:
|
||||||
|
- input
|
||||||
summary: Get all stored input queries
|
summary: Get all stored input queries
|
||||||
operationId: getall
|
operationId: getall
|
||||||
tags:
|
|
||||||
- input
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: Array of input objects
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/InputResponse'
|
|
||||||
"404":
|
|
||||||
description: No object matching filter
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/ApiResponse'
|
|
||||||
|
|
||||||
post:
|
|
||||||
tags:
|
|
||||||
- "input"
|
|
||||||
summary: "uploads a sample into the system"
|
|
||||||
description: ""
|
|
||||||
operationId: "uploadFile"
|
|
||||||
consumes:
|
|
||||||
- "multipart/form-data"
|
|
||||||
produces:
|
|
||||||
- "application/json"
|
|
||||||
parameters:
|
|
||||||
- name: "description"
|
|
||||||
in: "formData"
|
|
||||||
description: "JSON"
|
|
||||||
required: true
|
|
||||||
type: "string"
|
|
||||||
format: "date"
|
|
||||||
- name: "file"
|
|
||||||
in: "formData"
|
|
||||||
description: "Wave file to upload"
|
|
||||||
required: true
|
|
||||||
type: "file"
|
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: "successful operation"
|
description: Array of input objects
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/ApiResponse"
|
$ref: '#/components/schemas/InputResponse'
|
||||||
415:
|
404:
|
||||||
description: "Media type error"
|
description: No object matching filter
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/ApiResponse"
|
$ref: '#/components/schemas/ApiResponse'
|
||||||
400:
|
post:
|
||||||
description: "JSON parse error"
|
|
||||||
schema:
|
|
||||||
$ref: "#/definitions/ApiResponse"
|
|
||||||
417:
|
|
||||||
description: "JSON invalid schema"
|
|
||||||
schema:
|
|
||||||
$ref: "#/definitions/ApiResponse"
|
|
||||||
469:
|
|
||||||
description: "No file found"
|
|
||||||
schema:
|
|
||||||
$ref: "#/definitions/ApiResponse"
|
|
||||||
470:
|
|
||||||
description: "Description missing"
|
|
||||||
schema:
|
|
||||||
$ref: "#/definitions/ApiResponse"
|
|
||||||
|
|
||||||
/sample/{tagID}:
|
|
||||||
get:
|
|
||||||
summary: Get input object by ID
|
|
||||||
operationId: getInput
|
|
||||||
tags:
|
tags:
|
||||||
- input
|
- input
|
||||||
|
summary: uploads a sample into the system
|
||||||
|
operationId: uploadFile
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
multipart/form-data:
|
||||||
|
schema:
|
||||||
|
required:
|
||||||
|
- description
|
||||||
|
- file
|
||||||
|
properties:
|
||||||
|
description:
|
||||||
|
type: object
|
||||||
|
description: Metadata json
|
||||||
|
properties:
|
||||||
|
deviceid:
|
||||||
|
type: string
|
||||||
|
date:
|
||||||
|
type: string
|
||||||
|
format: date
|
||||||
|
file:
|
||||||
|
type: string
|
||||||
|
description: Wave file to upload
|
||||||
|
format: binary
|
||||||
|
required: true
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: successful operation
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ApiResponse'
|
||||||
|
400:
|
||||||
|
description: JSON parse error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ApiResponse'
|
||||||
|
415:
|
||||||
|
description: Media type error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ApiResponse'
|
||||||
|
417:
|
||||||
|
description: JSON invalid schema
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ApiResponse'
|
||||||
|
469:
|
||||||
|
description: No file found
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ApiResponse'
|
||||||
|
470:
|
||||||
|
description: Description missing
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ApiResponse'
|
||||||
|
/sample/{tagID}:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- input
|
||||||
|
summary: Get input object by ID
|
||||||
|
operationId: getInput
|
||||||
parameters:
|
parameters:
|
||||||
- name: tagID
|
- name: tagID
|
||||||
in: path
|
in: path
|
||||||
description: ID of input object file
|
description: ID of input object file
|
||||||
required: true
|
required: true
|
||||||
|
schema:
|
||||||
type: string
|
type: string
|
||||||
format: uuid
|
format: uuid
|
||||||
responses:
|
responses:
|
||||||
"200":
|
200:
|
||||||
description: input object
|
description: input object
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/InputSingeResponse'
|
$ref: '#/components/schemas/InputSingeResponse'
|
||||||
"404":
|
404:
|
||||||
description: Tag not found
|
description: Tag not found
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/ApiResponse'
|
$ref: '#/components/schemas/ApiResponse'
|
||||||
|
components:
|
||||||
|
schemas:
|
||||||
definitions:
|
|
||||||
InputSingeResponse:
|
InputSingeResponse:
|
||||||
type: "object"
|
required:
|
||||||
|
- message
|
||||||
|
- status
|
||||||
|
type: object
|
||||||
properties:
|
properties:
|
||||||
status:
|
status:
|
||||||
type: "string"
|
type: string
|
||||||
message:
|
message:
|
||||||
$ref: '#/definitions/InputObject'
|
$ref: '#/components/schemas/InputObject'
|
||||||
required:
|
|
||||||
- status
|
|
||||||
- message
|
|
||||||
|
|
||||||
InputResponse:
|
InputResponse:
|
||||||
type: "array"
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: "#/definitions/InputObject"
|
$ref: '#/components/schemas/InputObject'
|
||||||
|
|
||||||
|
|
||||||
InputObject:
|
InputObject:
|
||||||
type: "object"
|
|
||||||
properties:
|
|
||||||
tag:
|
|
||||||
type: "string"
|
|
||||||
format: "uuid"
|
|
||||||
date:
|
|
||||||
type: "string"
|
|
||||||
format: "date"
|
|
||||||
device_id:
|
|
||||||
type: "integer"
|
|
||||||
required:
|
required:
|
||||||
- tag
|
|
||||||
- date
|
- date
|
||||||
- device_id
|
- device_id
|
||||||
|
- tag
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
tag:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
date:
|
||||||
|
type: string
|
||||||
|
format: date
|
||||||
|
device_id:
|
||||||
|
type: integer
|
||||||
ApiResponse:
|
ApiResponse:
|
||||||
type: "object"
|
required:
|
||||||
|
- message
|
||||||
|
- status
|
||||||
|
type: object
|
||||||
properties:
|
properties:
|
||||||
status:
|
status:
|
||||||
type: "string"
|
type: string
|
||||||
message:
|
message:
|
||||||
type: "string"
|
type: string
|
||||||
required:
|
|
||||||
- status
|
|
||||||
- message
|
|
||||||
|
18
model.yaml
18
model.yaml
@ -7,7 +7,7 @@ info:
|
|||||||
license:
|
license:
|
||||||
name: Apache 2.0
|
name: Apache 2.0
|
||||||
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
version: 1.0.3
|
version: 1.0.4
|
||||||
servers:
|
servers:
|
||||||
- url: https://dev.k8s.tcloud.enginner/api/model/v1
|
- url: https://dev.k8s.tcloud.enginner/api/model/v1
|
||||||
- url: http://dev.k8s.tcloud.enginner/api/model/v1
|
- url: http://dev.k8s.tcloud.enginner/api/model/v1
|
||||||
@ -43,12 +43,16 @@ paths:
|
|||||||
- info
|
- info
|
||||||
properties:
|
properties:
|
||||||
info:
|
info:
|
||||||
|
type: object
|
||||||
|
description: Json metadata of model
|
||||||
|
properties:
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: This is actually a UploadInfo but swagger 2.0 does
|
|
||||||
not support that
|
|
||||||
file:
|
file:
|
||||||
type: string
|
type: string
|
||||||
description: model
|
description: model itself
|
||||||
format: binary
|
format: binary
|
||||||
required: true
|
required: true
|
||||||
responses:
|
responses:
|
||||||
@ -82,16 +86,14 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: The requested model
|
description: The requested model
|
||||||
content: {}
|
content:
|
||||||
|
application/octet-stream: {}
|
||||||
404:
|
404:
|
||||||
description: A model with this Id does not exist.
|
description: A model with this Id does not exist.
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ApiResponse'
|
$ref: '#/components/schemas/ApiResponse'
|
||||||
application/octet-stream:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/ApiResponse'
|
|
||||||
delete:
|
delete:
|
||||||
tags:
|
tags:
|
||||||
- model
|
- model
|
||||||
|
152
storage.yml
152
storage.yml
@ -1,108 +1,114 @@
|
|||||||
swagger: "2.0"
|
openapi: 3.0.3
|
||||||
info:
|
info:
|
||||||
description: "This is the internal storage interface of the Birbnetes system."
|
title: Storage Service
|
||||||
version: "1.1.3"
|
description: This is the internal storage interface of the Birbnetes system.
|
||||||
title: "Storage Service"
|
|
||||||
contact:
|
contact:
|
||||||
email: "tormakristof@tormakristof.eu"
|
email: tormakristof@tormakristof.eu
|
||||||
license:
|
license:
|
||||||
name: "Apache 2.0"
|
name: Apache 2.0
|
||||||
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
|
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
host: "dev.k8s.tcloud.enginner"
|
version: 1.1.4
|
||||||
basePath: "/api/storage/v1"
|
servers:
|
||||||
|
- url: https://dev.k8s.tcloud.enginner/api/storage/v1
|
||||||
|
- url: http://dev.k8s.tcloud.enginner/api/storage/v1
|
||||||
tags:
|
tags:
|
||||||
- name: "storage"
|
- name: storage
|
||||||
description: "Storage Service definition"
|
description: Storage Service definition
|
||||||
schemes:
|
|
||||||
- "https"
|
|
||||||
- "http"
|
|
||||||
paths:
|
paths:
|
||||||
/object:
|
/object:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- "storage"
|
- storage
|
||||||
summary: "Uploads an object into the service"
|
summary: Uploads an object into the service
|
||||||
description: ""
|
operationId: uploadFile
|
||||||
operationId: "uploadFile"
|
requestBody:
|
||||||
consumes:
|
content:
|
||||||
- "multipart/form-data"
|
multipart/form-data:
|
||||||
produces:
|
schema:
|
||||||
- "application/json"
|
required:
|
||||||
parameters:
|
- description
|
||||||
- name: "description"
|
- soundFile
|
||||||
in: "formData"
|
properties:
|
||||||
description: "This is actually a SoundDescription but swagger 2.0 does not support that"
|
description:
|
||||||
|
type: object
|
||||||
|
description: Metadata JSON
|
||||||
|
properties:
|
||||||
|
tag:
|
||||||
|
type: string
|
||||||
|
soundFile:
|
||||||
|
type: string
|
||||||
|
description: Wave file to upload
|
||||||
|
format: binary
|
||||||
required: true
|
required: true
|
||||||
type: "string"
|
|
||||||
- name: "soundFile"
|
|
||||||
in: "formData"
|
|
||||||
description: "Wave file to upload"
|
|
||||||
required: true
|
|
||||||
type: "file"
|
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: "Object successfully stored. This means that a get request for this object should be successful."
|
description: Object successfully stored. This means that a get request for
|
||||||
|
this object should be successful.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/ApiResponse"
|
$ref: '#/components/schemas/ApiResponse'
|
||||||
409:
|
409:
|
||||||
description: "An object with this Tag already exists"
|
description: An object with this Tag already exists
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/ApiResponse"
|
$ref: '#/components/schemas/ApiResponse'
|
||||||
/object/{objectTag}:
|
/object/{objectTag}:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- "storage"
|
- storage
|
||||||
summary: "Download a wave file identified by Tag"
|
summary: Download a wave file identified by Tag
|
||||||
description: "Returns a single pet"
|
description: Returns a single pet
|
||||||
operationId: "getPetById"
|
operationId: getPetById
|
||||||
produces:
|
|
||||||
- "application/json"
|
|
||||||
- "audio/wave"
|
|
||||||
parameters:
|
parameters:
|
||||||
- name: "objectTag"
|
- name: objectTag
|
||||||
in: "path"
|
in: path
|
||||||
description: "Tag of wave file to return"
|
description: Tag of wave file to return
|
||||||
required: true
|
required: true
|
||||||
type: "string"
|
schema:
|
||||||
|
type: string
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: "The requested audio file."
|
description: The requested audio file.
|
||||||
|
content: {}
|
||||||
404:
|
404:
|
||||||
description: "An object with this Tag does not exist."
|
description: An object with this Tag does not exist.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/ApiResponse"
|
$ref: '#/components/schemas/ApiResponse'
|
||||||
|
audio/wave:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ApiResponse'
|
||||||
delete:
|
delete:
|
||||||
tags:
|
tags:
|
||||||
- "storage"
|
- storage
|
||||||
summary: "Deletes a wave file identified by Tag"
|
summary: Deletes a wave file identified by Tag
|
||||||
description: ""
|
operationId: deleteWave
|
||||||
operationId: "deleteWave"
|
|
||||||
produces:
|
|
||||||
- "application/json"
|
|
||||||
parameters:
|
parameters:
|
||||||
- name: "objectTag"
|
- name: objectTag
|
||||||
in: "path"
|
in: path
|
||||||
description: "Tag of wave file to delete"
|
description: Tag of wave file to delete
|
||||||
required: true
|
required: true
|
||||||
type: "string"
|
schema:
|
||||||
|
type: string
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: "Successful deletion"
|
description: Successful deletion
|
||||||
|
content: {}
|
||||||
404:
|
404:
|
||||||
description: "An object with this Tag does not exist."
|
description: An object with this Tag does not exist.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/ApiResponse"
|
$ref: '#/components/schemas/ApiResponse'
|
||||||
|
components:
|
||||||
definitions:
|
schemas:
|
||||||
ApiResponse:
|
ApiResponse:
|
||||||
type: "object"
|
type: object
|
||||||
properties:
|
properties:
|
||||||
status:
|
status:
|
||||||
type: "string"
|
type: string
|
||||||
msg:
|
msg:
|
||||||
type: "string"
|
type: string
|
||||||
SoundDescription:
|
|
||||||
type: "object"
|
|
||||||
properties:
|
|
||||||
tag:
|
|
||||||
type: "string"
|
|
||||||
|
Loading…
Reference in New Issue
Block a user