Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions data/api/server-server/examples/stripped_state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[
{"$ref": "./minimal_pdu.json"},
{
"type": "m.room.create",
"content": {
"see_room_version_spec": "The event format changes depending on the room version."
}
}
]
43 changes: 12 additions & 31 deletions data/api/server-server/invites-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,19 @@ paths:
Servers might need to apply validation to the `invite_room_state` depending
on room version. See the `400 M_MISSING_PARAM` error definition for more
information.

Note that events have a different format depending on the room
version - check the [room version specification](/rooms) for
precise event formats.
items:
$ref: ../../event-schemas/schema/core-event-schema/stripped_state.yaml
type: object
properties: {}
description: |-
Note that events have a different format depending on the room
version - check the [room version specification](/rooms) for
precise event formats.
example:
$ref: ../../event-schemas/examples/invite_room_state.json
$ref: ./examples/stripped_state.json
type: object
required: true
responses:
Expand Down Expand Up @@ -129,35 +138,7 @@ paths:
"origin_server_ts": 1549041175876,
"sender": "@someone:example.org",
"unsigned": {
"invite_room_state": [
{
"type": "m.room.create",
"sender": "@bob:example.org",
"state_key": "",
"content": {
"version": "12"
},
"remaining_fields": "are formatted according to the room version specification"
},
{
"type": "m.room.name",
"sender": "@bob:example.org",
"state_key": "",
"content": {
"name": "Example Room"
},
"remaining_fields": "are formatted according to the room version specification"
},
{
"type": "m.room.join_rules",
"sender": "@bob:example.org",
"state_key": "",
"content": {
"join_rule": "invite"
},
"remaining_fields": "are formatted according to the room version specification"
}
]
"invite_room_state": {"$ref": "./examples/stripped_state.json"}
},
"content": {
"membership": "invite"
Expand Down
43 changes: 12 additions & 31 deletions data/api/server-server/invites-v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,19 @@ paths:
Servers might need to apply validation to the `invite_room_state` depending
on room version. See the `400 M_MISSING_PARAM` error definition for more
information.

Note that events have a different format depending on the room
version - check the [room version specification](/rooms) for
precise event formats.
items:
$ref: ../../event-schemas/schema/core-event-schema/stripped_state.yaml
type: object
properties: {}
description: |-
Note that events have a different format depending on the room
version - check the [room version specification](/rooms) for
precise event formats.
example:
$ref: ../../event-schemas/examples/invite_room_state.json
$ref: ./examples/stripped_state.json
required:
- room_version
- event
Expand Down Expand Up @@ -122,35 +131,7 @@ paths:
"origin_server_ts": 1549041175876,
"sender": "@someone:example.org",
"unsigned": {
"invite_room_state": [
{
"type": "m.room.create",
"sender": "@bob:example.org",
"state_key": "",
"content": {
"version": "12"
},
"remaining_fields": "are formatted according to the room version specification"
},
{
"type": "m.room.name",
"sender": "@bob:example.org",
"state_key": "",
"content": {
"name": "Example Room"
},
"remaining_fields": "are formatted according to the room version specification"
},
{
"type": "m.room.join_rules",
"sender": "@bob:example.org",
"state_key": "",
"content": {
"join_rule": "invite"
},
"remaining_fields": "are formatted according to the room version specification"
}
]
"invite_room_state": {"$ref": "./examples/stripped_state.json"}
},
"content": {
"membership": "invite"
Expand Down
15 changes: 12 additions & 3 deletions data/api/server-server/knocks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,12 @@ paths:
knock_room_state:
type: array
items:
$ref: ../../event-schemas/schema/core-event-schema/stripped_state.yaml
type: object
properties: {}
description: |-
Note that events have a different format depending on the room
version - check the [room version specification](/rooms) for
precise event formats.
x-changedInMatrixVersion:
"1.16": |
`m.room.create` and format requirements were added.
Expand All @@ -309,15 +314,19 @@ paths:
Entries which are [improperly signed](/server-server-api/#validating-hashes-and-signatures-on-received-events)
or formatted SHOULD be removed by the server prior to supplying
them over the Client-Server API.

Note that events have a different format depending on the room
version - check the [room version specification](/rooms) for
precise event formats.
example:
$ref: ../../event-schemas/examples/knock_room_state.json
"$ref": "./examples/stripped_state.json"
required:
- knock_room_state
examples:
response:
value: {
"knock_room_state": {
"$ref": "../../event-schemas/examples/knock_room_state.json"
"$ref": "./examples/stripped_state.json"
}
}
"403":
Expand Down