Add example events.
These can be used for assertions as well as drop ins for the spec.
This commit is contained in:
parent
c370599a17
commit
a8af9bef29
5 changed files with 56 additions and 1 deletions
|
@ -7,7 +7,7 @@ resolved correctly. For basic CLI testing, we recommend and have verified they
|
|||
work with the Node.js package [z-schema](https://github.com/zaggino/z-schema):
|
||||
```
|
||||
$ npm install -g z-schema
|
||||
$ z-schema m.room.message /path/to/json/file.json
|
||||
$ z-schema m.room.message examples/m.room.message_m.text
|
||||
schema validation passed
|
||||
json #1 validation passed
|
||||
```
|
||||
|
|
12
event-schemas/examples/m.room.message_m.emote
Normal file
12
event-schemas/examples/m.room.message_m.emote
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"age": 242352,
|
||||
"content": {
|
||||
"body": "thinks this is an example emote",
|
||||
"msgtype": "m.emote"
|
||||
},
|
||||
"origin_server_ts": 1431961217939,
|
||||
"event_id": "$WLGTSEFSEF:localhost",
|
||||
"type": "m.room.message",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
}
|
19
event-schemas/examples/m.room.message_m.image
Normal file
19
event-schemas/examples/m.room.message_m.image
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"age": 242352,
|
||||
"content": {
|
||||
"body": "filename.jpg",
|
||||
"info": {
|
||||
"h": 398,
|
||||
"w": 394,
|
||||
"mimetype": "image/jpeg",
|
||||
"size": 31037
|
||||
},
|
||||
"url": "mxc://localhost/JWEIFJgwEIhweiWJE",
|
||||
"msgtype": "m.image"
|
||||
},
|
||||
"origin_server_ts": 1431961217939,
|
||||
"event_id": "$WLGTSEFSEF:localhost",
|
||||
"type": "m.room.message",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
}
|
12
event-schemas/examples/m.room.message_m.notice
Normal file
12
event-schemas/examples/m.room.message_m.notice
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"age": 242352,
|
||||
"content": {
|
||||
"body": "This is an example notice",
|
||||
"msgtype": "m.notice"
|
||||
},
|
||||
"origin_server_ts": 1431961217939,
|
||||
"event_id": "$WLGTSEFSEF:localhost",
|
||||
"type": "m.room.message",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
}
|
12
event-schemas/examples/m.room.message_m.text
Normal file
12
event-schemas/examples/m.room.message_m.text
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"age": 242352,
|
||||
"content": {
|
||||
"body": "This is an example text message",
|
||||
"msgtype": "m.text"
|
||||
},
|
||||
"origin_server_ts": 1431961217939,
|
||||
"event_id": "$WLGTSEFSEF:localhost",
|
||||
"type": "m.room.message",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue