Include examples inline instead of using a reference for invite endpoint definitions (#1349)
The OpenAPI 3 spec doesn't allow building examples by composition. Either the whole example must be a reference, or it has to be included. Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
parent
eeb43043ad
commit
4534124742
3 changed files with 37 additions and 6 deletions
|
@ -0,0 +1 @@
|
|||
Include examples inline instead of using a reference for invite endpoint definitions.
|
|
@ -133,10 +133,25 @@ paths:
|
|||
"origin_server_ts": 1549041175876,
|
||||
"sender": "@someone:example.org",
|
||||
"unsigned": {
|
||||
"invite_room_state": {
|
||||
"$ref": "../../event-schemas/examples/invite_room_state.json"
|
||||
"invite_room_state": [
|
||||
{
|
||||
"type": "m.room.name",
|
||||
"sender": "@bob:example.org",
|
||||
"state_key": "",
|
||||
"content": {
|
||||
"name": "Example Room"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "m.room.join_rules",
|
||||
"sender": "@bob:example.org",
|
||||
"state_key": "",
|
||||
"content": {
|
||||
"join_rule": "invite"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"content": {
|
||||
"membership": "invite"
|
||||
},
|
||||
|
|
|
@ -129,10 +129,25 @@ paths:
|
|||
"origin_server_ts": 1549041175876,
|
||||
"sender": "@someone:example.org",
|
||||
"unsigned": {
|
||||
"invite_room_state": {
|
||||
"$ref": "../../event-schemas/examples/invite_room_state.json"
|
||||
"invite_room_state": [
|
||||
{
|
||||
"type": "m.room.name",
|
||||
"sender": "@bob:example.org",
|
||||
"state_key": "",
|
||||
"content": {
|
||||
"name": "Example Room"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "m.room.join_rules",
|
||||
"sender": "@bob:example.org",
|
||||
"state_key": "",
|
||||
"content": {
|
||||
"join_rule": "invite"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"content": {
|
||||
"membership": "invite"
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue