From 730fc1213d92a3d1107e10e4620ac6274eb779f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Sat, 5 Dec 2020 17:42:40 +0100 Subject: [PATCH] add auth and coord update endpoint --- backend.yml | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 79 insertions(+), 2 deletions(-) diff --git a/backend.yml b/backend.yml index 2d5587a..9007747 100644 --- a/backend.yml +++ b/backend.yml @@ -18,6 +18,8 @@ paths: get: tags: - backend + security: + - bearerAuth: [] summary: Get all users operationId: getall responses: @@ -40,6 +42,8 @@ paths: - backend summary: Get a user with a name operationId: getauser + security: + - bearerAuth: [] parameters: - name: username in: path @@ -65,6 +69,8 @@ paths: - backend summary: Delete a user operationId: deleteuser + security: + - bearerAuth: [] parameters: - name: username in: path @@ -90,6 +96,8 @@ paths: - backend summary: Modifies a user operationId: modifyUser + security: + - bearerAuth: [] parameters: - name: username in: path @@ -192,6 +200,8 @@ paths: post: tags: - backend + security: + - bearerAuth: [] summary: Creates an ingest resource operationId: createIngest requestBody: @@ -212,6 +222,8 @@ paths: post: tags: - backend + security: + - bearerAuth: [] summary: Creates a restream resource operationId: createRestream requestBody: @@ -232,6 +244,8 @@ paths: post: tags: - backend + security: + - bearerAuth: [] summary: Creates a encode resource operationId: createEncode requestBody: @@ -252,6 +266,8 @@ paths: get: tags: - backend + security: + - bearerAuth: [] summary: Gets all streamer resources operationId: getResource responses: @@ -267,6 +283,8 @@ paths: delete: tags: - backend + security: + - bearerAuth: [] summary: Deletes a streamer resource operationId: deleteResource parameters: @@ -293,6 +311,8 @@ paths: get: tags: - backend + security: + - bearerAuth: [] summary: Gets a streamer resource operationId: getAResource parameters: @@ -320,6 +340,8 @@ paths: put: tags: - backend + security: + - bearerAuth: [] summary: Modifies an ingest resource operationId: editIngest requestBody: @@ -354,6 +376,8 @@ paths: put: tags: - backend + security: + - bearerAuth: [] summary: Modifies a restream resource operationId: editRestream requestBody: @@ -388,6 +412,8 @@ paths: put: tags: - backend + security: + - bearerAuth: [] summary: Modifies an encode resource operationId: editEncode requestBody: @@ -410,7 +436,43 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/EncodeObjectParameters' + $ref: '#/components/schemas/StreamerObjectData' + 404: + description: ID not found + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + + /api/objects/streamerobjects/coordmodify/{id}: + put: + tags: + - backend + security: + - bearerAuth: [] + summary: Modifies a resource coords + operationId: editCoords + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CoordParameters' + 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/StreamerObjectData' 404: description: ID not found content: @@ -580,4 +642,19 @@ components: status: type: string message: - type: string \ No newline at end of file + type: string + CoordParameters: + required: + - x + - y + type: object + properties: + x: + type: integer + y: + type: integer + securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT \ No newline at end of file