From 0b126ca5466fb30875bb4a59dc80a912667a937f Mon Sep 17 00:00:00 2001 From: Samuel Oechsler Date: Wed, 30 Oct 2024 20:33:26 +0100 Subject: [PATCH] Add oidc-config to OpenAPI schema --- .../schema/paths/settings/settingID/put.json | 73 +++++++++++++++---- 1 file changed, 57 insertions(+), 16 deletions(-) diff --git a/backend/schema/paths/settings/settingID/put.json b/backend/schema/paths/settings/settingID/put.json index 4ca62429..d205158f 100644 --- a/backend/schema/paths/settings/settingID/put.json +++ b/backend/schema/paths/settings/settingID/put.json @@ -14,7 +14,7 @@ "schema": { "type": "string", "minLength": 1, - "enum": ["default-site"] + "enum": ["default-site", "oidc-config"] }, "required": true, "description": "Setting ID", @@ -27,28 +27,69 @@ "content": { "application/json": { "schema": { - "type": "object", - "additionalProperties": false, - "minProperties": 1, - "properties": { - "value": { - "type": "string", - "minLength": 1, - "enum": ["congratulations", "404", "444", "redirect", "html"] - }, - "meta": { + "oneOf": [ + { "type": "object", "additionalProperties": false, + "minProperties": 1, "properties": { - "redirect": { - "type": "string" + "value": { + "type": "string", + "minLength": 1, + "enum": [ + "congratulations", + "404", + "444", + "redirect", + "html" + ] }, - "html": { - "type": "string" + "meta": { + "type": "object", + "additionalProperties": false, + "properties": { + "redirect": { + "type": "string" + }, + "html": { + "type": "string" + } + } + } + } + }, + { + "type": "object", + "additionalProperties": false, + "minProperties": 1, + "properties": { + "meta": { + "type": "object", + "additionalProperties": false, + "properties": { + "clientID": { + "type": "string" + }, + "clientSecret": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "issuerURL": { + "type": "string" + }, + "name": { + "type": "string" + }, + "redirectURL": { + "type": "string" + } + } } } } - } + ] } } }