From e69851d4f83cb6bdb8668c286c41377dac06f66b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Wed, 8 Apr 2020 03:17:47 +0200 Subject: [PATCH] refactor api --- output-service-rdb.yml | 63 +++++++++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 25 deletions(-) diff --git a/output-service-rdb.yml b/output-service-rdb.yml index 0b633f0..57b6f2a 100644 --- a/output-service-rdb.yml +++ b/output-service-rdb.yml @@ -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: