diff --git a/changelogs/application_service/newsfragments/2132.clarification b/changelogs/application_service/newsfragments/2132.clarification new file mode 100644 index 00000000..26f5d085 --- /dev/null +++ b/changelogs/application_service/newsfragments/2132.clarification @@ -0,0 +1 @@ +Declare the Application Service Registration schema to follow JSON Schema spec 2020-12. \ No newline at end of file diff --git a/changelogs/client_server/newsfragments/2132.clarification b/changelogs/client_server/newsfragments/2132.clarification new file mode 100644 index 00000000..480b16ca --- /dev/null +++ b/changelogs/client_server/newsfragments/2132.clarification @@ -0,0 +1 @@ +Declare the event schemas to follow JSON Schema spec 2020-12. \ No newline at end of file diff --git a/data/api/application-service/definitions/namespace_list.yaml b/data/api/application-service/definitions/namespace_list.yaml index 4f45fc3f..35f5d61a 100644 --- a/data/api/application-service/definitions/namespace_list.yaml +++ b/data/api/application-service/definitions/namespace_list.yaml @@ -11,6 +11,7 @@ # 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. +$schema: https://json-schema.org/draft/2020-12/schema type: array items: diff --git a/data/api/application-service/definitions/registration.yaml b/data/api/application-service/definitions/registration.yaml index f5db31e6..fcf315dc 100644 --- a/data/api/application-service/definitions/registration.yaml +++ b/data/api/application-service/definitions/registration.yaml @@ -11,6 +11,7 @@ # 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. +$schema: https://json-schema.org/draft/2020-12/schema type: object title: Registration diff --git a/data/event-schemas/moderation_policy_rule.yaml b/data/event-schemas/moderation_policy_rule.yaml index c7a4a22c..0dde0eea 100644 --- a/data/event-schemas/moderation_policy_rule.yaml +++ b/data/event-schemas/moderation_policy_rule.yaml @@ -11,6 +11,8 @@ # 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. +$schema: https://json-schema.org/draft/2020-12/schema + properties: entity: description: |- diff --git a/data/event-schemas/schema/components/sdp_stream_metadata.yaml b/data/event-schemas/schema/components/sdp_stream_metadata.yaml index 35566abe..1521e8da 100644 --- a/data/event-schemas/schema/components/sdp_stream_metadata.yaml +++ b/data/event-schemas/schema/components/sdp_stream_metadata.yaml @@ -1,3 +1,5 @@ +$schema: https://json-schema.org/draft/2020-12/schema + type: object x-addedInMatrixVersion: "1.10" description: |- diff --git a/data/event-schemas/schema/core-event-schema/call_event.yaml b/data/event-schemas/schema/core-event-schema/call_event.yaml index a8175fc8..3e326847 100644 --- a/data/event-schemas/schema/core-event-schema/call_event.yaml +++ b/data/event-schemas/schema/core-event-schema/call_event.yaml @@ -1,3 +1,5 @@ +$schema: https://json-schema.org/draft/2020-12/schema + description: "The content of all call events shares a set of common fields: those of room events and some additional VoIP specific fields." properties: diff --git a/data/event-schemas/schema/core-event-schema/event.yaml b/data/event-schemas/schema/core-event-schema/event.yaml index 0fe5ac6c..422ecd53 100644 --- a/data/event-schemas/schema/core-event-schema/event.yaml +++ b/data/event-schemas/schema/core-event-schema/event.yaml @@ -1,3 +1,5 @@ +$schema: https://json-schema.org/draft/2020-12/schema + description: The basic set of fields all events must have. properties: content: diff --git a/data/event-schemas/schema/core-event-schema/msgtype_infos/avatar_info.yaml b/data/event-schemas/schema/core-event-schema/msgtype_infos/avatar_info.yaml index c21dfb48..509f0ac1 100644 --- a/data/event-schemas/schema/core-event-schema/msgtype_infos/avatar_info.yaml +++ b/data/event-schemas/schema/core-event-schema/msgtype_infos/avatar_info.yaml @@ -1,3 +1,5 @@ +$schema: https://json-schema.org/draft/2020-12/schema + description: Metadata about an avatar image. properties: h: diff --git a/data/event-schemas/schema/core-event-schema/msgtype_infos/image_info.yaml b/data/event-schemas/schema/core-event-schema/msgtype_infos/image_info.yaml index 7cbfcc87..4460cdee 100644 --- a/data/event-schemas/schema/core-event-schema/msgtype_infos/image_info.yaml +++ b/data/event-schemas/schema/core-event-schema/msgtype_infos/image_info.yaml @@ -1,3 +1,5 @@ +$schema: https://json-schema.org/draft/2020-12/schema + description: Metadata about an image. properties: h: diff --git a/data/event-schemas/schema/core-event-schema/msgtype_infos/thumbnail_info.yaml b/data/event-schemas/schema/core-event-schema/msgtype_infos/thumbnail_info.yaml index 31a3b1b2..c3b063d8 100644 --- a/data/event-schemas/schema/core-event-schema/msgtype_infos/thumbnail_info.yaml +++ b/data/event-schemas/schema/core-event-schema/msgtype_infos/thumbnail_info.yaml @@ -1,3 +1,5 @@ +$schema: https://json-schema.org/draft/2020-12/schema + description: Metadata about a thumbnail image. properties: h: diff --git a/data/event-schemas/schema/core-event-schema/room_event.yaml b/data/event-schemas/schema/core-event-schema/room_event.yaml index 917031f9..2df24e61 100644 --- a/data/event-schemas/schema/core-event-schema/room_event.yaml +++ b/data/event-schemas/schema/core-event-schema/room_event.yaml @@ -1,3 +1,5 @@ +$schema: https://json-schema.org/draft/2020-12/schema + title: RoomEvent description: Room Events have the following fields. allOf: diff --git a/data/event-schemas/schema/core-event-schema/state_event.yaml b/data/event-schemas/schema/core-event-schema/state_event.yaml index d2ff5243..8ccfa9b9 100644 --- a/data/event-schemas/schema/core-event-schema/state_event.yaml +++ b/data/event-schemas/schema/core-event-schema/state_event.yaml @@ -1,3 +1,5 @@ +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: room_event.yaml - $ref: sync_state_event.yaml diff --git a/data/event-schemas/schema/core-event-schema/stripped_state.yaml b/data/event-schemas/schema/core-event-schema/stripped_state.yaml index c98d8878..6493d35b 100644 --- a/data/event-schemas/schema/core-event-schema/stripped_state.yaml +++ b/data/event-schemas/schema/core-event-schema/stripped_state.yaml @@ -18,6 +18,8 @@ # difficult because the schema would be at two different locations, with # different relative pathing. +$schema: https://json-schema.org/draft/2020-12/schema + title: StrippedStateEvent type: object description: |- diff --git a/data/event-schemas/schema/core-event-schema/sync_room_event.yaml b/data/event-schemas/schema/core-event-schema/sync_room_event.yaml index c1ac84d9..2e3c0f65 100644 --- a/data/event-schemas/schema/core-event-schema/sync_room_event.yaml +++ b/data/event-schemas/schema/core-event-schema/sync_room_event.yaml @@ -17,6 +17,8 @@ # be on events, so we give it a whole event structure as a base for room_event. # This base doesn't declare a room_id, which instead appears in the room_event. +$schema: https://json-schema.org/draft/2020-12/schema + title: SyncRoomEvent description: In addition to the Event fields, Room Events have the following additional fields. diff --git a/data/event-schemas/schema/core-event-schema/sync_state_event.yaml b/data/event-schemas/schema/core-event-schema/sync_state_event.yaml index 6d43c322..8b03d61e 100644 --- a/data/event-schemas/schema/core-event-schema/sync_state_event.yaml +++ b/data/event-schemas/schema/core-event-schema/sync_state_event.yaml @@ -14,6 +14,8 @@ # See sync_room_event.yaml for why this file is here. +$schema: https://json-schema.org/draft/2020-12/schema + title: SyncStateEvent description: In addition to the Room Event fields, State Events have the following additional fields. diff --git a/data/event-schemas/schema/core-event-schema/unsigned_prop.yaml b/data/event-schemas/schema/core-event-schema/unsigned_prop.yaml index 3ca19c41..1d212773 100644 --- a/data/event-schemas/schema/core-event-schema/unsigned_prop.yaml +++ b/data/event-schemas/schema/core-event-schema/unsigned_prop.yaml @@ -11,6 +11,7 @@ # 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. +$schema: https://json-schema.org/draft/2020-12/schema title: UnsignedData type: object diff --git a/data/event-schemas/schema/m.accepted_terms.yaml b/data/event-schemas/schema/m.accepted_terms.yaml index 510e741d..132a4e28 100644 --- a/data/event-schemas/schema/m.accepted_terms.yaml +++ b/data/event-schemas/schema/m.accepted_terms.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/event.yaml description: |- diff --git a/data/event-schemas/schema/m.call.answer.yaml b/data/event-schemas/schema/m.call.answer.yaml index f68ceea8..23291c90 100644 --- a/data/event-schemas/schema/m.call.answer.yaml +++ b/data/event-schemas/schema/m.call.answer.yaml @@ -1,4 +1,5 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "description": "This event is sent by the callee when they wish to answer the call.", "x-weight": 40, diff --git a/data/event-schemas/schema/m.call.candidates.yaml b/data/event-schemas/schema/m.call.candidates.yaml index 194cbda2..0f60c30b 100644 --- a/data/event-schemas/schema/m.call.candidates.yaml +++ b/data/event-schemas/schema/m.call.candidates.yaml @@ -1,3 +1,5 @@ +$schema: https://json-schema.org/draft/2020-12/schema + type: object description: |- This event is sent by callers after sending an invite and by the callee after diff --git a/data/event-schemas/schema/m.call.hangup.yaml b/data/event-schemas/schema/m.call.hangup.yaml index 94f77636..652482ec 100644 --- a/data/event-schemas/schema/m.call.hangup.yaml +++ b/data/event-schemas/schema/m.call.hangup.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + type: object description: | Sent by either party to signal their termination of the call. This can diff --git a/data/event-schemas/schema/m.call.invite.yaml b/data/event-schemas/schema/m.call.invite.yaml index 6b7818a6..6bd07a8a 100644 --- a/data/event-schemas/schema/m.call.invite.yaml +++ b/data/event-schemas/schema/m.call.invite.yaml @@ -1,4 +1,5 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "description": "This event is sent by the caller when they wish to establish a call.", "x-weight": 10, diff --git a/data/event-schemas/schema/m.call.negotiate.yaml b/data/event-schemas/schema/m.call.negotiate.yaml index 69216b44..5f9f5391 100644 --- a/data/event-schemas/schema/m.call.negotiate.yaml +++ b/data/event-schemas/schema/m.call.negotiate.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + type: object description: | Provides SDP negotiation semantics for media pause, hold/resume, ICE restarts diff --git a/data/event-schemas/schema/m.call.reject.yaml b/data/event-schemas/schema/m.call.reject.yaml index 71379fb2..861bec5e 100644 --- a/data/event-schemas/schema/m.call.reject.yaml +++ b/data/event-schemas/schema/m.call.reject.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + type: object description: | If the `m.call.invite` event has `version` `"1"`, a client wishing to diff --git a/data/event-schemas/schema/m.call.sdp_stream_metadata_changed.yaml b/data/event-schemas/schema/m.call.sdp_stream_metadata_changed.yaml index 1ff2dca8..55948a25 100644 --- a/data/event-schemas/schema/m.call.sdp_stream_metadata_changed.yaml +++ b/data/event-schemas/schema/m.call.sdp_stream_metadata_changed.yaml @@ -1,3 +1,5 @@ +$schema: https://json-schema.org/draft/2020-12/schema + type: object x-addedInMatrixVersion: "1.11" x-weight: 70 diff --git a/data/event-schemas/schema/m.call.select_answer.yaml b/data/event-schemas/schema/m.call.select_answer.yaml index fb16eddf..bdfa1ee9 100644 --- a/data/event-schemas/schema/m.call.select_answer.yaml +++ b/data/event-schemas/schema/m.call.select_answer.yaml @@ -1,4 +1,5 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "description": "This event is sent by the caller's client once it has decided which other client to talk to, by selecting one of multiple possible incoming `m.call.answer` events. Its `selected_party_id` field indicates the answer it's chosen. The `call_id` and `party_id` of the caller is also included. If the callee's client sees a `select_answer` for an answer with party ID other than the one it sent, it ends the call and informs the user the call was answered elsewhere. It does not send any events. Media can start flowing before this event is seen or even sent. Clients that implement previous versions of this specification will ignore this event and behave as they did before.", "x-addedInMatrixVersion": "1.7", diff --git a/data/event-schemas/schema/m.direct.yaml b/data/event-schemas/schema/m.direct.yaml index 9b9e8251..0f9bccc3 100644 --- a/data/event-schemas/schema/m.direct.yaml +++ b/data/event-schemas/schema/m.direct.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/event.yaml description: |- diff --git a/data/event-schemas/schema/m.dummy.yaml b/data/event-schemas/schema/m.dummy.yaml index 4699dd86..8324f01d 100644 --- a/data/event-schemas/schema/m.dummy.yaml +++ b/data/event-schemas/schema/m.dummy.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/event.yaml diff --git a/data/event-schemas/schema/m.forwarded_room_key.yaml b/data/event-schemas/schema/m.forwarded_room_key.yaml index 101716a0..29aab30c 100644 --- a/data/event-schemas/schema/m.forwarded_room_key.yaml +++ b/data/event-schemas/schema/m.forwarded_room_key.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/event.yaml diff --git a/data/event-schemas/schema/m.fully_read.yaml b/data/event-schemas/schema/m.fully_read.yaml index 6f8c832d..05eddd26 100644 --- a/data/event-schemas/schema/m.fully_read.yaml +++ b/data/event-schemas/schema/m.fully_read.yaml @@ -1,4 +1,5 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "title": "Read Marker Location Event", "description": "The current location of the user's read marker in a room. This event appears in the user's room account data for the room the marker is applicable for.", diff --git a/data/event-schemas/schema/m.identity_server.yaml b/data/event-schemas/schema/m.identity_server.yaml index 1c08b047..69f43fe0 100644 --- a/data/event-schemas/schema/m.identity_server.yaml +++ b/data/event-schemas/schema/m.identity_server.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/event.yaml description: |- diff --git a/data/event-schemas/schema/m.ignored_user_list.yaml b/data/event-schemas/schema/m.ignored_user_list.yaml index af838490..5be09590 100644 --- a/data/event-schemas/schema/m.ignored_user_list.yaml +++ b/data/event-schemas/schema/m.ignored_user_list.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/event.yaml description: |- diff --git a/data/event-schemas/schema/m.key.verification.accept.yaml b/data/event-schemas/schema/m.key.verification.accept.yaml index a61edd66..c9ea2d18 100644 --- a/data/event-schemas/schema/m.key.verification.accept.yaml +++ b/data/event-schemas/schema/m.key.verification.accept.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/event.yaml diff --git a/data/event-schemas/schema/m.key.verification.cancel.yaml b/data/event-schemas/schema/m.key.verification.cancel.yaml index 237f0d06..02fe3920 100644 --- a/data/event-schemas/schema/m.key.verification.cancel.yaml +++ b/data/event-schemas/schema/m.key.verification.cancel.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/event.yaml diff --git a/data/event-schemas/schema/m.key.verification.done.yaml b/data/event-schemas/schema/m.key.verification.done.yaml index 0e1c24e6..389216bc 100644 --- a/data/event-schemas/schema/m.key.verification.done.yaml +++ b/data/event-schemas/schema/m.key.verification.done.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/event.yaml diff --git a/data/event-schemas/schema/m.key.verification.key.yaml b/data/event-schemas/schema/m.key.verification.key.yaml index c0b31c1b..fd7222e4 100644 --- a/data/event-schemas/schema/m.key.verification.key.yaml +++ b/data/event-schemas/schema/m.key.verification.key.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/event.yaml diff --git a/data/event-schemas/schema/m.key.verification.m.relates_to.yaml b/data/event-schemas/schema/m.key.verification.m.relates_to.yaml index 038344b9..e92cec17 100644 --- a/data/event-schemas/schema/m.key.verification.m.relates_to.yaml +++ b/data/event-schemas/schema/m.key.verification.m.relates_to.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + description: |- Required when sent as an in-room message. Indicates the `m.key.verification.request` that this message is related to. Note that for diff --git a/data/event-schemas/schema/m.key.verification.mac.yaml b/data/event-schemas/schema/m.key.verification.mac.yaml index ad4a3f05..73ed1a2d 100644 --- a/data/event-schemas/schema/m.key.verification.mac.yaml +++ b/data/event-schemas/schema/m.key.verification.mac.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/event.yaml diff --git a/data/event-schemas/schema/m.key.verification.ready.yaml b/data/event-schemas/schema/m.key.verification.ready.yaml index 1c5ed7bd..d61ce5a3 100644 --- a/data/event-schemas/schema/m.key.verification.ready.yaml +++ b/data/event-schemas/schema/m.key.verification.ready.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/event.yaml diff --git a/data/event-schemas/schema/m.key.verification.request.yaml b/data/event-schemas/schema/m.key.verification.request.yaml index 880d4900..0a046d4c 100644 --- a/data/event-schemas/schema/m.key.verification.request.yaml +++ b/data/event-schemas/schema/m.key.verification.request.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/event.yaml diff --git a/data/event-schemas/schema/m.key.verification.start$m.reciprocate.v1.yaml b/data/event-schemas/schema/m.key.verification.start$m.reciprocate.v1.yaml index 4f3071ac..9e7d09ff 100644 --- a/data/event-schemas/schema/m.key.verification.start$m.reciprocate.v1.yaml +++ b/data/event-schemas/schema/m.key.verification.start$m.reciprocate.v1.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/event.yaml diff --git a/data/event-schemas/schema/m.key.verification.start$m.sas.v1.yaml b/data/event-schemas/schema/m.key.verification.start$m.sas.v1.yaml index c5f2e8af..a426ebf1 100644 --- a/data/event-schemas/schema/m.key.verification.start$m.sas.v1.yaml +++ b/data/event-schemas/schema/m.key.verification.start$m.sas.v1.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/event.yaml diff --git a/data/event-schemas/schema/m.key.verification.start.yaml b/data/event-schemas/schema/m.key.verification.start.yaml index cc16d275..4388f540 100644 --- a/data/event-schemas/schema/m.key.verification.start.yaml +++ b/data/event-schemas/schema/m.key.verification.start.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/event.yaml diff --git a/data/event-schemas/schema/m.marked_unread.yaml b/data/event-schemas/schema/m.marked_unread.yaml index 56b3ba62..fbe3824f 100644 --- a/data/event-schemas/schema/m.marked_unread.yaml +++ b/data/event-schemas/schema/m.marked_unread.yaml @@ -1,4 +1,5 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "title": "Unread Marker Event", "description": "The current state of the user's unread marker in a room. This event appears in the user's room account data for the room the marker is applicable for.", diff --git a/data/event-schemas/schema/m.policy.rule.room.yaml b/data/event-schemas/schema/m.policy.rule.room.yaml index ff81543e..2f7eda33 100644 --- a/data/event-schemas/schema/m.policy.rule.room.yaml +++ b/data/event-schemas/schema/m.policy.rule.room.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/state_event.yaml description: A moderation policy rule which affects room IDs and room aliases. diff --git a/data/event-schemas/schema/m.policy.rule.server.yaml b/data/event-schemas/schema/m.policy.rule.server.yaml index ca37e8ff..b747f5ee 100644 --- a/data/event-schemas/schema/m.policy.rule.server.yaml +++ b/data/event-schemas/schema/m.policy.rule.server.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/state_event.yaml description: A moderation policy rule which affects servers. diff --git a/data/event-schemas/schema/m.policy.rule.user.yaml b/data/event-schemas/schema/m.policy.rule.user.yaml index 4fa65ad8..d24eade3 100644 --- a/data/event-schemas/schema/m.policy.rule.user.yaml +++ b/data/event-schemas/schema/m.policy.rule.user.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/state_event.yaml description: A moderation policy rule which affects users. diff --git a/data/event-schemas/schema/m.presence.yaml b/data/event-schemas/schema/m.presence.yaml index 540fc7a0..417c6fcc 100644 --- a/data/event-schemas/schema/m.presence.yaml +++ b/data/event-schemas/schema/m.presence.yaml @@ -1,4 +1,5 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "title": "Presence Event", "description": "Informs the client of a user's presence state change.", diff --git a/data/event-schemas/schema/m.push_rules.yaml b/data/event-schemas/schema/m.push_rules.yaml index 6fde9e14..84bde9c7 100644 --- a/data/event-schemas/schema/m.push_rules.yaml +++ b/data/event-schemas/schema/m.push_rules.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/event.yaml description: Describes all push rules for this user. diff --git a/data/event-schemas/schema/m.reaction.yaml b/data/event-schemas/schema/m.reaction.yaml index e7ad0ba1..f04a9d2e 100644 --- a/data/event-schemas/schema/m.reaction.yaml +++ b/data/event-schemas/schema/m.reaction.yaml @@ -1,3 +1,5 @@ +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/room_event.yaml description: |- diff --git a/data/event-schemas/schema/m.receipt.yaml b/data/event-schemas/schema/m.receipt.yaml index 23a5d835..1f3b0912 100644 --- a/data/event-schemas/schema/m.receipt.yaml +++ b/data/event-schemas/schema/m.receipt.yaml @@ -1,3 +1,5 @@ +$schema: https://json-schema.org/draft/2020-12/schema + type: object title: Receipt Event description: Informs the client of new receipts. diff --git a/data/event-schemas/schema/m.room.avatar.yaml b/data/event-schemas/schema/m.room.avatar.yaml index 5c6c7140..b33b96dd 100644 --- a/data/event-schemas/schema/m.room.avatar.yaml +++ b/data/event-schemas/schema/m.room.avatar.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/state_event.yaml description: A picture that is associated with the room. This can be displayed alongside the room information. diff --git a/data/event-schemas/schema/m.room.canonical_alias.yaml b/data/event-schemas/schema/m.room.canonical_alias.yaml index 7547bd3a..f505693a 100644 --- a/data/event-schemas/schema/m.room.canonical_alias.yaml +++ b/data/event-schemas/schema/m.room.canonical_alias.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/state_event.yaml description: |- diff --git a/data/event-schemas/schema/m.room.create.yaml b/data/event-schemas/schema/m.room.create.yaml index 2db5fd57..ed25d6d0 100644 --- a/data/event-schemas/schema/m.room.create.yaml +++ b/data/event-schemas/schema/m.room.create.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/state_event.yaml description: This is the first event in a room and cannot be changed. It acts as the root of all other events. diff --git a/data/event-schemas/schema/m.room.encrypted.yaml b/data/event-schemas/schema/m.room.encrypted.yaml index 6a5689ac..e48bf630 100644 --- a/data/event-schemas/schema/m.room.encrypted.yaml +++ b/data/event-schemas/schema/m.room.encrypted.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/event.yaml diff --git a/data/event-schemas/schema/m.room.encryption.yaml b/data/event-schemas/schema/m.room.encryption.yaml index 9f443b5e..a1d7abb5 100644 --- a/data/event-schemas/schema/m.room.encryption.yaml +++ b/data/event-schemas/schema/m.room.encryption.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/state_event.yaml description: Defines how messages sent in this room should be encrypted. diff --git a/data/event-schemas/schema/m.room.guest_access.yaml b/data/event-schemas/schema/m.room.guest_access.yaml index f886dfe5..a37f2e79 100644 --- a/data/event-schemas/schema/m.room.guest_access.yaml +++ b/data/event-schemas/schema/m.room.guest_access.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/state_event.yaml description: 'This event controls whether guest users are allowed to join rooms. If this event is absent, servers should act as if it is present and has the guest_access value "forbidden".' diff --git a/data/event-schemas/schema/m.room.history_visibility.yaml b/data/event-schemas/schema/m.room.history_visibility.yaml index 27ec67c7..c678046e 100644 --- a/data/event-schemas/schema/m.room.history_visibility.yaml +++ b/data/event-schemas/schema/m.room.history_visibility.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/state_event.yaml description: This event controls whether a user can see the events that happened in a room from before they joined. diff --git a/data/event-schemas/schema/m.room.join_rules.yaml b/data/event-schemas/schema/m.room.join_rules.yaml index b6a322c6..1bec90fc 100644 --- a/data/event-schemas/schema/m.room.join_rules.yaml +++ b/data/event-schemas/schema/m.room.join_rules.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/state_event.yaml description: | diff --git a/data/event-schemas/schema/m.room.member.yaml b/data/event-schemas/schema/m.room.member.yaml index 436c0145..e768c906 100644 --- a/data/event-schemas/schema/m.room.member.yaml +++ b/data/event-schemas/schema/m.room.member.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/state_event.yaml description: |- diff --git a/data/event-schemas/schema/m.room.message$m.audio.yaml b/data/event-schemas/schema/m.room.message$m.audio.yaml index 6bb23c31..a1116c59 100644 --- a/data/event-schemas/schema/m.room.message$m.audio.yaml +++ b/data/event-schemas/schema/m.room.message$m.audio.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/room_event.yaml description: This message represents a single audio clip. diff --git a/data/event-schemas/schema/m.room.message$m.emote.yaml b/data/event-schemas/schema/m.room.message$m.emote.yaml index b611b888..a6f18763 100644 --- a/data/event-schemas/schema/m.room.message$m.emote.yaml +++ b/data/event-schemas/schema/m.room.message$m.emote.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/room_event.yaml description: "This message is similar to `m.text` except that the sender is 'performing' the action contained in the `body` key, similar to `/me` in IRC. This message should be prefixed by the name of the sender. This message could also be represented in a different colour to distinguish it from regular `m.text` messages." diff --git a/data/event-schemas/schema/m.room.message$m.file.yaml b/data/event-schemas/schema/m.room.message$m.file.yaml index 65a7b3d6..9fef045d 100644 --- a/data/event-schemas/schema/m.room.message$m.file.yaml +++ b/data/event-schemas/schema/m.room.message$m.file.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/room_event.yaml description: This message represents a generic file. diff --git a/data/event-schemas/schema/m.room.message$m.image.yaml b/data/event-schemas/schema/m.room.message$m.image.yaml index 9017b945..68e44f06 100644 --- a/data/event-schemas/schema/m.room.message$m.image.yaml +++ b/data/event-schemas/schema/m.room.message$m.image.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/room_event.yaml description: This message represents a single image and an optional thumbnail. diff --git a/data/event-schemas/schema/m.room.message$m.key.verification.request.yaml b/data/event-schemas/schema/m.room.message$m.key.verification.request.yaml index a773ebda..9fc7e276 100644 --- a/data/event-schemas/schema/m.room.message$m.key.verification.request.yaml +++ b/data/event-schemas/schema/m.room.message$m.key.verification.request.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/room_event.yaml description: diff --git a/data/event-schemas/schema/m.room.message$m.location.yaml b/data/event-schemas/schema/m.room.message$m.location.yaml index 27b2b039..e0977079 100644 --- a/data/event-schemas/schema/m.room.message$m.location.yaml +++ b/data/event-schemas/schema/m.room.message$m.location.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/room_event.yaml description: This message represents a real-world location. diff --git a/data/event-schemas/schema/m.room.message$m.notice.yaml b/data/event-schemas/schema/m.room.message$m.notice.yaml index 8c59149c..5ca72d98 100644 --- a/data/event-schemas/schema/m.room.message$m.notice.yaml +++ b/data/event-schemas/schema/m.room.message$m.notice.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/room_event.yaml description: 'The `m.notice` type is primarily intended for responses from automated clients. An `m.notice` message must be treated the same way as a regular `m.text` message with two exceptions. Firstly, clients should present `m.notice` messages to users in a distinct manner, and secondly, `m.notice` messages must never be automatically responded to. This helps to prevent infinite-loop situations where two automated clients continuously exchange messages.' diff --git a/data/event-schemas/schema/m.room.message$m.server_notice.yaml b/data/event-schemas/schema/m.room.message$m.server_notice.yaml index ca7144b0..9dcf4356 100644 --- a/data/event-schemas/schema/m.room.message$m.server_notice.yaml +++ b/data/event-schemas/schema/m.room.message$m.server_notice.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/room_event.yaml description: Represents a server notice for a user. diff --git a/data/event-schemas/schema/m.room.message$m.text.yaml b/data/event-schemas/schema/m.room.message$m.text.yaml index 7171b82a..e0279e9e 100644 --- a/data/event-schemas/schema/m.room.message$m.text.yaml +++ b/data/event-schemas/schema/m.room.message$m.text.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/room_event.yaml description: This message is the most basic message and is used to represent text. diff --git a/data/event-schemas/schema/m.room.message$m.video.yaml b/data/event-schemas/schema/m.room.message$m.video.yaml index 325c231a..6d8c49e8 100644 --- a/data/event-schemas/schema/m.room.message$m.video.yaml +++ b/data/event-schemas/schema/m.room.message$m.video.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/room_event.yaml description: This message represents a single video clip. diff --git a/data/event-schemas/schema/m.room.message.yaml b/data/event-schemas/schema/m.room.message.yaml index 546b5e19..561286a3 100644 --- a/data/event-schemas/schema/m.room.message.yaml +++ b/data/event-schemas/schema/m.room.message.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/room_event.yaml description: 'This event is used when sending messages in a room. Messages are not limited to be text. The `msgtype` key outlines the type of message, e.g. text, audio, image, video, etc. The `body` key is text and MUST be used with every kind of `msgtype` as a fallback mechanism for when a client cannot render a message. This allows clients to display *something* even if it is just plain text.' diff --git a/data/event-schemas/schema/m.room.name.yaml b/data/event-schemas/schema/m.room.name.yaml index 0b3b34dc..c8d462b4 100644 --- a/data/event-schemas/schema/m.room.name.yaml +++ b/data/event-schemas/schema/m.room.name.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/state_event.yaml description: |- diff --git a/data/event-schemas/schema/m.room.pinned_events.yaml b/data/event-schemas/schema/m.room.pinned_events.yaml index 7b4a0d61..e4206ade 100644 --- a/data/event-schemas/schema/m.room.pinned_events.yaml +++ b/data/event-schemas/schema/m.room.pinned_events.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/state_event.yaml description: This event is used to "pin" particular events in a room for other participants to review later. The order of the pinned events is guaranteed and based upon the order supplied in the event. Clients should be aware that the current user may not be able to see some of the events pinned due to visibility settings in the room. Clients are responsible for determining if a particular event in the pinned list is displayable, and have the option to not display it if it cannot be pinned in the client. diff --git a/data/event-schemas/schema/m.room.power_levels.yaml b/data/event-schemas/schema/m.room.power_levels.yaml index 9c9cf6fd..5dd5b5e8 100644 --- a/data/event-schemas/schema/m.room.power_levels.yaml +++ b/data/event-schemas/schema/m.room.power_levels.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/state_event.yaml description: |- diff --git a/data/event-schemas/schema/m.room.redaction.yaml b/data/event-schemas/schema/m.room.redaction.yaml index 8a7edeba..06ad8602 100644 --- a/data/event-schemas/schema/m.room.redaction.yaml +++ b/data/event-schemas/schema/m.room.redaction.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/room_event.yaml description: 'This event is created by the server to describe which event has been redacted, by whom, and optionally why. The event that has been redacted is specified in the `redacts` event level key. Redacting an event means that all keys not required by the protocol are stripped off, allowing messages to be hidden or allowing admins to remove offensive or illegal content.' diff --git a/data/event-schemas/schema/m.room.server_acl.yaml b/data/event-schemas/schema/m.room.server_acl.yaml index c7a26c33..c2ecf805 100644 --- a/data/event-schemas/schema/m.room.server_acl.yaml +++ b/data/event-schemas/schema/m.room.server_acl.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + title: Server ACL description: |- An event to indicate which servers are permitted to participate in the diff --git a/data/event-schemas/schema/m.room.third_party_invite.yaml b/data/event-schemas/schema/m.room.third_party_invite.yaml index 704669d2..704e0290 100644 --- a/data/event-schemas/schema/m.room.third_party_invite.yaml +++ b/data/event-schemas/schema/m.room.third_party_invite.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/state_event.yaml description: |- diff --git a/data/event-schemas/schema/m.room.tombstone.yaml b/data/event-schemas/schema/m.room.tombstone.yaml index 1c590e1f..8cda7568 100644 --- a/data/event-schemas/schema/m.room.tombstone.yaml +++ b/data/event-schemas/schema/m.room.tombstone.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/state_event.yaml description: 'A state event signifying that a room has been upgraded to a different room version, and that clients should go there.' diff --git a/data/event-schemas/schema/m.room.topic.yaml b/data/event-schemas/schema/m.room.topic.yaml index 580566d2..a50a710e 100644 --- a/data/event-schemas/schema/m.room.topic.yaml +++ b/data/event-schemas/schema/m.room.topic.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/state_event.yaml description: |- diff --git a/data/event-schemas/schema/m.room_key.withheld.yaml b/data/event-schemas/schema/m.room_key.withheld.yaml index 1acca546..185aa902 100644 --- a/data/event-schemas/schema/m.room_key.withheld.yaml +++ b/data/event-schemas/schema/m.room_key.withheld.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/event.yaml diff --git a/data/event-schemas/schema/m.room_key.yaml b/data/event-schemas/schema/m.room_key.yaml index c90b41b4..c8c76bb4 100644 --- a/data/event-schemas/schema/m.room_key.yaml +++ b/data/event-schemas/schema/m.room_key.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/event.yaml diff --git a/data/event-schemas/schema/m.room_key_request.yaml b/data/event-schemas/schema/m.room_key_request.yaml index 62b07a23..9dcdc8ae 100644 --- a/data/event-schemas/schema/m.room_key_request.yaml +++ b/data/event-schemas/schema/m.room_key_request.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/event.yaml diff --git a/data/event-schemas/schema/m.secret.request.yaml b/data/event-schemas/schema/m.secret.request.yaml index ac8142c1..4936e4c0 100644 --- a/data/event-schemas/schema/m.secret.request.yaml +++ b/data/event-schemas/schema/m.secret.request.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/event.yaml description: |- diff --git a/data/event-schemas/schema/m.secret.send.yaml b/data/event-schemas/schema/m.secret.send.yaml index a2cafb6d..21379fcb 100644 --- a/data/event-schemas/schema/m.secret.send.yaml +++ b/data/event-schemas/schema/m.secret.send.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/event.yaml description: |- diff --git a/data/event-schemas/schema/m.space.child.yaml b/data/event-schemas/schema/m.space.child.yaml index 2222b3a1..befd7af9 100644 --- a/data/event-schemas/schema/m.space.child.yaml +++ b/data/event-schemas/schema/m.space.child.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/state_event.yaml description: Defines the relationship of a child room to a space-room. Has no effect in rooms which are not [spaces](/client-server-api/#spaces). diff --git a/data/event-schemas/schema/m.space.parent.yaml b/data/event-schemas/schema/m.space.parent.yaml index fb633789..7d8ce85c 100644 --- a/data/event-schemas/schema/m.space.parent.yaml +++ b/data/event-schemas/schema/m.space.parent.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/state_event.yaml description: Defines the relationship of a room to a parent space-room. diff --git a/data/event-schemas/schema/m.sticker.yaml b/data/event-schemas/schema/m.sticker.yaml index 5856cca6..48571cf2 100644 --- a/data/event-schemas/schema/m.sticker.yaml +++ b/data/event-schemas/schema/m.sticker.yaml @@ -1,4 +1,6 @@ --- +$schema: https://json-schema.org/draft/2020-12/schema + allOf: - $ref: core-event-schema/room_event.yaml description: This message represents a single sticker image. diff --git a/data/event-schemas/schema/m.tag.yaml b/data/event-schemas/schema/m.tag.yaml index 77010350..9a3813db 100644 --- a/data/event-schemas/schema/m.tag.yaml +++ b/data/event-schemas/schema/m.tag.yaml @@ -1,4 +1,5 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "title": "Tag Event", "description": "Informs the client of tags on a room.", diff --git a/data/event-schemas/schema/m.typing.yaml b/data/event-schemas/schema/m.typing.yaml index 1613334f..58aeab4e 100644 --- a/data/event-schemas/schema/m.typing.yaml +++ b/data/event-schemas/schema/m.typing.yaml @@ -1,4 +1,5 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "title": "Typing Event", "description": "Informs the client of the list of users currently typing.",