From 30845e189fef3e53e807bf78598e01f4cbe90880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= <76261501+zecakeh@users.noreply.github.com> Date: Fri, 23 Jun 2023 15:31:17 +0200 Subject: [PATCH] Remove unnecessary `oneOf`s in JSON schemas (#1585) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove unnecessary `oneOf`s in JSON schemas Signed-off-by: Kévin Commaille * Add changelog Signed-off-by: Kévin Commaille --------- Signed-off-by: Kévin Commaille --- .../client_server/newsfragments/1585.clarification | 1 + data/api/client-server/definitions/push_rule.yaml | 4 +--- data/api/client-server/notifications.yaml | 4 +--- data/api/client-server/pushrules.yaml | 12 +++--------- 4 files changed, 6 insertions(+), 15 deletions(-) create mode 100644 changelogs/client_server/newsfragments/1585.clarification diff --git a/changelogs/client_server/newsfragments/1585.clarification b/changelogs/client_server/newsfragments/1585.clarification new file mode 100644 index 00000000..5b26ae97 --- /dev/null +++ b/changelogs/client_server/newsfragments/1585.clarification @@ -0,0 +1 @@ +Remove unnecessary `oneOf`s in JSON schemas. diff --git a/data/api/client-server/definitions/push_rule.yaml b/data/api/client-server/definitions/push_rule.yaml index 4f1b41ad..a6534895 100644 --- a/data/api/client-server/definitions/push_rule.yaml +++ b/data/api/client-server/definitions/push_rule.yaml @@ -17,9 +17,7 @@ type: object properties: actions: items: - oneOf: - - type: object - - type: string + type: ["string", "object"] type: array description: |- The actions to perform when this rule is matched. diff --git a/data/api/client-server/notifications.yaml b/data/api/client-server/notifications.yaml index 1cde576b..21d6640a 100644 --- a/data/api/client-server/notifications.yaml +++ b/data/api/client-server/notifications.yaml @@ -86,9 +86,7 @@ paths: The action(s) to perform when the conditions for this rule are met. See [Push Rules: API](/client-server-api/#push-rules-api). items: - oneOf: - - type: object - - type: string + type: ["object", "string"] event: title: Event description: The Event object for the event that triggered the notification. diff --git a/data/api/client-server/pushrules.yaml b/data/api/client-server/pushrules.yaml index 77a07afd..88013307 100644 --- a/data/api/client-server/pushrules.yaml +++ b/data/api/client-server/pushrules.yaml @@ -458,9 +458,7 @@ paths: type: array description: The action(s) to perform when the conditions for this rule are met. items: - oneOf: - - type: string - - type: object + type: ["string", "object"] conditions: type: array description: |- @@ -723,9 +721,7 @@ paths: type: array description: The action(s) to perform for this rule. items: - oneOf: - - type: string - - type: object + type: ["string", "object"] required: - actions examples: @@ -801,9 +797,7 @@ paths: type: array description: The action(s) to perform for this rule. items: - oneOf: - - type: string - - type: object + type: ["string", "object"] required: - actions example: {