From 4994e16a711715bdfce5c0e18df76f4e04076605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Tue, 24 Nov 2020 18:53:25 +0100 Subject: [PATCH] handle types separately --- backend.yml | 98 ++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 71 insertions(+), 27 deletions(-) diff --git a/backend.yml b/backend.yml index 9ecf6ff..77a3239 100644 --- a/backend.yml +++ b/backend.yml @@ -316,16 +316,17 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiResponse' + /api/objects/streamerobjects/ingress/{id}: put: tags: - backend - summary: Modifies a streamer resource - operationId: editAResource + summary: Modifies an ingest resource + operationId: editIngress requestBody: content: application/json: schema: - $ref: '#/components/schemas/StreamerObjectEditable' + $ref: '#/components/schemas/IngestObjectNeighbors' required: true parameters: - name: id @@ -349,33 +350,76 @@ paths: schema: $ref: '#/components/schemas/ApiResponse' -components: - schemas: - StreamerObjectEditable: - required: - - id - type: object - properties: - id: + /api/objects/streamerobjects/restream/{id}: + put: + tags: + - backend + summary: Modifies a restream resource + operationId: editRestream + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RestreamObjectParameters' + required: true + parameters: + - name: id + in: path + description: ID of a resource + required: true + schema: type: string format: uuid - inputNeighbours: - type: array - items: - type: string - format: uuid - outputNeighbours: - type: array - items: - type: string - format: uuid - outputURLs: - type: array - items: - type: string - format: url - ffmpeg_args: + responses: + 200: + description: Streamer resource data + content: + application/json: + schema: + $ref: '#/components/schemas/StreamerObjectData' + 404: + description: ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + + /api/objects/streamerobjects/encode/{id}: + put: + tags: + - backend + summary: Modifies an encode resource + operationId: editEncode + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RestreamObjectParameters' + required: true + parameters: + - name: id + in: path + description: ID of a resource + required: true + schema: type: string + format: uuid + responses: + 200: + description: Streamer resource data + content: + application/json: + schema: + $ref: '#/components/schemas/EncodeObjectParameters' + 404: + description: ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + +components: + schemas: StreamerObjectData: required: - type