From 476f584192a11bfe38957750b7b0f7a2707994b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 19 May 2022 15:52:49 +0200 Subject: [PATCH] OAPI: job settings, allow more granular control over setting visibility Instead of having a per-setting boolean to control whether it's visible or hidden, there are now four values: - `visible`: always show. - `submission`: only show in the UI of a job submitter (like a Blender add-on). - `web`: only show in the web interface for management, but not when submitting the job. - `hidden`: never show; only available to the job compiler script as internal setting. --- pkg/api/flamenco-openapi.yaml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/pkg/api/flamenco-openapi.yaml b/pkg/api/flamenco-openapi.yaml index ad2b695d..eb288de7 100644 --- a/pkg/api/flamenco-openapi.yaml +++ b/pkg/api/flamenco-openapi.yaml @@ -848,12 +848,7 @@ components: type: string description: Python expression to be evaluated in order to determine the default value for this setting. "visible": - type: boolean - description: > - Whether to show this setting in the UI of a job submitter (like a - Blender add-on). Set to `false` when it is an internal setting that - shouldn't be shown to end users. - default: true + $ref: "#/components/schemas/AvailableJobSettingVisibility" "required": type: boolean description: > @@ -883,6 +878,17 @@ components: `HASHED_FILE_PATH` is a directory path + `"/######"` appended. enum: ["file_path", "dir_path", "file_name", "hashed_file_path"] + AvailableJobSettingVisibility: + type: string + description: > + When to show this setting. + `visible`: always show. + `submission`: only show in the UI of a job submitter (like a Blender add-on). + `web`: only show in the web interface for management, but not when submitting the job. + `hidden`: never show; only available to the job compiler script as internal setting. + enum: [visible, hidden, submission, web] + default: visible + SubmittedJob: type: object description: Job definition submitted to Flamenco.