refactor api

This commit is contained in:
Torma Kristóf 2020-04-08 03:17:47 +02:00
parent 23ef0e725a
commit e69851d4f8

View File

@ -9,52 +9,68 @@ info:
name: "Apache 2.0"
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
host: "dev.k8s.tcloud.enginner"
basePath: "/api/extractor/rdb/v1"
basePath: "/api/result/rdb/v1"
tags:
- name: "output"
- name: "result"
description: "Output Service - RDB interaction"
schemes:
- "https"
- "http"
paths:
/output/filter/negative:
/result:
get:
summary: Get all decision objects
operationId: getall
tags:
- result
responses:
"200":
description: Array of decision objects
schema:
$ref: '#/definitions/ResultObjects'
"404":
description: No object matching filter
schema:
$ref: '#/definitions/ApiResponse'
/result/filter/negative:
get:
summary: Get all negative decision objects
operationId: getallnegative
tags:
- output
- result
responses:
"200":
description: Array of decision objects
schema:
$ref: '#/definitions/OutputObjects'
$ref: '#/definitions/ResultObjects'
"404":
description: No object matching filter
schema:
$ref: '#/definitions/ApiResponse'
/output/filter/positive:
/result/filter/positive:
get:
summary: Get positive decision objects
operationId: getallpositive
tags:
- output
- result
responses:
"200":
description: Array of decision objects
schema:
$ref: '#/definitions/OutputObjects'
$ref: '#/definitions/ResultObjects'
"404":
description: No object matching filter
schema:
$ref: '#/definitions/ApiResponse'
/output/after/{dateAfter}:
/result/after/{dateAfter}:
get:
summary: Get decision before a date
operationId: getallafter
tags:
- output
- result
parameters:
- name: dateAfter
in: path
@ -66,18 +82,18 @@ paths:
"200":
description: Array of decision objects
schema:
$ref: '#/definitions/OutputObjects'
$ref: '#/definitions/ResultObjects'
"404":
description: No object matching filter
schema:
$ref: '#/definitions/ApiResponse'
/output/before/{dateBefore}:
/result/before/{dateBefore}:
get:
summary: Get decision before a date
operationId: getallbefore
tags:
- output
- result
parameters:
- name: dateBefore
in: path
@ -89,18 +105,18 @@ paths:
"200":
description: Array of decision objects
schema:
$ref: '#/definitions/OutputObjects'
$ref: '#/definitions/ResultObjects'
"404":
description: NO objects matching filter
schema:
$ref: '#/definitions/ApiResponse'
/output/{tagID}:
/result/{tagID}:
get:
summary: Get decision by ID
operationId: getDecision
tags:
- output
- result
parameters:
- name: tagID
in: path
@ -112,27 +128,24 @@ paths:
"200":
description: Decision object
schema:
$ref: '#/definitions/OutputObject'
$ref: '#/definitions/ResultObject'
"404":
description: Tag not found
schema:
$ref: '#/definitions/ApiResponse'
definitions:
OutputObjects:
ResultObjects:
type: array
items:
$ref: '#/definitions/OutputObject'
OutputObject:
$ref: '#/definitions/ResultObject'
ResultObject:
type: "object"
properties:
tag:
type: "string"
decison:
type: "boolean"
date:
type: "string"
format: "date"
probability:
type: "number"
ApiResponse:
type: "object"
properties: