From 83b24dd54d8931c8f7d25b4514a6fd6398b76772 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Thu, 2 Dec 2021 17:23:09 +0000 Subject: [PATCH] Remove definition of Event for `/notifications` (#3525) The documentation for the `/notifications` API had its own special definition of what an Event was, which was used nowhere else. The common definition isn't perfect, but it *is* common, so it gives us a better starting place for improvement. --- data/api/client-server/definitions/event.yaml | 65 ------------------- data/api/client-server/notifications.yaml | 2 +- 2 files changed, 1 insertion(+), 66 deletions(-) delete mode 100644 data/api/client-server/definitions/event.yaml diff --git a/data/api/client-server/definitions/event.yaml b/data/api/client-server/definitions/event.yaml deleted file mode 100644 index 54af96f5..00000000 --- a/data/api/client-server/definitions/event.yaml +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright 2016 OpenMarket Ltd -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -properties: - event_id: - description: The ID of this event, if applicable. - type: string - content: - description: The content of this event. The fields in this object will vary depending - on the type of event. - title: EventContent - type: object - origin_server_ts: - description: Timestamp in milliseconds on originating homeserver when this event - was sent. - format: int64 - type: integer - sender: - description: The MXID of the user who sent this event. - type: string - state_key: - description: Optional. This key will only be present for state events. A unique - key which defines the overwriting semantics for this piece of room state. - type: string - type: - description: The type of event. - type: string - unsigned: - description: Information about this event which was not sent by the originating - homeserver - properties: - age: - description: Time in milliseconds since the event was sent. - format: int64 - type: integer - prev_content: - description: Optional. The previous `content` for this state. This will - be present only for state events appearing in the `timeline`. If this - is not a state event, or there is no previous content, this key will be - missing. - title: EventContent - type: object - transaction_id: - description: Optional. The transaction ID set when this message was sent. - This key will only be present for message events sent by the device calling - this API. - type: string - redacted_because: - description: Optional. The event that redacted this event, if any. - title: Event - type: object - title: UnsignedData - type: object -title: Event -type: object diff --git a/data/api/client-server/notifications.yaml b/data/api/client-server/notifications.yaml index 729873bb..6390bce2 100644 --- a/data/api/client-server/notifications.yaml +++ b/data/api/client-server/notifications.yaml @@ -113,7 +113,7 @@ paths: title: Event description: The Event object for the event that triggered the notification. allOf: - - "$ref": "definitions/event.yaml" + - $ref: ../../event-schemas/schema/core-event-schema/sync_room_event.yaml profile_tag: type: string description: The profile tag of the rule that matched this event.