mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-23 19:44:09 +01:00
Use a single definition for Event Hash
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
parent
5a83ac78f2
commit
b234530753
13
data/api/server-server/definitions/event_hash.yaml
Normal file
13
data/api/server-server/definitions/event_hash.yaml
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
type: object
|
||||||
|
title: Event Hash
|
||||||
|
description: |-
|
||||||
|
Content hashes of the PDU, following the algorithm specified in [Signing Events](/server-server-api/#signing-events).
|
||||||
|
example: {
|
||||||
|
"sha256": "ThisHashCoversAllFieldsInCaseThisIsRedacted"
|
||||||
|
}
|
||||||
|
properties:
|
||||||
|
sha256:
|
||||||
|
type: string
|
||||||
|
description: The hash.
|
||||||
|
example: ThisHashCoversAllFieldsInCaseThisIsRedacted
|
||||||
|
required: ['sha256']
|
||||||
|
|
@ -25,19 +25,7 @@ allOf:
|
||||||
description: For redaction events, the ID of the event being redacted.
|
description: For redaction events, the ID of the event being redacted.
|
||||||
example: "$def456:matrix.org"
|
example: "$def456:matrix.org"
|
||||||
hashes:
|
hashes:
|
||||||
type: object
|
$ref: "event_hash.yaml"
|
||||||
title: Event Hash
|
|
||||||
description: |-
|
|
||||||
Content hashes of the PDU, following the algorithm specified in [Signing Events](/server-server-api/#signing-events).
|
|
||||||
example: {
|
|
||||||
"sha256": "ThisHashCoversAllFieldsInCaseThisIsRedacted"
|
|
||||||
}
|
|
||||||
properties:
|
|
||||||
sha256:
|
|
||||||
type: string
|
|
||||||
description: The hash.
|
|
||||||
example: ThisHashCoversAllFieldsInCaseThisIsRedacted
|
|
||||||
required: ['sha256']
|
|
||||||
signatures:
|
signatures:
|
||||||
type: object
|
type: object
|
||||||
description: |-
|
description: |-
|
||||||
|
|
|
||||||
|
|
@ -47,19 +47,7 @@ allOf:
|
||||||
Must contain less than or equal to 20 events.
|
Must contain less than or equal to 20 events.
|
||||||
example: ["$URLsafe-base64EncodedHash", "$Another_Event"]
|
example: ["$URLsafe-base64EncodedHash", "$Another_Event"]
|
||||||
hashes:
|
hashes:
|
||||||
type: object
|
$ref: "event_hash.yaml"
|
||||||
title: Event Hash
|
|
||||||
description: |-
|
|
||||||
Content hashes of the PDU, following the algorithm specified in [Signing Events](/server-server-api/#signing-events).
|
|
||||||
example: {
|
|
||||||
"sha256": "ThisHashCoversAllFieldsInCaseThisIsRedacted"
|
|
||||||
}
|
|
||||||
properties:
|
|
||||||
sha256:
|
|
||||||
type: string
|
|
||||||
description: The hash.
|
|
||||||
example: ThisHashCoversAllFieldsInCaseThisIsRedacted
|
|
||||||
required: ['sha256']
|
|
||||||
signatures:
|
signatures:
|
||||||
type: object
|
type: object
|
||||||
description: |-
|
description: |-
|
||||||
|
|
|
||||||
|
|
@ -49,19 +49,7 @@ allOf:
|
||||||
Must contain less than or equal to 20 events.
|
Must contain less than or equal to 20 events.
|
||||||
example: ["$base64EncodedHash", "$AnotherEvent"]
|
example: ["$base64EncodedHash", "$AnotherEvent"]
|
||||||
hashes:
|
hashes:
|
||||||
type: object
|
$ref: "event_hash.yaml"
|
||||||
title: Event Hash
|
|
||||||
description: |-
|
|
||||||
Content hashes of the PDU, following the algorithm specified in [Signing Events](/server-server-api/#signing-events).
|
|
||||||
example: {
|
|
||||||
"sha256": "ThisHashCoversAllFieldsInCaseThisIsRedacted"
|
|
||||||
}
|
|
||||||
properties:
|
|
||||||
sha256:
|
|
||||||
type: string
|
|
||||||
description: The hash.
|
|
||||||
example: ThisHashCoversAllFieldsInCaseThisIsRedacted
|
|
||||||
required: ['sha256']
|
|
||||||
signatures:
|
signatures:
|
||||||
type: object
|
type: object
|
||||||
description: |-
|
description: |-
|
||||||
|
|
|
||||||
|
|
@ -60,17 +60,7 @@ properties:
|
||||||
- type: string
|
- type: string
|
||||||
title: Event ID
|
title: Event ID
|
||||||
example: "$abc123:matrix.org"
|
example: "$abc123:matrix.org"
|
||||||
- type: object
|
- $ref: "event_hash.yaml"
|
||||||
title: Event Hash
|
|
||||||
example: {
|
|
||||||
"sha256": "Base64EncodedSha256HashesShouldBe43BytesLong"
|
|
||||||
}
|
|
||||||
properties:
|
|
||||||
sha256:
|
|
||||||
type: string
|
|
||||||
description: The event hash.
|
|
||||||
example: Base64EncodedSha256HashesShouldBe43BytesLong
|
|
||||||
required: ['sha256']
|
|
||||||
depth:
|
depth:
|
||||||
type: integer
|
type: integer
|
||||||
description: |-
|
description: |-
|
||||||
|
|
@ -96,17 +86,7 @@ properties:
|
||||||
- type: string
|
- type: string
|
||||||
title: Event ID
|
title: Event ID
|
||||||
example: "$abc123:matrix.org"
|
example: "$abc123:matrix.org"
|
||||||
- type: object
|
- $ref: "event_hash.yaml"
|
||||||
title: Event Hash
|
|
||||||
example: {
|
|
||||||
"sha256": "Base64EncodedSha256HashesShouldBe43BytesLong"
|
|
||||||
}
|
|
||||||
properties:
|
|
||||||
sha256:
|
|
||||||
type: string
|
|
||||||
description: The event hash.
|
|
||||||
example: Base64EncodedSha256HashesShouldBe43BytesLong
|
|
||||||
required: ['sha256']
|
|
||||||
unsigned:
|
unsigned:
|
||||||
type: object
|
type: object
|
||||||
title: UnsignedData
|
title: UnsignedData
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue