input service newest api

This commit is contained in:
Torma Kristóf 2020-04-06 19:06:04 +02:00
parent 2e9b4fe875
commit 7e73eb0832
1 changed files with 88 additions and 5 deletions

View File

@ -1,7 +1,7 @@
swagger: "2.0"
info:
description: "This s the input interface of the Birbnetes system."
version: "1.0.10"
description: "This is the input interface of the Birbnetes system."
version: "1.1.0"
title: "Input Service"
contact:
email: "tormakristof@tormakristof.eu"
@ -18,6 +18,21 @@ schemes:
- "http"
paths:
/sample:
get:
summary: Get all stored input queries
operationId: getall
tags:
- input
responses:
"200":
description: Array of decision objects
schema:
$ref: '#/definitions/InputResponse'
"404":
description: No object matching filter
schema:
$ref: '#/definitions/ApiResponse'
post:
tags:
- "input"
@ -51,7 +66,7 @@ paths:
description: "successful operation"
schema:
$ref: "#/definitions/ApiResponse"
416:
415:
description: "Media type error"
schema:
$ref: "#/definitions/ApiResponse"
@ -59,16 +74,84 @@ paths:
description: "JSON parse error"
schema:
$ref: "#/definitions/ApiResponse"
444:
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"
/output/{tagID}:
get:
summary: Get decision by ID
operationId: getInput
tags:
- input
parameters:
- name: tagID
in: path
description: ID of input object file
required: true
type: string
format: uuid
responses:
"200":
description: Decision object
schema:
$ref: '#/definitions/InputSingeResponse'
"404":
description: Tag not found
schema:
$ref: '#/definitions/ApiResponse'
definitions:
InputSingeResponse:
type: "object"
properties:
status:
type: "string"
message:
$ref: '#/definitions/InputObject'
required:
- status
- message
InputResponse:
type: "array"
items:
$ref: "#/definitions/InputObject"
InputObject:
type: "object"
properties:
tag:
type: "string"
format: "uuid"
date:
type: "string"
format: "date"
device_id:
type: "integer"
required:
- tag
- date
- device_id
ApiResponse:
type: "object"
properties:
status:
type: "string"
message:
type: "string"
type: "string"
required:
- status
- message