From 0e6b6a601326cf3205fa651b01d4c0c065b0b53d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 4 Apr 2023 13:18:24 +0200 Subject: [PATCH] API: allow worker cluster creation without explicit UUID Clusters can be created without UUID now. In that case, a random one will be generated. The cluster will be returned by the creation call, so that the caller can know that generated UUID. --- pkg/api/flamenco-openapi.yaml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkg/api/flamenco-openapi.yaml b/pkg/api/flamenco-openapi.yaml index 0cc9a62a..b09395fa 100644 --- a/pkg/api/flamenco-openapi.yaml +++ b/pkg/api/flamenco-openapi.yaml @@ -635,8 +635,11 @@ paths: schema: $ref: "#/components/schemas/WorkerCluster" responses: - "204": - description: The cluster was created. + "200": + description: The cluster was created. The created cluster is returned, so that the caller can know its UUID. + content: + application/json: + schema: { $ref: "#/components/schemas/WorkerCluster" } default: description: Error message content: @@ -2423,13 +2426,15 @@ components: "id": type: string format: uuid + description: > + UUID of the cluster. Can be ommitted when creating a new cluster, in + which case a random UUID will be assigned. "name": type: string "description": type: string - required: [id, name] + required: [name] example: - id: 4312d68c-ea6d-4566-9bf6-e9f09be48ceb name: GPU-EEVEE description: All workers that can do GPU rendering with EEVEE.