Clean up unecessary allOf
s (#1797)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
parent
1095179374
commit
26ce3929b4
20 changed files with 32 additions and 77 deletions
1
changelogs/internal/newsfragments/1797.clarification
Normal file
1
changelogs/internal/newsfragments/1797.clarification
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Clean up unnecessary `allOf`s in OpenAPI definitions.
|
|
@ -14,37 +14,22 @@
|
||||||
properties:
|
properties:
|
||||||
content:
|
content:
|
||||||
items:
|
items:
|
||||||
allOf:
|
$ref: push_rule.yaml
|
||||||
- $ref: push_rule.yaml
|
|
||||||
title: PushRule
|
|
||||||
type: object
|
|
||||||
type: array
|
type: array
|
||||||
override:
|
override:
|
||||||
items:
|
items:
|
||||||
allOf:
|
$ref: push_rule.yaml
|
||||||
- $ref: push_rule.yaml
|
|
||||||
title: PushRule
|
|
||||||
type: object
|
|
||||||
type: array
|
type: array
|
||||||
room:
|
room:
|
||||||
items:
|
items:
|
||||||
allOf:
|
$ref: push_rule.yaml
|
||||||
- $ref: push_rule.yaml
|
|
||||||
title: PushRule
|
|
||||||
type: object
|
|
||||||
type: array
|
type: array
|
||||||
sender:
|
sender:
|
||||||
items:
|
items:
|
||||||
allOf:
|
$ref: push_rule.yaml
|
||||||
- $ref: push_rule.yaml
|
|
||||||
title: PushRule
|
|
||||||
type: object
|
|
||||||
type: array
|
type: array
|
||||||
underride:
|
underride:
|
||||||
items:
|
items:
|
||||||
allOf:
|
$ref: push_rule.yaml
|
||||||
- $ref: push_rule.yaml
|
|
||||||
title: PushRule
|
|
||||||
type: object
|
|
||||||
type: array
|
type: array
|
||||||
type: object
|
type: object
|
||||||
|
|
|
@ -20,8 +20,7 @@ properties:
|
||||||
type: object
|
type: object
|
||||||
description: "A map of session IDs to key data."
|
description: "A map of session IDs to key data."
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
allOf:
|
$ref: "key_backup_data.yaml"
|
||||||
- $ref: "key_backup_data.yaml"
|
|
||||||
example: {
|
example: {
|
||||||
"sessionid1": {
|
"sessionid1": {
|
||||||
"first_message_index": 1,
|
"first_message_index": 1,
|
||||||
|
|
|
@ -36,9 +36,7 @@ paths:
|
||||||
type: array
|
type: array
|
||||||
description: A list of all registered devices for this user.
|
description: A list of all registered devices for this user.
|
||||||
items:
|
items:
|
||||||
type: object
|
$ref: definitions/client_device.yaml
|
||||||
allOf:
|
|
||||||
- $ref: definitions/client_device.yaml
|
|
||||||
examples:
|
examples:
|
||||||
response:
|
response:
|
||||||
value: {
|
value: {
|
||||||
|
@ -75,9 +73,7 @@ paths:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: definitions/client_device.yaml
|
||||||
allOf:
|
|
||||||
- $ref: definitions/client_device.yaml
|
|
||||||
examples:
|
examples:
|
||||||
response:
|
response:
|
||||||
value: {
|
value: {
|
||||||
|
|
|
@ -143,9 +143,7 @@ paths:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: definitions/sync_filter.yaml
|
||||||
allOf:
|
|
||||||
- $ref: definitions/sync_filter.yaml
|
|
||||||
examples:
|
examples:
|
||||||
response:
|
response:
|
||||||
value: {
|
value: {
|
||||||
|
|
|
@ -841,8 +841,7 @@ paths:
|
||||||
type: object
|
type: object
|
||||||
description: A map of room IDs to room key backup data.
|
description: A map of room IDs to room key backup data.
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
allOf:
|
$ref: definitions/room_key_backup.yaml
|
||||||
- $ref: definitions/room_key_backup.yaml
|
|
||||||
example:
|
example:
|
||||||
"!room:example.org":
|
"!room:example.org":
|
||||||
sessions:
|
sessions:
|
||||||
|
@ -946,8 +945,7 @@ paths:
|
||||||
type: object
|
type: object
|
||||||
description: A map of room IDs to room key backup data.
|
description: A map of room IDs to room key backup data.
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
allOf:
|
$ref: definitions/room_key_backup.yaml
|
||||||
- $ref: definitions/room_key_backup.yaml
|
|
||||||
example:
|
example:
|
||||||
"!room:example.org":
|
"!room:example.org":
|
||||||
sessions:
|
sessions:
|
||||||
|
|
|
@ -226,8 +226,7 @@ paths:
|
||||||
uploaded via `/keys/signatures/upload` that the requesting user
|
uploaded via `/keys/signatures/upload` that the requesting user
|
||||||
is allowed to see.
|
is allowed to see.
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
allOf:
|
$ref: definitions/cross_signing_key.yaml
|
||||||
- $ref: definitions/cross_signing_key.yaml
|
|
||||||
example:
|
example:
|
||||||
"@alice:example.com":
|
"@alice:example.com":
|
||||||
user_id: "@alice:example.com"
|
user_id: "@alice:example.com"
|
||||||
|
@ -244,8 +243,7 @@ paths:
|
||||||
information returned will be the same as uploaded via
|
information returned will be the same as uploaded via
|
||||||
`/keys/device_signing/upload`.
|
`/keys/device_signing/upload`.
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
allOf:
|
$ref: definitions/cross_signing_key.yaml
|
||||||
- $ref: definitions/cross_signing_key.yaml
|
|
||||||
example:
|
example:
|
||||||
"@alice:example.com":
|
"@alice:example.com":
|
||||||
user_id: "@alice:example.com"
|
user_id: "@alice:example.com"
|
||||||
|
@ -265,8 +263,7 @@ paths:
|
||||||
information returned will be the same as uploaded via
|
information returned will be the same as uploaded via
|
||||||
`/keys/device_signing/upload`.
|
`/keys/device_signing/upload`.
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
allOf:
|
$ref: definitions/cross_signing_key.yaml
|
||||||
- $ref: definitions/cross_signing_key.yaml
|
|
||||||
example:
|
example:
|
||||||
"@alice:example.com":
|
"@alice:example.com":
|
||||||
user_id: "@alice:example.com"
|
user_id: "@alice:example.com"
|
||||||
|
|
|
@ -470,9 +470,7 @@ paths:
|
||||||
rule to be applied to an event. A rule with no conditions
|
rule to be applied to an event. A rule with no conditions
|
||||||
always matches. Only applicable to `underride` and `override` rules.
|
always matches. Only applicable to `underride` and `override` rules.
|
||||||
items:
|
items:
|
||||||
type: object
|
$ref: definitions/push_condition.yaml
|
||||||
allOf:
|
|
||||||
- $ref: definitions/push_condition.yaml
|
|
||||||
pattern:
|
pattern:
|
||||||
type: string
|
type: string
|
||||||
description: Only applicable to `content` rules. The glob-style pattern to match
|
description: Only applicable to `content` rules. The glob-style pattern to match
|
||||||
|
|
|
@ -171,8 +171,7 @@ paths:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
$ref: ../client-server/definitions/errors/error.yaml
|
||||||
- $ref: ../client-server/definitions/errors/error.yaml
|
|
||||||
examples:
|
examples:
|
||||||
response:
|
response:
|
||||||
value: {
|
value: {
|
||||||
|
@ -186,8 +185,7 @@ paths:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
$ref: ../client-server/definitions/errors/error.yaml
|
||||||
- $ref: ../client-server/definitions/errors/error.yaml
|
|
||||||
examples:
|
examples:
|
||||||
response:
|
response:
|
||||||
value: {
|
value: {
|
||||||
|
@ -318,8 +316,7 @@ paths:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
$ref: ../client-server/definitions/errors/error.yaml
|
||||||
- $ref: ../client-server/definitions/errors/error.yaml
|
|
||||||
examples:
|
examples:
|
||||||
response:
|
response:
|
||||||
value: {
|
value: {
|
||||||
|
@ -333,8 +330,7 @@ paths:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
$ref: ../client-server/definitions/errors/error.yaml
|
||||||
- $ref: ../client-server/definitions/errors/error.yaml
|
|
||||||
examples:
|
examples:
|
||||||
response:
|
response:
|
||||||
value: {
|
value: {
|
||||||
|
|
|
@ -178,8 +178,7 @@ paths:
|
||||||
uploaded via `/keys/signatures/upload` that the user is
|
uploaded via `/keys/signatures/upload` that the user is
|
||||||
allowed to see.
|
allowed to see.
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
allOf:
|
$ref: ../client-server/definitions/cross_signing_key.yaml
|
||||||
- $ref: ../client-server/definitions/cross_signing_key.yaml
|
|
||||||
example:
|
example:
|
||||||
"@alice:example.com":
|
"@alice:example.com":
|
||||||
user_id: "@alice:example.com"
|
user_id: "@alice:example.com"
|
||||||
|
@ -196,8 +195,7 @@ paths:
|
||||||
information returned will be the same as uploaded via
|
information returned will be the same as uploaded via
|
||||||
`/keys/device_signing/upload`.
|
`/keys/device_signing/upload`.
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
allOf:
|
$ref: ../client-server/definitions/cross_signing_key.yaml
|
||||||
- $ref: ../client-server/definitions/cross_signing_key.yaml
|
|
||||||
example:
|
example:
|
||||||
"@alice:example.com":
|
"@alice:example.com":
|
||||||
user_id: "@alice:example.com"
|
user_id: "@alice:example.com"
|
||||||
|
|
|
@ -18,9 +18,7 @@ allOf:
|
||||||
- "$ref": core-event-schema/room_event.yaml
|
- "$ref": core-event-schema/room_event.yaml
|
||||||
properties:
|
properties:
|
||||||
content:
|
content:
|
||||||
type: object
|
"$ref": core-event-schema/call_event.yaml
|
||||||
allOf:
|
|
||||||
- "$ref": core-event-schema/call_event.yaml
|
|
||||||
type:
|
type:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
|
|
|
@ -44,8 +44,7 @@ properties:
|
||||||
ephemeral public key (encoded as unpadded base64) and the canonical JSON
|
ephemeral public key (encoded as unpadded base64) and the canonical JSON
|
||||||
representation of the `m.key.verification.start` message.
|
representation of the `m.key.verification.start` message.
|
||||||
m.relates_to:
|
m.relates_to:
|
||||||
allOf:
|
$ref: m.key.verification.m.relates_to.yaml
|
||||||
- $ref: m.key.verification.m.relates_to.yaml
|
|
||||||
required:
|
required:
|
||||||
- method
|
- method
|
||||||
- key_agreement_protocol
|
- key_agreement_protocol
|
||||||
|
|
|
@ -58,8 +58,7 @@ properties:
|
||||||
respond again with `m.unexpected_message` to avoid the other device potentially
|
respond again with `m.unexpected_message` to avoid the other device potentially
|
||||||
sending another error response.
|
sending another error response.
|
||||||
m.relates_to:
|
m.relates_to:
|
||||||
allOf:
|
$ref: m.key.verification.m.relates_to.yaml
|
||||||
- $ref: m.key.verification.m.relates_to.yaml
|
|
||||||
required:
|
required:
|
||||||
- code
|
- code
|
||||||
- reason
|
- reason
|
||||||
|
|
|
@ -13,8 +13,7 @@ properties:
|
||||||
Required when sent as a to-device message. The opaque identifier for
|
Required when sent as a to-device message. The opaque identifier for
|
||||||
the verification process/request.
|
the verification process/request.
|
||||||
m.relates_to:
|
m.relates_to:
|
||||||
allOf:
|
$ref: m.key.verification.m.relates_to.yaml
|
||||||
- $ref: m.key.verification.m.relates_to.yaml
|
|
||||||
type: object
|
type: object
|
||||||
type:
|
type:
|
||||||
enum:
|
enum:
|
||||||
|
|
|
@ -18,8 +18,7 @@ properties:
|
||||||
description: |-
|
description: |-
|
||||||
The device's ephemeral public key, encoded as unpadded base64.
|
The device's ephemeral public key, encoded as unpadded base64.
|
||||||
m.relates_to:
|
m.relates_to:
|
||||||
allOf:
|
$ref: m.key.verification.m.relates_to.yaml
|
||||||
- $ref: m.key.verification.m.relates_to.yaml
|
|
||||||
required:
|
required:
|
||||||
- key
|
- key
|
||||||
type: object
|
type: object
|
||||||
|
|
|
@ -29,8 +29,7 @@ properties:
|
||||||
The MAC of the comma-separated, sorted, list of key IDs given in the `mac`
|
The MAC of the comma-separated, sorted, list of key IDs given in the `mac`
|
||||||
property, encoded as unpadded base64.
|
property, encoded as unpadded base64.
|
||||||
m.relates_to:
|
m.relates_to:
|
||||||
allOf:
|
$ref: m.key.verification.m.relates_to.yaml
|
||||||
- $ref: m.key.verification.m.relates_to.yaml
|
|
||||||
required:
|
required:
|
||||||
- mac
|
- mac
|
||||||
- keys
|
- keys
|
||||||
|
|
|
@ -27,8 +27,7 @@ properties:
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
m.relates_to:
|
m.relates_to:
|
||||||
allOf:
|
$ref: m.key.verification.m.relates_to.yaml
|
||||||
- $ref: m.key.verification.m.relates_to.yaml
|
|
||||||
required:
|
required:
|
||||||
- from_device
|
- from_device
|
||||||
- methods
|
- methods
|
||||||
|
|
|
@ -30,8 +30,7 @@ properties:
|
||||||
description: |-
|
description: |-
|
||||||
The shared secret from the QR code, encoded using unpadded base64.
|
The shared secret from the QR code, encoded using unpadded base64.
|
||||||
m.relates_to:
|
m.relates_to:
|
||||||
allOf:
|
$ref: m.key.verification.m.relates_to.yaml
|
||||||
- $ref: m.key.verification.m.relates_to.yaml
|
|
||||||
required:
|
required:
|
||||||
- from_device
|
- from_device
|
||||||
- method
|
- method
|
||||||
|
|
|
@ -58,8 +58,7 @@ properties:
|
||||||
type: string
|
type: string
|
||||||
enum: ["decimal", "emoji"]
|
enum: ["decimal", "emoji"]
|
||||||
m.relates_to:
|
m.relates_to:
|
||||||
allOf:
|
$ref: m.key.verification.m.relates_to.yaml
|
||||||
- $ref: m.key.verification.m.relates_to.yaml
|
|
||||||
required:
|
required:
|
||||||
- from_device
|
- from_device
|
||||||
- method
|
- method
|
||||||
|
|
|
@ -32,8 +32,7 @@ properties:
|
||||||
when the `method` chosen only verifies one user's key. This field will
|
when the `method` chosen only verifies one user's key. This field will
|
||||||
never be present if the `method` verifies keys both ways.
|
never be present if the `method` verifies keys both ways.
|
||||||
m.relates_to:
|
m.relates_to:
|
||||||
allOf:
|
$ref: m.key.verification.m.relates_to.yaml
|
||||||
- $ref: m.key.verification.m.relates_to.yaml
|
|
||||||
required:
|
required:
|
||||||
- from_device
|
- from_device
|
||||||
- method
|
- method
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue