From e104a66b16f1244c298c14e537147200c923859c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Sat, 28 Mar 2020 00:30:33 +0100 Subject: [PATCH] redo --- extractor.yaml | 88 ++++++++++++++++++++++++++++---------------------- 1 file changed, 50 insertions(+), 38 deletions(-) diff --git a/extractor.yaml b/extractor.yaml index 5fcf3dc..55d107c 100644 --- a/extractor.yaml +++ b/extractor.yaml @@ -1,43 +1,55 @@ -openapi: 3.0.0 +swagger: "2.0" info: - title: Sound feature extraction - version: 1.0.1 -servers: - - url: https://dev.k8s.tcloud.enginner/api/extractor/v1 + description: "This is the feature extraction interface of the Birbnetes system." + version: "1.0.5" + title: "Extractor Service" + contact: + 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/extractor/v1" +tags: +- name: "extractor" + description: "Extractor Service interaction" +schemes: +- "https" +- "http" paths: - /sample: + /audo: post: - summary: Upload sound file for feature extraction - requestBody: - content: - multipart/form-data: - schema: - type: object - properties: - id: - type: object - properties: - tag: - type: string - soundFile: - type: string - format: binary + tags: + - "extractor" + summary: "uploads a sample into the system" + description: "" + operationId: "uploadFile" + consumes: + - "multipart/form-data" + produces: + - "application/json" + parameters: + - name: "tag" + in: "formData" + description: "Tag of sound file" + required: true + type: "string" + - name: "file" + in: "formData" + description: "Wave file to upload" + required: true + type: "file" responses: - '200': - description: Status message - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/Response' + 200: + description: "successful operation" + schema: + $ref: "#/definitions/ApiResponse" -components: - schemas: - Response: - properties: - status: - type: string - description: "Status message from backend." - required: - - status \ No newline at end of file +definitions: + ApiResponse: + type: "object" + properties: + status: + type: "string" + message: + type: "string" \ No newline at end of file