Clean up unecessary allOfs (#1797)

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
Kévin Commaille 2024-04-23 18:07:24 +02:00 committed by GitHub
parent 1095179374
commit 26ce3929b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 32 additions and 77 deletions

View file

@ -14,37 +14,22 @@
properties:
content:
items:
allOf:
- $ref: push_rule.yaml
title: PushRule
type: object
$ref: push_rule.yaml
type: array
override:
items:
allOf:
- $ref: push_rule.yaml
title: PushRule
type: object
$ref: push_rule.yaml
type: array
room:
items:
allOf:
- $ref: push_rule.yaml
title: PushRule
type: object
$ref: push_rule.yaml
type: array
sender:
items:
allOf:
- $ref: push_rule.yaml
title: PushRule
type: object
$ref: push_rule.yaml
type: array
underride:
items:
allOf:
- $ref: push_rule.yaml
title: PushRule
type: object
$ref: push_rule.yaml
type: array
type: object

View file

@ -20,8 +20,7 @@ properties:
type: object
description: "A map of session IDs to key data."
additionalProperties:
allOf:
- $ref: "key_backup_data.yaml"
$ref: "key_backup_data.yaml"
example: {
"sessionid1": {
"first_message_index": 1,

View file

@ -36,9 +36,7 @@ paths:
type: array
description: A list of all registered devices for this user.
items:
type: object
allOf:
- $ref: definitions/client_device.yaml
$ref: definitions/client_device.yaml
examples:
response:
value: {
@ -75,9 +73,7 @@ paths:
content:
application/json:
schema:
type: object
allOf:
- $ref: definitions/client_device.yaml
$ref: definitions/client_device.yaml
examples:
response:
value: {

View file

@ -143,9 +143,7 @@ paths:
content:
application/json:
schema:
type: object
allOf:
- $ref: definitions/sync_filter.yaml
$ref: definitions/sync_filter.yaml
examples:
response:
value: {

View file

@ -841,8 +841,7 @@ paths:
type: object
description: A map of room IDs to room key backup data.
additionalProperties:
allOf:
- $ref: definitions/room_key_backup.yaml
$ref: definitions/room_key_backup.yaml
example:
"!room:example.org":
sessions:
@ -946,8 +945,7 @@ paths:
type: object
description: A map of room IDs to room key backup data.
additionalProperties:
allOf:
- $ref: definitions/room_key_backup.yaml
$ref: definitions/room_key_backup.yaml
example:
"!room:example.org":
sessions:

View file

@ -226,8 +226,7 @@ paths:
uploaded via `/keys/signatures/upload` that the requesting user
is allowed to see.
additionalProperties:
allOf:
- $ref: definitions/cross_signing_key.yaml
$ref: definitions/cross_signing_key.yaml
example:
"@alice:example.com":
user_id: "@alice:example.com"
@ -244,8 +243,7 @@ paths:
information returned will be the same as uploaded via
`/keys/device_signing/upload`.
additionalProperties:
allOf:
- $ref: definitions/cross_signing_key.yaml
$ref: definitions/cross_signing_key.yaml
example:
"@alice:example.com":
user_id: "@alice:example.com"
@ -265,8 +263,7 @@ paths:
information returned will be the same as uploaded via
`/keys/device_signing/upload`.
additionalProperties:
allOf:
- $ref: definitions/cross_signing_key.yaml
$ref: definitions/cross_signing_key.yaml
example:
"@alice:example.com":
user_id: "@alice:example.com"

View file

@ -470,9 +470,7 @@ paths:
rule to be applied to an event. A rule with no conditions
always matches. Only applicable to `underride` and `override` rules.
items:
type: object
allOf:
- $ref: definitions/push_condition.yaml
$ref: definitions/push_condition.yaml
pattern:
type: string
description: Only applicable to `content` rules. The glob-style pattern to match

View file

@ -171,8 +171,7 @@ paths:
content:
application/json:
schema:
allOf:
- $ref: ../client-server/definitions/errors/error.yaml
$ref: ../client-server/definitions/errors/error.yaml
examples:
response:
value: {
@ -186,8 +185,7 @@ paths:
content:
application/json:
schema:
allOf:
- $ref: ../client-server/definitions/errors/error.yaml
$ref: ../client-server/definitions/errors/error.yaml
examples:
response:
value: {
@ -318,8 +316,7 @@ paths:
content:
application/json:
schema:
allOf:
- $ref: ../client-server/definitions/errors/error.yaml
$ref: ../client-server/definitions/errors/error.yaml
examples:
response:
value: {
@ -333,8 +330,7 @@ paths:
content:
application/json:
schema:
allOf:
- $ref: ../client-server/definitions/errors/error.yaml
$ref: ../client-server/definitions/errors/error.yaml
examples:
response:
value: {

View file

@ -178,8 +178,7 @@ paths:
uploaded via `/keys/signatures/upload` that the user is
allowed to see.
additionalProperties:
allOf:
- $ref: ../client-server/definitions/cross_signing_key.yaml
$ref: ../client-server/definitions/cross_signing_key.yaml
example:
"@alice:example.com":
user_id: "@alice:example.com"
@ -196,8 +195,7 @@ paths:
information returned will be the same as uploaded via
`/keys/device_signing/upload`.
additionalProperties:
allOf:
- $ref: ../client-server/definitions/cross_signing_key.yaml
$ref: ../client-server/definitions/cross_signing_key.yaml
example:
"@alice:example.com":
user_id: "@alice:example.com"