update apis to openapi3 where possible

This commit is contained in:
2020-07-26 18:22:48 +02:00
parent 5a8846e525
commit e334ec94a6
5 changed files with 496 additions and 661 deletions

View File

@@ -1,155 +1,175 @@
swagger: "2.0"
openapi: 3.0.3
info:
description: "This is the feature extraction interface of the Birbnetes system."
version: "1.0.0"
title: "Output Service - RDB"
title: Output Service - RDB
description: This is the feature extraction 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/result/rdb/v1"
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 1.0.0
servers:
- url: https://dev.k8s.tcloud.enginner/api/result/rdb/v1
- url: http://dev.k8s.tcloud.enginner/api/result/rdb/v1
tags:
- name: "result"
description: "Output Service - RDB interaction"
schemes:
- "https"
- "http"
- name: result
description: Output Service - RDB interaction
paths:
/result:
get:
tags:
- result
summary: Get all decision objects
operationId: getall
tags:
- result
responses:
"200":
200:
description: Array of decision objects
schema:
$ref: '#/definitions/ResultObjects'
"404":
content:
'application/JSON':
schema:
$ref: '#/components/schemas/ResultObjects'
404:
description: No object matching filter
schema:
$ref: '#/definitions/ApiResponse'
content:
'application/JSON':
schema:
$ref: '#/components/schemas/ApiResponse'
/result/filter/negative:
get:
tags:
- result
summary: Get all negative decision objects
operationId: getallnegative
tags:
- result
responses:
"200":
200:
description: Array of decision objects
schema:
$ref: '#/definitions/ResultObjects'
"404":
content:
'application/JSON':
schema:
$ref: '#/components/schemas/ResultObjects'
404:
description: No object matching filter
schema:
$ref: '#/definitions/ApiResponse'
content:
'application/JSON':
schema:
$ref: '#/components/schemas/ApiResponse'
/result/filter/positive:
get:
tags:
- result
summary: Get positive decision objects
operationId: getallpositive
tags:
- result
responses:
"200":
200:
description: Array of decision objects
schema:
$ref: '#/definitions/ResultObjects'
"404":
content:
'application/JSON':
schema:
$ref: '#/components/schemas/ResultObjects'
404:
description: No object matching filter
schema:
$ref: '#/definitions/ApiResponse'
content:
'application/JSON':
schema:
$ref: '#/components/schemas/ApiResponse'
/result/after/{dateAfter}:
get:
tags:
- result
summary: Get decision before a date
operationId: getallafter
tags:
- result
parameters:
- name: dateAfter
in: path
description: Date of filter
required: true
- name: dateAfter
in: path
description: Date of filter
required: true
schema:
type: string
format: date
responses:
"200":
200:
description: Array of decision objects
schema:
$ref: '#/definitions/ResultObjects'
"404":
content:
'application/JSON':
schema:
$ref: '#/components/schemas/ResultObjects'
404:
description: No object matching filter
schema:
$ref: '#/definitions/ApiResponse'
content:
'application/JSON':
schema:
$ref: '#/components/schemas/ApiResponse'
/result/before/{dateBefore}:
get:
tags:
- result
summary: Get decision before a date
operationId: getallbefore
tags:
- result
parameters:
- name: dateBefore
in: path
description: Date of filter
required: true
- name: dateBefore
in: path
description: Date of filter
required: true
schema:
type: string
format: date
responses:
"200":
200:
description: Array of decision objects
schema:
$ref: '#/definitions/ResultObjects'
"404":
content:
'application/JSON':
schema:
$ref: '#/components/schemas/ResultObjects'
404:
description: NO objects matching filter
schema:
$ref: '#/definitions/ApiResponse'
content:
'application/JSON':
schema:
$ref: '#/components/schemas/ApiResponse'
/result/{tagID}:
get:
tags:
- result
summary: Get decision by ID
operationId: getDecision
tags:
- result
parameters:
- name: tagID
in: path
description: ID of wave file
required: true
- name: tagID
in: path
description: ID of wave file
required: true
schema:
type: integer
format: int32
responses:
"200":
200:
description: Decision object
schema:
$ref: '#/definitions/ResultObject'
"404":
content:
'application/JSON':
schema:
$ref: '#/components/schemas/ResultObject'
404:
description: Tag not found
schema:
$ref: '#/definitions/ApiResponse'
definitions:
ResultObjects:
type: array
items:
$ref: '#/definitions/ResultObject'
ResultObject:
type: "object"
properties:
tag:
type: "string"
probability:
type: "number"
ApiResponse:
type: "object"
properties:
status:
type: "string"
message:
type: "string"
content:
'application/JSON':
schema:
$ref: '#/components/schemas/ApiResponse'
components:
schemas:
ResultObjects:
type: array
items:
$ref: '#/components/schemas/ResultObject'
ResultObject:
type: object
properties:
tag:
type: string
probability:
type: number
ApiResponse:
type: object
properties:
status:
type: string
message:
type: string