From 6792b7a9d6b205751b91e76e6c73f9e7bbcf21cb Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Wed, 15 Jun 2022 08:32:55 +0200 Subject: [PATCH] Use type: integer, format: int64 for timestamps (#1129) * Use type: integer / format: int64 for timestamps Closes #749. * Changelog --- changelogs/client_server/newsfragments/1129.clarification | 1 + data/api/client-server/notifications.yaml | 1 + data/api/client-server/space_hierarchy.yaml | 2 +- data/api/identity/v2_associations.yaml | 4 ++++ data/api/push-gateway/push_notifier.yaml | 1 + data/api/server-server/space_hierarchy.yaml | 2 +- data/event-schemas/schema/m.receipt.yaml | 3 ++- 7 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 changelogs/client_server/newsfragments/1129.clarification diff --git a/changelogs/client_server/newsfragments/1129.clarification b/changelogs/client_server/newsfragments/1129.clarification new file mode 100644 index 00000000..3ccb2333 --- /dev/null +++ b/changelogs/client_server/newsfragments/1129.clarification @@ -0,0 +1 @@ +Fix various typos throughout the specification. diff --git a/data/api/client-server/notifications.yaml b/data/api/client-server/notifications.yaml index 6d141ff8..809b2c0d 100644 --- a/data/api/client-server/notifications.yaml +++ b/data/api/client-server/notifications.yaml @@ -126,6 +126,7 @@ paths: description: The ID of the room in which the event was posted. ts: type: integer + format: int64 description: |- The unix timestamp at which the event notification was sent, in milliseconds. diff --git a/data/api/client-server/space_hierarchy.yaml b/data/api/client-server/space_hierarchy.yaml index 3c1ab388..91bf67c9 100644 --- a/data/api/client-server/space_hierarchy.yaml +++ b/data/api/client-server/space_hierarchy.yaml @@ -147,7 +147,7 @@ paths: title: StrippedChildStateEvent properties: origin_server_ts: - type: number + type: integer format: int64 description: The `origin_server_ts` for the event. required: [origin_server_ts] diff --git a/data/api/identity/v2_associations.yaml b/data/api/identity/v2_associations.yaml index e08ac1da..ae72b77c 100644 --- a/data/api/identity/v2_associations.yaml +++ b/data/api/identity/v2_associations.yaml @@ -68,6 +68,7 @@ paths: description: The address of the 3pid being looked up. validated_at: type: integer + format: int64 description: |- Timestamp, in milliseconds, indicating the time that the 3pid was validated. @@ -174,12 +175,15 @@ paths: description: The Matrix user ID associated with the 3pid. not_before: type: integer + format: int64 description: A unix timestamp before which the association is not known to be valid. not_after: type: integer + format: int64 description: A unix timestamp after which the association is not known to be valid. ts: type: integer + format: int64 description: The unix timestamp at which the association was verified. signatures: type: object diff --git a/data/api/push-gateway/push_notifier.yaml b/data/api/push-gateway/push_notifier.yaml index 2f03433b..96d61bf0 100644 --- a/data/api/push-gateway/push_notifier.yaml +++ b/data/api/push-gateway/push_notifier.yaml @@ -184,6 +184,7 @@ paths: description: The `pushkey` given when the pusher was created. pushkey_ts: type: integer + format: int64 description: |- The unix timestamp (in seconds) when the pushkey was last updated. diff --git a/data/api/server-server/space_hierarchy.yaml b/data/api/server-server/space_hierarchy.yaml index 834848c9..ccc7c6f1 100644 --- a/data/api/server-server/space_hierarchy.yaml +++ b/data/api/server-server/space_hierarchy.yaml @@ -154,7 +154,7 @@ paths: - type: object properties: origin_server_ts: - type: number + type: integer format: int64 description: The `origin_server_ts` for the event. required: [origin_server_ts] diff --git a/data/event-schemas/schema/m.receipt.yaml b/data/event-schemas/schema/m.receipt.yaml index 56d4b341..366aaf28 100644 --- a/data/event-schemas/schema/m.receipt.yaml +++ b/data/event-schemas/schema/m.receipt.yaml @@ -27,7 +27,8 @@ "x-pattern": "$USER_ID", "properties": { "ts": { - "type": "number", + "type": "integer", + "format": "int64", "description": "The timestamp the receipt was sent at." } }